[pve-devel] [PATCH 3/7] resize disk : allow resize pending disk

Dietmar Maurer dietmar at proxmox.com
Fri Jan 2 10:17:56 CET 2015

> Also, it's missing currently the "revert pending change" api.
> I don't known what is the best way ? 
> extend update_vm api with an additionnal param?
> #qm -delete -pending -virtio0

I thought about a new parameter called 'revert':

		revert => {
		    type => 'string', format => 'pve-configid-list',
		    description => "A list of settings you want to revert (remove pending
		    optional => 1,

So you can simple do:

# qm set <VMID> -revert virtio

Note: similar to delete

To implement, you can simply do:

  foreach my $opt (PVE::Tools::split_list($param->{revert})) {
    $param->{$opt} = $conf->{opt} if define($conf->{$opt};

The rest is done by existing code, which already detects and 
removes pending values if nothing changed.

More information about the pve-devel mailing list