EDIT: I did not pass option
@moderator: I did not delete this to keep it searchable in case someone else makes the same mistake, if its better to delete please remove this posting to avoid noise, whatever you think is better.
Hi,
I'm converting a libvirt / VirtManager / virsh VM to Proxmox. I read that I should tar the content and use pct create, so I did:
but it did not boot. So I attached a shell lxc-attach -n 202 and noticed I cannot write anywhere.
I noticed on pve:
another CT has a UID mapping on the files:
Shouldn't pct create perform the UID mapping automatically?
EDIT: Yes,
Can I do it manuall afterwards? I cannot use simply chown, because not all files belong to root (it's a Debian as container inside).
EDIT: ps: because I first forgot using -C /var/lib/libvirt/filesystems/ I had this path included in the TAR and got an error in pct create.
--unprivileged 1
to pct create
and that's why UID mapping did not happen.@moderator: I did not delete this to keep it searchable in case someone else makes the same mistake, if its better to delete please remove this posting to avoid noise, whatever you think is better.
Hi,
I'm converting a libvirt / VirtManager / virsh VM to Proxmox. I read that I should tar the content and use pct create, so I did:
Code:
root@oldhost: time tar --warning='no-file-ignored' -czf ./node1-2022-12-26-SNAP.tar.gz -C /var/lib/libvirt/filesystems/node1/ .
root@pve: pct create 202 ./node1-2022-12-26-SNAP.tar.gz --description node1 --hostname node1 --memory 1024 --onboot 1 --ignore-unpack-errors 1 --ostype debian --storage local-zfs
pct start 202 --debug
but it did not boot. So I attached a shell lxc-attach -n 202 and noticed I cannot write anywhere.
I noticed on pve:
Code:
ls -dl /rpool/data/subvol-202-disk-0/var/log
drwxr-xr-x 6 root root 74 Dec 25 00:00 /rpool/data/subvol-202-disk-0/var/log
Code:
ls -dl /rpool/data/subvol-100-disk-0/var/log
drwxr-xr-x 6 100000 100000 18 Dec 26 17:49 /rpool/data/subvol-100-disk-0/var/log
EDIT: Yes,
--unprivileged 1
is needed as command line option.Can I do it manuall afterwards? I cannot use simply chown, because not all files belong to root (it's a Debian as container inside).
EDIT: ps: because I first forgot using -C /var/lib/libvirt/filesystems/ I had this path included in the TAR and got an error in pct create.
Last edited: