QEMU VM startup timeout

Melone145

New Member
Mar 2, 2024
6
0
1
Hello everyone,

I installed a firewall on my server following these instructions that I wrote myself:

https://github.com/Melone155/Firewall-Setup-under-Proxmix/tree/main

Now I have the following problem: when I add a WAN and LAN bridge as described in the instructions, I get the following error message:

Code:
Header
Proxmox
Virtual Environment 9.1.2
Virtual Machine 100 (Firewall) on node 'FH-001'
No Tags
Logs
()
TASK ERROR: start failed: command '/usr/bin/kvm -id 100 -name 'Firewall,debug-threads=on' -no-shutdown -chardev 'socket,id=qmp,path=/var/run/qemu-server/100.qmp,server=on,wait=off' -mon 'chardev=qmp,mode=control' -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect-ms=5000' -mon 'chardev=qmp-event,mode=control' -pidfile /var/run/qemu-server/100.pid -daemonize -smbios 'type=1,uuid=34ad2786-04a3-460b-8d92-7f207a1e0686' -smp '4,sockets=2,cores=2,maxcpus=4' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' -vnc 'unix:/var/run/qemu-server/100.vnc,password=on' -cpu host,+kvm_pv_eoi,+kvm_pv_unhalt -m 4056 -object '{"id":"throttle-drive-ide2","limits":{},"qom-type":"throttle-group"}' -object 'iothread,id=iothread-virtioscsi0' -object '{"id":"throttle-drive-scsi0","limits":{},"qom-type":"throttle-group"}' -global 'PIIX4_PM.disable_s3=1' -global 'PIIX4_PM.disable_s4=1' -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' -device 'pci-bridge,id=pci.3,chassis_nr=3,bus=pci.0,addr=0x5' -device 'vmgenid,guid=7298b95f-67b9-4598-abcf-aebaca083961' -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' -device 'VGA,id=vga,bus=pci.0,addr=0x2' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' -iscsi 'initiator-name=iqn.1993-08.org.debian:01:6ddf7ddad53' -blockdev '{"driver":"throttle","file":{"cache":{"direct":false,"no-flush":false},"driver":"raw","file":{"aio":"io_uring","cache":{"direct":false,"no-flush":false},"driver":"file","filename":"/var/lib/vz/template/iso/OPNsense-24.7-dvd-amd64.iso","node-name":"e7d455f4914f024187f482f9da48d51","read-only":true},"node-name":"f7d455f4914f024187f482f9da48d51","read-only":true},"node-name":"drive-ide2","read-only":true,"throttle-group":"throttle-drive-ide2"}' -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=101' -device 'virtio-scsi-pci,id=virtioscsi0,bus=pci.3,addr=0x1,iothread=iothread-virtioscsi0' -blockdev '{"detect-zeroes":"on","discard":"ignore","driver":"throttle","file":{"cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"raw","file":{"aio":"io_uring","cache":{"direct":true,"no-flush":false},"detect-zeroes":"on","discard":"ignore","driver":"host_device","filename":"/dev/pve/vm-100-disk-0","node-name":"e0bf565c58599febe8de731ee07d8b5","read-only":false},"node-name":"f0bf565c58599febe8de731ee07d8b5","read-only":false},"node-name":"drive-scsi0","read-only":false,"throttle-group":"throttle-drive-scsi0"}' -device 'scsi-hd,bus=virtioscsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,device_id=drive-scsi0,bootindex=100,write-cache=on' -netdev 'type=tap,id=net0,ifname=tap100i0,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' -device 'virtio-net-pci,mac=BC:24:11:A2:42:60,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=102,host_mtu=1500' -netdev 'type=tap,id=net1,ifname=tap100i1,script=/usr/libexec/qemu-server/pve-bridge,downscript=/usr/libexec/qemu-server/pve-bridgedown,vhost=on' -device 'virtio-net-pci,mac=BC:24:11:28:8E:99,netdev=net1,bus=pci.0,addr=0x13,id=net1,rx_queue_size=1024,tx_queue_size=256,host_mtu=1500' -machine 'hpet=off,type=pc+pve0'' failed: got timeout

If I add only one of the two, it works without any problems.
 
Hi,
can you start the VM when you manually specify a large timeout, e.g. qm start 100 --timeout 300? If yes, how long does it take to actually start?

For a failed attempt, are there any messages in the system logs/journal around the time of the issue? Please also share the VM configuration qm config 100 and network configuration /etc/network/interfaces.
 
I tried using your start command and the VM starts again, but in the long run, starting it via CMD via the WebGUI and autostart is not an option. It's better to use autostart.

And here is my network interface configuration and VM configuration.


Code:
auto vmbr0
iface vmbr0 inet static
        address XXXX/XX
        gateway XXXXXX
        bridge-ports nic0
        bridge-stp off
        bridge-fd 0
        bridge_maxwait 0
        post-up echo 1 > /proc/sys/net/ipv4/ip_forward
        post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp -m multiport ! --dport 22,8006 -j DNAT --to 10.0.10.2
        post-up iptables -t nat -A PREROUTING -i vmbr0 -p udp -j DNAT --to 10.0.10.2


auto vmbr1
iface vmbr1 inet static
        address 10.0.10.1/30
        bridge-ports none
        bridge-stp off
        bridge-fd 0
        post-up iptables -t nat -A POSTROUTING -s '10.0.10.0/30' -o vmbr0 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '10.0.10.0/30' -o vmbr0 -j MASQUERADE
#Firewall WAN

auto vmbr2
iface vmbr2 inet manual
        bridge-ports none
        bridge-stp off
        bridge-fd 0
#Firewall LAN1

Code:
boot: order=scsi0;net0
cores: 1
cpu: host
memory: 2048
meta: creation-qemu=10.1.2,ctime=1765313258
name: Firewall
net0: virtio=BC:24:11:73:91:AE,bridge=vmbr1,firewall=1
net1: virtio=BC:24:11:36:1D:A6,bridge=vmbr2,firewall=1
numa: 0
ostype: l26
scsi0: local-zfs:vm-100-disk-0,iothread=1,size=32G
scsihw: virtio-scsi-single
smbios1: uuid=d64a4061-b9b5-4bec-839a-09c952155c1e
sockets: 1
vmgenid: f1c412dd-f699-4bd2-a559-f6df5530e71e
 
Approximately how many seconds did it take to start?