I want to migrate all my machines from old 3.x Proxmox box to new 4.4.
Thereâs lvm-thin storage on new machine that I cannot directly access from the old one.
So after many attemps I found a way:
- create new storage inside âdataâ logical volume:
lvcreate -n dupa -V 1T pve/data
’dupa’ is name of new storage ’1T’ is 1 Terabyte size of it.
- make filesystem
mkfs.ext4 /dev/pve/dupa
- mount it somewhere:
echo '/dev/pve/dupa /var/lib/dupa ext4 defaults 0 2' >> /etc/fstab
mount /var/lib/dupa
Then in web GUI click on ’Datacenter’ and add new storage with type ’Directory’, and in ’Directory’ field put ’/var/lib/dupa’.
Voila!
Next step is share it with NFS, mount it on old Proxmox machine and transfer them.
apt-get install nfs-kernel-server
vim /etc/idmapd.conf
# line 6: uncomment and change to your domain name
Domain = minedomain
vim /etc/exports
# write settings for NFS exports
//var/lib/dupa 192.168.1.5/24(rw,no_root_squash)
systemctl restart nfs-kernel-server
Go to old Proxmox box console and check if export on new is visible:
showmount -a ip_of_new_machine
If itâs OK then mount it in webgui as backup storage.
Select VM and backup it to this backup storage.
When itâs finished go to new machine webgui, select dupa storage content, select backup of VM and Restore it to local-lvm storage.
qmrestore /mnt/pve-data/dump/vzdump-qemu-112-2017_04_08-08_39_02.vma.lzo 112 -storage local-lvm