VM migration between 2 NFS harddisks

ioanv

Well-Known Member
Dec 11, 2014
47
4
48
Hello everybody!

I'm trying to migrate some VMs from a 3.4-1 cluster to a 4.1 cluster. Each VM runs on node but the storage is a NFS shared folder (from a Synology NAS), one shared folder for each VM.
I've backed-up my VMs and than I restored on the new cluster.

So I have VM atlas with storage called atlas_nfs (shared folder 1). After that, shut down atlas VM on old cluster.
When I restore the VM, I've restored it on skadi_nfs (shared folder 2 on the same NAS). Then I've tried to rename the new nfs hdd (skadi_nfs) to the old name. So I've destroyed (from Datacenter--> Storage) the skadi_nfs (shared folder 2) and created atlas_nfs (also shared folder 2). Than, I have edited the new VM's hdd to point to atlas_nfs instead of skadi_nfs. However now the machine is not bootable (hdd not bootable).

Any thoughts?
Regards
Vlad
 
Actually this is a second test where I've done the same thing for a VM called yggdrasil (previous was with atlas).

# df -h
Filesystem Size Used Avail Use% Mounted on
udev 10M 0 10M 0% /dev
tmpfs 394M 41M 354M 11% /run
/dev/dm-0 37G 2.6G 32G 8% /
tmpfs 985M 63M 922M 7% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 985M 0 985M 0% /sys/fs/cgroup
/dev/mapper/pve-data 91G 1.1G 90G 2% /var/lib/vz
tmpfs 100K 0 100K 0% /run/lxcfs/controllers
cgmfs 100K 0 100K 0% /run/cgmanager/fs
/dev/fuse 30M 24K 30M 1% /etc/pve
192.168.20.28:/volume35/skadi 89G 17G 72G 19% /mnt/pve/yggdrasil_nfs --> after I renamed the storage and the HDD of my VM
192.168.20.29:/volume1/proxback 5.3T 4.0T 1.4T 75% /mnt/pve/proxback
192.168.10.28:/volume1/ISOuri 99G 49G 50G 50% /mnt/pve/ISOuri
------------------
192.168.20.28:/volume35/skadi on /mnt/pve/yggdrasil_nfs type nfs (rw,relatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.20.28,mountvers=3,mountport=892,mountproto=udp,local_lock=none,addr=192.168.20.28)
192.168.20.29:/volume1/proxback on /mnt/pve/proxback type nfs (rw,relatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.20.29,mountvers=3,mountport=892,mountproto=udp,local_lock=none,addr=192.168.20.29)
192.168.10.28:/volume1/ISOuri on /mnt/pve/ISOuri type nfs (rw,relatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.10.28,mountvers=3,mountport=892,mountproto=udp,local_lock=none,addr=192.168.10.28)
 
Just to make sure that I make myself clear: as soon as I change the name of a share (even if I modify accordingly the HDD of the coresponding VM) that VM stops working.
 
Please post the content of /etc/pve/storage.cfg and the VM config.
 
nfs: ISOuri
path /mnt/pve/ISOuri
export /volume1/ISOuri
server 192.168.10.28
options vers=3
maxfiles 1
content iso

dir: local
path /var/lib/vz
content iso,rootdir,images,vztmpl
maxfiles 0

nfs: proxback
path /mnt/pve/proxback
export /volume1/proxback
server 192.168.20.29
options vers=3
maxfiles 1
content backup

nfs: yggdrasil_nfs
path /mnt/pve/yggdrasil_nfs
export /volume35/skadi
server 192.168.20.28
options vers=3
maxfiles 1
content images
upload_2016-4-28_10-56-31.png
 
please post the complete output of "qm config 101" and "qm showcmd 101"
 
# qm config 101
balloon: 1024
bootdisk: ide0
cores: 1
ide0: yggdrasil_nfs:101/vm-101-disk-3.raw,size=80G
memory: 2048
name: yggdrasil
net0: e1000=D6:F7:52:DA:4C:D3,bridge=vmbr0
onboot: 1
ostype: l26
sockets: 1
------------------
# qm showcmd 101
/usr/bin/systemd-run --scope --slice qemu --unit 101 -p KillMode=none -p CPUShares=1000 /usr/bin/kvm -id 101 -chardev socket,id=qmp,path=/var/run/qemu-server/101.qmp,server,nowait -mon chardev=qmp,mode=control -pidfile /var/run/qemu-server/101.pid -daemonize -name yggdrasil -smp 1,sockets=1,cores=1,maxcpus=1 -nodefaults -boot menu=on,strict=on,reboot-timeout=1000 -vga cirrus -vnc unix:/var/run/qemu-server/101.vnc,x509,password -cpu kvm64,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,enforce -m 2048 -k en-us -device pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e -device pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f -device piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2 -device usb-tablet,id=tablet,bus=uhci.0,port=1 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 -iscsi initiator-name=iqn.1993-08.org.debian:01:124172b3a77f -drive file=/mnt/pve/yggdrasil_nfs/images/101/vm-101-disk-3.raw,if=none,id=drive-ide0,format=raw,cache=none,aio=native,detect-zeroes=on -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0,bootindex=100 -netdev type=tap,id=net0,ifname=tap101i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown -device e1000,mac=D6:F7:52:DA:4C:D3,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300
 
That looks okay to me.. what exactly is the error message? and at what point does it occur?
 
Hello everybody!

I'm trying to migrate some VMs from a 3.4-1 cluster to a 4.1 cluster. Each VM runs on node but the storage is a NFS shared folder (from a Synology NAS), one shared folder for each VM.
I've backed-up my VMs and than I restored on the new cluster.

So I have VM atlas with storage called atlas_nfs (shared folder 1). After that, shut down atlas VM on old cluster.
When I restore the VM, I've restored it on skadi_nfs (shared folder 2 on the same NAS). Then I've tried to rename the new nfs hdd (skadi_nfs) to the old name. So I've destroyed (from Datacenter--> Storage) the skadi_nfs (shared folder 2) and created atlas_nfs (also shared folder 2). Than, I have edited the new VM's hdd to point to atlas_nfs instead of skadi_nfs. However now the machine is not bootable (hdd not bootable).

Any thoughts?
Regards
Vlad

I am not quite sure that I can follow this.. could you post step by step what did? If you boot the VM with a live cd, does the disk have the correct content?
 
My purpose is to migrate yggdrasil VM from one cluster to another. I'm doing this by doing a backup of yggdrasil from cluster 1 and than restoring it in cluster 2.
Here on the new cluster I build an empty machine (skadi) and then restore the original one (yggdrasil) over it.
However skadi was built on shared HDD from NAS: skadi_nfs which points to /volume35/skadi.
Until this point yggdrasil restored on cluster 2 using HDD skadi_nsf works just fine.
Now I would like to rename the shared HDD:
- step 0: I cannot rename a mountpoint (at least in GUI)
- step 1: delete the mountpoint from Datacenter-> Storage
- step 2: create mountpoint yggdrasil_nsf which points to /volume35/skadi (later I will try also to rename the shared folder from synology)
- step 3: edit new yggdrasil machine so that it uses a HDD on yggdrasil_nsf
At this point, yggdrasil failes to start.

Was that a little bit clearer? :)

P.S. Btw, Fabian, thanks for the time you put in, trying to figure this out with me.
 
That should work as far as I can tell.. Can you try booting with a LiveCD and checking the disks content?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!