Create libvirt Virtual Network From an XML File

I have a need to setup a virtual network on a VM-host server. Usually, I just use the virt-manager gui application to create this task. However, I’d like to do this via command line this time. Why? Well, why not? It’s always fun to learn new thing. :) libvirt keeps network configuration in XML files under /etc/libvirt/qemu/networks/. Here is what I have on one of my machines: # ls -1 /etc/libvirt/qemu/networks/*xml /etc/libvirt/qemu/networks/classroom.xml /etc/libvirt/qemu/networks/default.xml /etc/libvirt/qemu/networks/kubernetes.xml /etc/libvirt/qemu/networks/minikube-net.xml /etc/libvirt/qemu/networks/other.xml /etc/libvirt/qemu/networks/storage.xml /etc/libvirt/qemu/networks/student.xml We can use also list all the available libvirt-related virtual networks using virsh command: ...

March 22, 2021 · 3 min · 543 words · kenno

How to convert vdi to qcow2 image

vdi file is a type of disk image used by VirtualBox. qcow2, on the other hand, is the format of disk image used by KVM. Recently, I want to move some existing virtual machines running on VirtualBox to KVM. To do that I need to convert the disk image from vdi to qcow2. Here’s one way to achieve that: # qemu-img convert -f vdi -O qcow2 disk.vdi disk.qcow2 Ref: How to convert VirtualBox vid to KVM qcow2

July 3, 2016 · 1 min · 77 words · kenno