cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar








Etc


Reference














.

middleware:virtualization:kvm:backup-restore.html



KVM CLI Commands Cheet Sheat and KVM Configuration Examples

KVM : How to backup/restore KVM Guest OS

Method 1

Backup

# cp -p /etc/libvirt/qemu/serv01.xml /backup/
# cp -p /var/lib/libvirt/images/serv01.img /backup/

Restore

# cp -p /backup/serv01.xml /etc/libvirt/qemu/
# cp -p /backup/serv01.img /var/lib/libvirt/images/

If you copy, not move the Images, Change uuid、MAC address.
# vi /etc/libvirt/qemu/server01.xml


# virsh define /etc/libvirt/qemu/serv01.xml 
# virsh start serv01
# virsh list --all


Method 2

Backup

# virsh save kvm_centos7 /var/kvm/save/kvm_centos7_01.vmsave

Restore

# virsh restore /var/kvm/save/kvm_centos7_01.vmsave



middleware/virtualization/kvm/backup-restore.html.txt · Last modified: 2019/06/08 by admin

Page Tools