Skip to content

qemu-kvm

Installation

sudo pacman -S qemu virt-manager virt-viewer dnsmasq vde2 bridge-utils openbsd-netcat ebtables iptables libguestfs
sudo systemctl enable --now libvirtd
sudo usermod -aG libvirt $(whoami)
sudo systemctl restart libvirtd

reference

Windows Guest

Preparation

You can download windows from https://massgrave.dev/genuine-installation-media.

I went with: https://drive.massgrave.dev/en-us_windows_10_consumer_editions_version_22h2_updated_june_2025_x64_dvd_aace2d00.iso

Deny windows internet access during installation so it won't download unnecessary updates and force you to login. This leaves you totally isolated —without access to either the internet or the files on host. To access host files you need virtio-win and winfsp. Download these files the on the host machine and convert it into an iso which you can add as a cdrom in qemu virt-manager.

vector@ThinkPadP14s ~/windows $ ls
virtio-win-0.1.240.iso  winfsp-2.0.23075.msi
sudo pacman -S xorriso
xorriso -as mkisofs -o extras.iso -J -R -V "Extras" windows

Booting Windows Installation Medium

In virt-manager click the Create new virtual machine button. Proceed through all 4 steps choosing the appropriate options. In step 5/5, tick Customize configuration before install. (1)

  1. Tick this. 1751901713.png

Now inside the custom configuration window:

Step 1: Set boot method to BIOS in Overview tab.

Step 2: In NIC tab disable internet access during installation by unticking Link state: active (1)

  1. Disable the internet before proceeding to boot live disk 1751840252.png

Step 3: Now initiate the process of adding a virual cd-rom device containing extra.iso disk by pressing Add Hardware button on bottom left:

Add Hardware > Storage > Device type: CDROM device > Manage > Browse Local > Select the extra.iso. (1)

  1. Add cdrom 1751902458.png

Step 4: In Memory tab, check Enable shared memory: (1)

  1. Enable shared memory 1751903315.png

Step 5: Now add the shared folder (between host archlinux and guest windows ):

Add Hardware > File System > Driver: virtiofs, source path: path to shared directory, target path: a name, not path (1)

  1. Set source path to shared directory (/home/vector/winshared for me) and use some name (not literal path), for Target path. 1751903857.png

Finally, press Begin Installation on top left of the window and complete the installation.

If you get an error about default network interface

After installation of the VM and a reboot of the host device I had to run:

sudo virsh net-autostart default 
sudo virsh net-start default

Installing virtio-win and winfsp

Now you're inside the freshly booted windows vm.

You'll find CD Drive Extras in This PC window. Open it and transfer the virtio-win iso and winfsp msi to the desktop by dragging it. Mount the virtio-win iso and install it first. Install virtio-win-gt-x64 and virtio-win-guest-tools by following the installation wizard steps. Next install winfsp with the msi file and reboot.

After the reboot: Win + R > services.msc.

Scroll down to VirtIO-FS Service and Start it. If it starts enable to run automatically. If it doesn't you'd need to troubleshoot on your own.

VM to Camera IP network

I couldn't install ONVIF Device Manager (odm-v2.2.250r.msi https://sourceforge.net/projects/onvifdm/files/) in wine so I decided to do install it in a Windows VM. But here the challenge would be getting the vm to access the ip camera network that the host is connected to. I'll detail the setup that achieved this goal.

I don't use networkmanager btw.

Bridge configuration

/etc/systemd/network/br0.netdev
[NetDev]
Name=br0
Kind=bridge
/etc/systemd/network/br0.network
[Match]
Name=br0

[Network]
DHCP=yes

Bind Ethernet Interface to Bridge

Where enp5s0 is the interface connected to the IP camera network.

/etc/systemd/network/enp5s0.network
[Match]
Name=enp5s0

[Network]
Bridge=br0

Enable systemd-networkd

sudo systemctl enable systemd-networkd
sudo systemctl restart systemd-networkd

Add network interface in virt-manager

Show virtual hardware details
    > Add Hardware

Add NIC with this config:

1751841226.png

In my case the device model had to be e1000e and not virtio.

Now you can reboot.

Veify br0 is working

ip addr show br0

# Verify your ethernet interface is part of the bridge
bridge link show

Comments