[SOLVED] VM not reloading config

Zananok

Member
Dec 2, 2020
7
0
6
32
I have a script that generates some updated config for /etc/pve/qemu-server/104.conf

I understand that just restarting them VM its not good enough, so the script shutdowns the vm, updates the vm config, then starts again.
However, more often than not, the vm starts with the old config instead of the updated vm config. I don't understand why this happens, any tips?

Sometimes turning off then on twice still doesn't help the vm. Usually what helps is to turn off and wait a long while before turning on the vm.
The main issue is usb ports mapping not being updated and loading previous usb port mapping.

Had this issue since the very early versions of pve 6. Currently running proxmox 6.3.2.

VM conifg (uses 7 USBs) and uses half of all resources available to the pve host:
1606888710802.png

QemuServer config has been updated appropriately for the use of the extra USBs.


Regards,
Zananok
 

Attachments

  • 1606888848224.png
    1606888848224.png
    40.9 KB · Views: 4
Last edited:
Hi,
does the script update the config file directly? Does it also happen if you use qm set or the APi endpoint instead?
 
Hi,
Yes, it updates the config directly, as in writing directly to the file.

I haven't tried with qm set.

However, I did notice that if I make changes to any of the first 5 USB devices, the config seems to reload, whereas if I just change any USBs after the 5th USB, the settings are not refreshed when I boot the VM.

I would have expected proxmox to scan for changes in a loop using $MAX_USB_DEVICES, but it seems that it only checks the first 5, and if they are equal, it doesn't reload.

I could be wrong, as I only tested this twice, but both times it successfully reloaded the new mapping.


Regards,
Zananok
 
Yes, PVE currently only supports using up to 5 USB devices for a VM. Other entries should be ignored AFAICT. Feel free to file an enhancement request to raise that limit on the bugtracker.
 
I understand that and saw that the work arounds of increasing USBs is to increase "$MAX_USB_DEVICE", which works.
What doesn't work is to reload the VM config unless you re-order or change one of the first 5 USBs.

Thank you for your support. Will close the topic.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!