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

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

Changes (3)

View Page History

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.

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

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.
[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

h1. Changing the Virtual Hardware of a KVM Zone