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¶
- https://gist.github.com/tatumroaquin/c6464e1ccaef40fd098a4f31db61ab22
- https://www.youtube.com/watch?v=UCy25VFMJCE
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.
- virtio-win (.iso file): https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/
- winfsp (.msi installer): https://github.com/winfsp/winfsp/releases
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)
- Tick this.
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)
- Disable the internet before proceeding to boot live disk
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)
- Add cdrom
Step 4: In Memory tab, check Enable shared memory
: (1)
- Enable shared memory
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)
- Set source path to shared directory (/home/vector/winshared for me) and use some name (not literal path), for Target path.
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:
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¶
Bind Ethernet Interface to Bridge¶
Where enp5s0
is the interface connected to the IP camera network.
Enable systemd-networkd¶
Add network interface in virt-manager¶
Add NIC with this config:
In my case the device model had to be e1000e
and not virtio
.
Now you can reboot.