Add --nvram to VM delete command


Recommended Posts

As discussed here some VMs e.g. the ones made by macinabox use nvram and virsh will refuse to remove such VMs without the --nvram parameter, so trying to delete via GUI will just hang with a spinning icon and do nothing, they have to be deleted with "virsh undefine --nvram VMName" from the command line.

 

Adding the --nvram parameter doesn't seem to hurt removal of "normal" VMs, so it might be useful to add it to the GUI's "Remove VM" command.

  • Thanks 1
Link to comment
32 minutes ago, Kilrah said:

As discussed here some VMs e.g. the ones made by macinabox use nvram and virsh will refuse to remove such VMs without the --nvram parameter, so trying to delete via GUI will just hang with a spinning icon and do nothing, they have to be deleted with "virsh undefine --nvram VMName" from the command line.

 

Adding the --nvram parameter doesn't seem to hurt removal of "normal" VMs, so it might be useful to add it to the GUI's "Remove VM" command.

Code deletes the vm nvram first then undefines via php api. there is a flags version but may have to ask libvirt devs as not documented.

https://github.com/limetech/webgui/blob/4d836adc0d2bd058fbabc030b1b89d4183bfe04b/plugins/dynamix.vm.manager/include/libvirt.php#L1774

 

 

 

Link to comment
2 minutes ago, Kilrah said:

Well it seems not to work since I've run into the issue (on 6.11) and searching for it pointed out others having it... the command with --nvram in terminal works.

 

Not sure how to help diagnose where it breaks...

 

Maybe macinthe box is not using the correct file names will look into it.

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.