Open TheMuso opened 1 month ago
Hi, thanks for reaching out! I was able to re-create this issue and may have found a partial fix to it (I am getting a new error, but I don't know if it's because I am bad at networking or it's NixOS being wierd). Try adding this to your NixOS config:
virtualisation.libvirtd = {
enable = true;
allowedBridges = [
"virbr0"
"br0"
];
};
I was able to isolate at least one of the issues to the way NixOS handles QEMU config, and the fact that QEMU is looking for the /etc/qemu/bridge.conf
when in bridge mode, which NixOS defines in the libvird module. It would be very helpful if you could provide more info, a full Qickemu output and more info on how you have configured the bridge would be great!
EDIT: sorry, just saw the guide on bridge networking you followed.
This is the output I get when attempting to run a VM. It is the same with and without your suggested Nix configuration change.
[themuso@barton:~/VMs]$ quickemu --vm ./nixos-23.11-minimal.conf
~/VMs ~/VMs
Quickemu 4.9.4 using /nix/store/rp0r6rfw5imlgz8x9w54n2w3jq8bg37b-qemu-8.2.3/bin/qemu-system-x86_64 v8.2.3
- Host: NixOS 24.05 (Uakari) running Linux 6.8 (barton)
- CPU: AMD Ryzen 5 2600X Six-Core Processor
- CPU VM: 1 Socket(s), 2 Core(s), 2 Thread(s), 8G RAM
- BOOT: EFI (Linux), OVMF (/nix/store/46gqm6dd7g25jrgcsf9044s0cbg9jnl7-OVMF-202402-fd/FV/OVMF_CODE.fd), SecureBoot (off).
- Disk: nixos-23.11-minimal/disk.qcow2 (32G)
Just created, booting from nixos-23.11-minimal/latest-nixos-minimal-x86_64-linux.iso
- Boot ISO: nixos-23.11-minimal/latest-nixos-minimal-x86_64-linux.iso
- Display: SDL, virtio-vga-gl, GL (on), VirGL (on)
- Sound: intel-hda
- ssh: On host: ssh user@localhost -p 22220
- WebDAV: On guest: dav://localhost:9843/
- 9P: On guest: sudo mount -t 9p -o trans=virtio,version=9p2000.L,msize=104857600 Public-themuso ~/Public
- Network: Bridged (br0)
- Monitor: On host: nc -U "nixos-23.11-minimal/nixos-23.11-minimal-monitor.socket"
or : socat -,echo=0,icanon=0 unix-connect:nixos-23.11-minimal/nixos-23.11-minimal-monitor.socket
- Serial: On host: nc -U "nixos-23.11-minimal/nixos-23.11-minimal-serial.socket"
or : socat -,echo=0,icanon=0 unix-connect:nixos-23.11-minimal/nixos-23.11-minimal-serial.socket
cat: nixos-23.11-minimal/nixos-23.11-minimal.pid: No such file or directory
- Process: Starting ./nixos-23.11-minimal.conf as nixos-23.11-minimal ()
That's odd... That's not the output I have with or without the changes whatsoever. I assume you have been able to get VMs to work just fine without bridge networking?
Yes, I have.
Have you tried connecting to the VM in ways other then the graphical console like connecting bia TTY? You can run ps -A | grep nixos
to see if the VM is running. Sorry, I don't terribly know what's going on with this issue.
Sorry, I should have mentioned that in my initial report. I check for any qemu processes but there are none. It is as ift qemu is a dumb binary that takes any arguments and does nothing.
I decided to set up the bridge using systemd-network instead. No difference.
Hey, sorry for the late response. I am kind of stuck here. @flexiondotorg may know more, but I am not sure how to fix your issue....
Describe the bug
Qemu fails to start when using quickemu to set up and run a virtual machine configured to use bridged networking. Other than the console output from quickemu itself, qemu does not provide any failure or error messages on the console.
Steps To Reproduce
Expected behavior
Qemu should load and display a window that shows the booting of the virtual machine.
Additional context
When running the virtual machine for the first time, quickemu creates a shell script in the same directory where the downloaded ISO and virtual machine disk image is located. This script can also be used to run qemu, and when doing so, there is no output from qemu to show any failure. I tried editing this script to manually specify the location of the qemu-bridge-helper binary as specified in the qemu manpage, with no change to the result.
Notify maintainers
@fedx-sudo @flexiondotorg
Metadata