Using the package manager (
pacman) inside the virtual machine gives me corrupted packages randomly, as in:
error: <package>: signature from "<whomever>" is invalid :: File /mnt/var/cache/pacman/pkg/<package>.pkg.tar.xz is corrupted (invalid or corrupted packgage (PGP signature))
I have the following setup:
- Arch Linux host (kernel
- Which is then using UFW firewall (
- Which is then configured to only allow connections through the
tun0which is a network interface created by OpenVPN (
The network connection works properly in every respect on the host for at least half a decade now. I try to setup a guest, which is also an Arch Linux using QEMU (
4.1.0) with the following options:
qemu-system-x86_64 \ -name 'Arch Linux' \ -display vnc=:0 \ -m size=8G \ -enable-kvm \ -cpu host \ -smp cores=2,threads=2 \ -k en-us \ -boot order=d \ -cdrom "<iso>" \ -drive "if=pflash,format=raw,readonly,file=<file>" \ -drive "if=pflash,format=raw,file=<file>" \ -drive "if=virtio,format=qcow2,file=<file>"
My understanding is that it uses the
-nic user by default if I don't specify anything extra for it and the guest indeed does have internet connection.
I tried reinstalling the entire thing a million times, on different physical locations (on SSD, on HDD) hoping that the virtual hard disk causes the problem -- but of course it did not fix anything. For the sake of completeness the virtual drive is created as follows:
qemu-img create -f qcow2 "<file>" 16G
Sometimes when I try enough times and I get lucky and I end up having a working installation with a working
docker installation inside the guest,
docker gives me the same random errors about corrupted data while downloading the containers -- which makes me believe that it is a network configuration related error. I tried using
virt-manager) on top of QEMU hoping that it's only me who configured something wrong but I faced with the same problem again.
There was a point where my setup was using something like the following as the network configuration:
# ... -net "user,hostfwd=tcp::2222-:22,hostfwd=tcp::8000-:8000,hostfwd=tcp::4200-:4200,hostfwd=tcp::9222-:9222,smb=<path>" \ -net nic,model=virtio \ # ...
But that's not working anymore either. At this point I'm pretty much puzzled on what I'm doing wrong...