Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
home_server:home_server_setup:kvm [2023-04-30 Sun wk17 17:43] – external edit 127.0.0.1home_server:home_server_setup:kvm [2023-07-29 Sat wk30 14:55] – [KVM Backup] baumkp
Line 6: Line 6:
   *[[https://linuxhint.com/install_kvm_debian_10/|Installing KVM on Debian 10]]   *[[https://linuxhint.com/install_kvm_debian_10/|Installing KVM on Debian 10]]
   *[[https://computingforgeeks.com/how-to-install-kvm-virtualization-on-debian/|How To Install KVM Hypervisor on Debian 11|10]]   *[[https://computingforgeeks.com/how-to-install-kvm-virtualization-on-debian/|How To Install KVM Hypervisor on Debian 11|10]]
-Basically to install the KVM Hypervisor: ''sudo apt install qemu qemu-kvm qemu-system qemu-utils libvirt-clients libvirt-daemon-system virtinst bridge-utils'' bridge-utils is optional.+  *[[https://www.cyberciti.biz/faq/install-kvm-server-debian-linux-9-headless-server/|How to install KVM server on Debian 9/10 Headless Server]] 
 +Basically to install the KVM Hypervisor: ''sudo apt install qemu-kvm qemu-system qemu-utils libvirt-clients libvirt-daemon-system virtinst bridge-utils'' bridge-utils is optional. 
 + 
 +  *''genisoimage'' is a package to create iso images 
 +  *''libguestfs-tools'' is a library to access and modify VM disk images 
 +  *''libosinfo-bin'' is a library with guest operating systems information to assist VM creation
  
 Use the built-in clone facility: ''sudo virt-clone %%--%%connect=qemu:%%//%%example.com/system -o this-vm -n that-vm %%--%%auto-clone''. Use the built-in clone facility: ''sudo virt-clone %%--%%connect=qemu:%%//%%example.com/system -o this-vm -n that-vm %%--%%auto-clone''.
Line 66: Line 71:
     - Create a snapshot of the VM and direct all changes to the snapshot allowing safe backup of main VM file     - Create a snapshot of the VM and direct all changes to the snapshot allowing safe backup of main VM file
     - Active back commit the snapshot and verify back commit worked     - Active back commit the snapshot and verify back commit worked
 +
 +====KVM Offline Backup====
 +Note this only works on VMs that are shut down.
 +  -''sudo virsh list --all'' to list all KVM virtual machines.
 +  -''sudo virsh dumpxml VM_name | grep -i "source file"'' to list the VM source file location noted in the VM XML file.
 +  -''sudo virsh dumpxml vm-name > /path/to/xm_file.xml'' to archive/backup the VM XML definition file.
 +  -''sudo mv /working/path/VM_image.qcow2 /path/to/'' to archive/move the VM file. (use cp to copy / backup the VM file)
 ====kvm back-up links==== ====kvm back-up links====
   *[[https://schh.medium.com/backup-and-restore-kvm-vms-21c049e707c1|Backup and Restore KVM Vms]]   *[[https://schh.medium.com/backup-and-restore-kvm-vms-21c049e707c1|Backup and Restore KVM Vms]]