Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
home_server:home_server_setup:kvm [2024-02-18 Sun wk07 18:08] – [Change the Disk Allocated Size] baumkp | home_server:home_server_setup:kvm [2025-02-08 Sat wk06 17:11] (current) – [kvm back-up links] baumkp | ||
---|---|---|---|
Line 5: | Line 5: | ||
*[[https:// | *[[https:// | ||
*[[https:// | *[[https:// | ||
- | *[[https:// | + | *[[https:// |
*[[https:// | *[[https:// | ||
Basically to install the KVM Hypervisor: '' | Basically to install the KVM Hypervisor: '' | ||
Line 64: | Line 64: | ||
---- | ---- | ||
=====KVM Backup===== | =====KVM Backup===== | ||
- | There seems to be 4 main ways to backup a KVM virual machine | + | There seems to be 3 main ways to backup a KVM virual machine: |
- | - Copy the main file(s) while the VM is running | + | |
- | - Not recommended as file corruption will probably occur as the VM operation may and probably will modify the file during the copy process | + | |
- Shutdown the VM first and then copy the file. Start the VM again after the copy is completed. | - Shutdown the VM first and then copy the file. Start the VM again after the copy is completed. | ||
- Use virsh backup-begin command to allow live full backup | - Use virsh backup-begin command to allow live full backup | ||
Line 72: | Line 70: | ||
- 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 | ||
+ | * Copy the main file(s) while the VM is running | ||
+ | - <fc # | ||
====KVM Offline Backup==== | ====KVM Offline Backup==== | ||
<fc # | <fc # | ||
Line 82: | Line 81: | ||
-'' | -'' | ||
+ | |||
+ | *[[https:// | ||
References: | References: | ||
*[[https:// | *[[https:// | ||
====kvm back-up links==== | ====kvm back-up links==== | ||
- | *[[https:// | + | *[[https:// |
- | *[[https:// | + | *[[https:// |
*[[https:// | *[[https:// | ||
*[[https:// | *[[https:// | ||
Line 105: | Line 106: | ||
* '' | * '' | ||
* '' | * '' | ||
+ | * '' | ||
* virsh : start, shutdown, destroy, reboot, or pause (suspend / resume) | * virsh : start, shutdown, destroy, reboot, or pause (suspend / resume) | ||
* '' | * '' | ||
Line 123: | Line 125: | ||
====Change the Disk Allocated Size==== | ====Change the Disk Allocated Size==== | ||
How to change the amount of disk space assigned to a KVM *[[https:// | How to change the amount of disk space assigned to a KVM *[[https:// | ||
- | *First turn off the virtual machine to be checked | + | *First, **turn off the virtual machine** to be checked |
*Next find the file location of the virtual machine to be checked | *Next find the file location of the virtual machine to be checked | ||
*Next query the file: '' | *Next query the file: '' | ||
*Next increase the allowed size of the vm disk: '' | *Next increase the allowed size of the vm disk: '' | ||
*We need to make a backup of the VM disk: '' | *We need to make a backup of the VM disk: '' | ||
- | *We can check the file system on the VM: '' | + | *We can check the file system on the VM: '' |
*We the backup VM disk to create a new expanded drive: '' | *We the backup VM disk to create a new expanded drive: '' | ||
Line 136: | Line 138: | ||
====Shrink the Disk File==== | ====Shrink the Disk File==== | ||
*Locate the QEMU disk file | *Locate the QEMU disk file | ||
- | *Shut down the VM. | + | |
*Copy the VM file to a back-up: '' | *Copy the VM file to a back-up: '' | ||
*Option #1: Shrink your disk without compression (better performance, | *Option #1: Shrink your disk without compression (better performance, |