Changes for page libvirt

Last modified by Sebastian Marsching on 2023/05/16 20:12

From version 8.2
edited by Sebastian Marsching
on 2022/03/27 14:20
Change comment: Added tag [Linux]
To version 9.1
edited by Sebastian Marsching
on 2022/07/17 14:20
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,3 +1,5 @@
1 +{{toc/}}
2 +
1 1  # Graceful shutdown of virtual machines / domains when shutting down libvirtd
2 2  
3 3  When libvirtd is stopped, all virtual machines are destroyed. There is a little script that does a shutdown of all virtual machines before stopping libvirtd:
... ... @@ -41,5 +41,16 @@
41 41   /usr/local/bin/libvirt-shutdown-domains || true
42 42   echo " done"
43 43   fi
46 +```
44 44  
48 +# Converting OVA images for use with libvirt
49 +
50 +OVA images can be [imported](https://www.redhat.com/en/blog/importing-vms-kvm-virt-v2v) into libvirt using the `virt-v2v` utility (from the `libguestfs-tools` Ubuntu package).
51 +
52 +They can be imported directly using the `libvirt` output method, but I prefer only generating the necessary files, using the `local` output method. This way, I can easily adjust the VM settings before importing them into libvirt.
53 +
54 +```bash
55 +virt-v2v -i ova /path/to/source.ova -o local -of qcow2 -os /path/to/destination/dir
45 45  ```
57 +
58 +This will create an XML file with the VM configuration and a QCOW2 file for each disk in `/path/to/destination/dir`. The XML file can be adjusted and then imported using `virsh define`.