I would like to install a KVM type-1 hypervisor. This hypervisor should run two guest operating-systems. Both guest operating-systems need one IPv4 address from 192.168.11.0/24 network and I guess that I should configure one IPv4 address to hypervisor itself for management purposes? I am familiar with bridges under Linux and VLAN-subinterfaces, but what is the recommended practice for such KVM installation, i.e. which interfaces should I create in hypervisor and which interfaces should I create for virtual-machines with virt-install and how should I configure management for hypervisor itself?
1 Answer
I have never used virt-install
, I always use virsh define file.xml
. But a look at the man page tells me that --network bridge:tun0
is wrong. You need --network=bridge=br0
.
I am not a libvirt
/qemu
expert thus I don't know whether you can create a tun
device and make libvirt
use it. Usually virtual interfaces are created dynamically when a VM is started and get connected to the bridge (and/or network).
In libvirt
's XML it looks like this:
<interface type='bridge'>
<mac address='52:54:00:42:c4:c8'/>
<source bridge='br0'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
virsh/virt-install
is a bit much. Abstracting like that will only remove you - and your understanding of what makes it tick - from the whole process. This makes sense when talking about spawning vms programatically in great number - but if you just want to launch two vms occasionally then you'd probably get a better feel for how its done inman qemu
.qemu-kvm
isnt a thing anymore - for a while it was the kernel support was getting baked-in to project, but its justqemu
now. And yeah - those tools are indirect layers atop it. You can just callqemu
from the cmdline. Check itsman
pages. Its easy.