home_server:home_server_setup:kvm

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
home_server:home_server_setup:kvm [2023-06-19 Mon wk25 05:07] – [KVM Setup] baumkphome_server:home_server_setup:kvm [2023-07-29 Sat wk30 15:08] – [KVM Offline 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]]
 +  *[[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. 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.
  
Line 70: 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====
 +<fc #ff0000>Note this only works on VMs that are shut down</fc>
 +  -''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 cp -p /working/path/VM_image.qcow2 /path/to/'' to archive/move the VM file.
 +  -''%%sudo virsh undefine vm-name --remove-all-storage%%'' to undefine the VM and remove its storage. <color #ed1c24>(Be careful with this one!)</color>
 +  -''sudo virsh define --file <path-to-xml-file>'' to import (define) a VM from an XML file.
 +
 +
 +References:
 +  *[[https://ostechnix.com/export-import-kvm-virtual-machines-linux/|How To Export And Import KVM Virtual Machines In Linux]]
 ====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]]
  • /app/www/public/data/pages/home_server/home_server_setup/kvm.txt
  • Last modified: 2024-02-18 Sun wk07 18:09
  • by baumkp