We still passed the target mount path to bindmount() causing bindmount_verify() to fail. Fix this by assuming '/' as the in-container target mount path when staging, as we mount onto the $rootdir instead.
Signed-off-by: Wolfgang Bumiller <w.bumil...@proxmox.com> --- src/PVE/LXC.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index 5109189..73e54ca 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -1519,8 +1519,12 @@ sub __mountpoint_mount { return undef; } + # When staging mount points we always mount to $rootdir directly (iow. as if `mp=/`). + # This is required since __mount_prepare_rootdir() will return handles to the parent directory + # which we use in __bindmount_verify()! + my $mount = $stage_mount ? '/': $mountpoint->{mp}; + my $volid = $mountpoint->{volume}; - my $mount = $mountpoint->{mp}; my $type = $mountpoint->{type}; my $quota = !$snapname && !$mountpoint->{ro} && $mountpoint->{quota}; my $mounted_dev; -- 2.20.1 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel