VM slow to start booting

cincura.net

New Member
Nov 27, 2023
2
0
1
www.tabsoverspaces.com
I have a VM with this configuration:

Code:
agent: 1
bios: seabios
boot: order=usb0
cores: 4
cpu: host
hostpci0: 0000:06:00.0,pcie=1
hotplug: 0
machine: q35
memory: 10240
meta: creation-qemu=8.0.2,ctime=1695484223
name: ***
numa: 0
onboot: 1
ostype: l26
scsihw: virtio-scsi-single
smbios1: uuid=c9d075b1-6bac-40b7-9ec9-2f5564a3dab9
sockets: 1
startup: order=5,up=90
usb0: host=0951:1666,usb3=yes
usb1: host=0bda:8153,usb3=yes
vmgenid: 2f4c0b5f-44a8-4714-877a-e3804a980396

The hostpci0 is a SATA HBA, usb0 is USB stick that the VM is booting from (Unraid) and usb1 is a NIC.

When the VM is started it spends ~10 seconds in the "SeaBIOS ... Machine UUID ..." screen before showing the Proxmox logo and starting booting. My others VMs (not identical configurations) spend barely a second on that screen.

I tried disabling ROM BAR on hostpci0, but no change in behavior.

Any ideas what I could do to mitigate this slow part of start?

Versions:

Code:
proxmox-ve: 8.0.2 (running kernel: 6.2.16-19-pve)
pve-manager: 8.0.4 (running version: 8.0.4/d258a813cfa6b390)
pve-kernel-6.2: 8.0.5
proxmox-kernel-helper: 8.0.3
proxmox-kernel-6.2.16-19-pve: 6.2.16-19
proxmox-kernel-6.2: 6.2.16-19
proxmox-kernel-6.2.16-15-pve: 6.2.16-15
pve-kernel-6.2.16-3-pve: 6.2.16-3
ceph-fuse: 17.2.6-pve1+3
corosync: 3.1.7-pve3
criu: 3.17.1-2
glusterfs-client: 10.3-5
ifupdown2: 3.2.0-1+pmx6
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-4
libknet1: 1.28-pve1
libproxmox-acme-perl: 1.4.6
libproxmox-backup-qemu0: 1.4.0
libproxmox-rs-perl: 0.3.1
libpve-access-control: 8.0.5
libpve-apiclient-perl: 3.3.1
libpve-common-perl: 8.0.10
libpve-guest-common-perl: 5.0.5
libpve-http-server-perl: 5.0.5
libpve-rs-perl: 0.8.6
libpve-storage-perl: 8.0.3
libspice-server1: 0.15.1-1
lvm2: 2.03.16-2
lxc-pve: 5.0.2-4
lxcfs: 5.0.3-pve3
novnc-pve: 1.4.0-2
proxmox-backup-client: 3.0.4-1
proxmox-backup-file-restore: 3.0.4-1
proxmox-kernel-helper: 8.0.3
proxmox-mail-forward: 0.2.0
proxmox-mini-journalreader: 1.4.0
proxmox-widget-toolkit: 4.0.9
pve-cluster: 8.0.4
pve-container: 5.0.5
pve-docs: 8.0.5
pve-edk2-firmware: 3.20230228-4
pve-firewall: 5.0.3
pve-firmware: 3.8-3
pve-ha-manager: 4.0.2
pve-i18n: 3.0.7
pve-qemu-kvm: 8.1.2-1
pve-xtermjs: 5.3.0-2
qemu-server: 8.0.8
smartmontools: 7.3-pve1
spiceterm: 3.3.0
swtpm: 0.8.0+pve1
vncterm: 1.8.0
zfsutils-linux: 2.1.13-pve1
 
usb0 is USB stick that the VM is booting from (Unraid)
Are you trying to boot a VM from a USB stick and are wondering about the performance?
So to me it seems logical straight away that the USB stick is to blame for the long delay. USB sticks are not known for having a brutal write and read rate.
 
Code:
agent: 1
bios: seabios
boot: order=usb0
cores: 4
cpu: host
hostpci0: 0000:06:00.0,pcie=1
hotplug: 0
machine: q35
memory: 10240
meta: creation-qemu=8.0.2,ctime=1695484223
name: ***
numa: 0
onboot: 1
ostype: l26
scsihw: virtio-scsi-single
smbios1: uuid=c9d075b1-6bac-40b7-9ec9-2f5564a3dab9
sockets: 1
startup: order=5,up=90
usb0: host=0951:1666,usb3=yes
usb1: host=0bda:8153,usb3=yes
vmgenid: 2f4c0b5f-44a8-4714-877a-e3804a980396

The hostpci0 is a SATA HBA, usb0 is USB stick that the VM is booting from (Unraid) and usb1 is a NIC.

When the VM is started it spends ~10 seconds in the "SeaBIOS ... Machine UUID ..." screen before showing the Proxmox logo and starting booting. My others VMs (not identical configurations) spend barely a second on that screen.
USB passthrough is not really suited for low-latency or high-bandwidth usage. I think the VM is just reading the bootloader very slowly because of the USB stick and even slower because of the USB passthrough. Do other VMs that use USB passthrough sticks to boot from start more quickly?
 
USB passthrough is not really suited for low-latency or high-bandwidth usage. I think the VM is just reading the bootloader very slowly because of the USB stick and even slower because of the USB passthrough. Do other VMs that use USB passthrough sticks to boot from start more quickly?
This is the only VM that's booting from USB (and I would happily switch away from booting from USB stick, but haven't found a good way to emulate/virtualize USB stick, especially for Unraid).

I'm not disputing what you're saying, on the other hand I'm wondering why reading the bootloader (few hundred bytes) from USB3 stick in USB3 port would take that long. I guess it's the initialization of the passthrough and/or similar overhead? Because once the VM starts booting the performance/speed is what I would expect from a USB stick.