Live migration of existing machines

diablo2050

New Member
Oct 6, 2019
9
0
1
39
Hello,
Currently we have a single node with several production VMs, and we have a new empty node that we want to setup a cluster between them.
They are the same version proxmox 6 and i know that i need to create the cluster on the first node and have the second empty node join the cluster so i don't lose the production VMs, i was testing the live migration but i'm not sure will it affect the live VMs if i migrate them to the empty node or not. Any input is highly appreciated.
 
What do you mean by will it affect the live VM's if I migrate them to the empty node?

Sounds like you don't have shared storage. Last I knew online live migration wasn't possible without shared storage of some sort.
 
In theory you should be ok and the VM's should have no downtime, but the possibility is always there. Ive been using live migration for about 7 years now and I would say it fails roughly 5-10% of the time. Typically causing the VM to reboot. I tend to perform live migrations during maintenance windows and not during active hours to try and stay on the safe side.
 
I would suggest you do some testing with test VMs and you can see how your cluster setup behaves.
 
I tried using a ZFS shared storage and a non shared storage and both seemed to work fine with not downtime.
 
Has anyone tried migration using a non shared storage ? and will it have any impact on anything ?

The downtime should be minimal like already mentioned by the previous comments. You will have quite a bit network and disk IO load because the disk needs to be migrated before the VM can be switched over to the other node.
 
I've currently set up a cluster on a production node and joined in a free node, the issue here is i can't migrate a lot of the VMs and the error is as follows:

2019-10-09 13:49:49 starting migration of VM 126 to node 'cloudhost3' (38.76.31.18)
2019-10-09 13:49:50 found local disk 'localdir2:126/vm-113-disk-1.qcow2' (in current VM config)
2019-10-09 13:49:50 found local disk 'localdir2:126/vm-126-disk-0.qcow2' (via storage)
2019-10-09 13:49:50 copying disk images
cannot import format raw+size into a file of format qcow2
send/receive failed, cleaning up snapshot(s)..
2019-10-09 13:49:51 ERROR: Failed to sync data - command 'set -o pipefail && pvesm export localdir2:126/vm-126-disk-0.qcow2 raw+size - -with-snapshots 0 | /usr/bin/ssh -e none -o 'BatchMode=yes' -o 'HostKeyAlias=cloudhost3' root@38.76.31.18 -- pvesm import localdir2:126/vm-126-disk-0.qcow2 raw+size - -with-snapshots 0' failed: exit code 255
2019-10-09 13:49:51 aborting phase 1 - cleanup resources
2019-10-09 13:49:51 ERROR: found stale volume copy 'localdir2:126/vm-126-disk-0.qcow2' on node 'cloudhost3'
2019-10-09 13:49:51 ERROR: migration aborted (duration 00:00:02): Failed to sync data - command 'set -o pipefail && pvesm export localdir2:126/vm-126-disk-0.qcow2 raw+size - -with-snapshots 0 | /usr/bin/ssh -e none -o 'BatchMode=yes' -o 'HostKeyAlias=cloudhost3' root@38.76.31.18 -- pvesm import localdir2:126/vm-126-disk-0.qcow2 raw+size - -with-snapshots 0' failed: exit code 255
TASK ERROR: migration aborted


The configuration file is as follows:


Code:
bootdisk: virtio0
cores: 2
ide2: none,media=cdrom
memory: 1024
name: pxe-boot
net0: virtio=8E:6D:2D:9A:A3:56,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsihw: virtio-scsi-pci
smbios1: uuid=e33f2bd8-4d26-4563-b05b-f7a913dea348
sockets: 1
virtio0: localdir2:126/vm-113-disk-1.qcow2,size=87G
vmgenid: 39c0b912-d751-4aec-bbf7-51fc4521f21b
 
Remove "stale volume copy 'localdir2:126/vm-126-disk-0.qcow2' on node 'cloudhost3'" and migration should work.
 
Seems that you are wrong and there is vm-126-disk-0.qcow2
Code:
2019-10-09 13:49:51 ERROR: found stale volume copy 'localdir2:126/vm-126-disk-0.qcow2' on node 'cloudhost3'
 

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!