pvesh - changing a config in realtime on another node

stuartbh

Active Member
Dec 2, 2019
120
11
38
59
I am trying to get a Fedora CoreOS instances to live migrate that has a residual set of "args" with ignition files and such that are blocking the live migration from becoming occurring. I wish to modify the hook-script to perform this task:

Code:
pvesh set /nodes/pve1/qemu/112/config --args ''

Now this works but it is in a "pending" state and I wish for it to immediately modify the configuration (despite the VM being up and about to live migrate), so that the args can be removed and not prevent the live migration.

Any ideas on how I could accomplish this?

I also tried to perform this to obtain the args value in precedence to executing the above entitled pvesh set but it did not work. Is there a pvesh get command that will extract strictly the args value?

Code:
pvesh get /nodes/pve1/qemu/112/config --args

I did get code as follows hereupon to extract the args setting but gosh is it ugly!

Code:
pvesh get /nodes/pve1-nuc7i7dnhe/qemu/112/config --noheader --noborder --output-format text | grep -i '^args' | tr -s ' ' | cut -d' ' -f2-

By the way, it would be really useful if there was a phase for "pre-migration" and "post-migration" that the hook-script could work with.


Thanks!

Stuart, N3GWG
 
Last edited:
Hi,
Now this works but it is in a "pending" state and I wish for it to immediately modify the configuration (despite the VM being up and about to live migrate), so that the args can be removed and not prevent the live migration.

Any ideas on how I could accomplish this?
that's impossible in general, because args can be arbitrary arguments so Proxmox VE doesn't know if the change can be hot-plugged. The QEMU commandline needs to be the same when live-migrating (with few exceptions like disk names, I'm not sure if removing the ignition file is also one, could be), so applying the change immediately could break live-migration.

I also tried to perform this to obtain the args value in precedence to executing the above entitled pvesh set but it did not work. Is there a pvesh get command that will extract strictly the args value?
No, but you can use e.g. --output-format json and a tool like jq to extract what you need in a reliable manner.

By the way, it would be really useful if there was a phase for "pre-migration" and "post-migration" that the hook-script could work with.
This is currently being worked upon: https://lists.proxmox.com/pipermail/pve-devel/2022-October/054214.html
 

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!