How to use qemu correctly

The point is how do the guest machine and the host OS communicate? Is the guest sending a stream of packets trough a real network interface, or through a virtual interface created by the host OS?

If you have a HW-NIC available for the Ubuntu guest machine, you will create a bridge device on the IPFire host. This will logically connect the physical interface from the IPFire host with a virtual one used by the Ubuntu guest, facilitating network communications through the physical NIC.

If you don’t have a separate HW-NIC to assign to the Ubuntu guest, you can utilize a tun/tap device to create a virtual network interface. A tun/tap device is a kernel network device, which operates at either layer 3 (tun) or layer 2 (tap) of the OSI model, allowing you to create virtual network interfaces. In this context, it will help to establish a virtual network card to enable the Ubuntu VM to communicate with the green zone network.

No, using virt-manager is not a necessity. You can automate the startup of your VM using the virsh command-line tool that comes with libvirt. To set a VM to start automatically, you would use the following command in your IPFire host’s terminal:

virsh autostart VM_name

Replace “VM_name” with the actual name of your VM. This allows you to control VM autostart settings without a graphical user interface.

Here a tutorial and some reading material on everything lib-virt on the console.

3 Likes