compared with
Current by Travis Paul
on Apr 18, 2016 15:36.

(show comment)
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (3)

View Page History
{code}

h3. Preserving snapshots
If you want to keep the snapshots for a VM when migrating, you may find this process useful.
First move the zfs datasets to the new server, where _@last-snapshot_ is the last snapshot you want to keep. Every snapshot before _@last-snapshot_ will be migrated. You will need to repeat this step for every disk.

{code}
[root@source-host ~]# zfs send -R zones/$UUID-disk0@last-snapshot | ssh destination-host zfs receive zones/$UUID-disk0
{code}

Then you need to send the VM's metadata and create the VM. The JSON command updates the metadata so that vmadm doesn't attempt to create the ZFS datasets.
{code}
[root@source-host ~]# vmadm get $UUID | json -e "for(i in this.disks){this.disks[i].nocreate=true;}this.i=undefined;" | ssh destination-host vmadm create
{code}

h1. Changing the Virtual Hardware of a KVM Zone