scud133b Posted October 17, 2016 Share Posted October 17, 2016 I had been fooling around with several test Windows VMs, messing with the XML, etc., and now have managed to screw things up enough that I cannot delete the VMs to start over. That means I can't reuse my UUID that I need for my licensed copy of Windows, because it is currently reserved by one of these busted VMs. If I try to delete any of these VMs (which are currently stopped), I get an error that: Requested operation is not valid: cannot delete inactive domain with nvram Is there a way to remove these manually? A config file or something on the flash drive? I located the actual VM disc image but deleting that will not remove the entry from the Unraid GUI. The big problem is freeing up my UUID because it is tied to a paid version of W10, which right now is stuck on a useless VM. 2 Quote Link to comment
kode54 Posted October 17, 2016 Share Posted October 17, 2016 Run from a shell (SSH, etc): virsh undefine --nvram "name of VM" 14 4 Quote Link to comment
dmacias Posted October 17, 2016 Share Posted October 17, 2016 You can also go to /etc/libvirt/qemu/ through the command line or mc and delete the vm's xml. Then restart rc.libvirt, the array or the server. 1 Quote Link to comment
scud133b Posted October 19, 2016 Author Share Posted October 19, 2016 Run from a shell (SSH, etc): virsh undefine --nvram "name of VM" Tried that and got the same error... I assume the GUI is just running this exact command behind the scenes Edit: the --nvram flag changes things, let me try again Quote Link to comment
HaiJak Posted February 27, 2020 Share Posted February 27, 2020 On 10/16/2016 at 8:59 PM, kode54 said: Run from a shell (SSH, etc): virsh undefine --nvram "name of VM" Thank you, works great. I had to delete the vdisk from the cache after I ran the code, and voila... as if it never happened. 4 Quote Link to comment
[email protected] Posted May 18, 2020 Share Posted May 18, 2020 This helped me get rid of it as well, Thanks!! Quote Link to comment
HectorG Posted June 2, 2020 Share Posted June 2, 2020 Had this exact error and then figured since the nvme drive is enabled and checked within the vm template to just go back to that busted or bad VM template and then uncheck NVME drive in the other pci devices section or just uncheck any usb or pci express devices and hit apply. Now you should be able to simply delete the vm without any error message. Unraid is so logical that if you try to 'Windows' it, it won't forgive you for being stupid and it will just tell you off, but if you think like spock unraid just works. 2 Quote Link to comment
hitcsu Posted October 3, 2020 Share Posted October 3, 2020 (edited) Thank you kode54, this was the solution for me as well: On 10/17/2016 at 5:59 AM, kode54 said: Run from a shell (SSH, etc): virsh undefine --nvram "name of VM" Edited October 3, 2020 by hitcsu formatting Quote Link to comment
stor44 Posted October 4, 2020 Share Posted October 4, 2020 On 6/2/2020 at 9:54 AM, HectorG said: Had this exact error and then figured since the nvme drive is enabled and checked within the vm template to just go back to that busted or bad VM template and then uncheck NVME drive in the other pci devices section or just uncheck any usb or pci express devices and hit apply. Now you should be able to simply delete the vm without any error message. Thanks for this. I checked the button for my Logitech wireless mouse, updated the template, then was able to delete it without error. Quote Link to comment
UnraidProliant180 Posted March 27, 2021 Share Posted March 27, 2021 Thank you guys, saved my day! Quote Link to comment
urbatecte Posted May 2, 2021 Share Posted May 2, 2021 Just do not omit the double quote " Thaks guys ! Quote Link to comment
dlfz.Network Posted July 25, 2022 Share Posted July 25, 2022 On 10/16/2016 at 8:59 PM, kode54 said: Run from a shell (SSH, etc): virsh undefine --nvram "name of VM" virsh undefine --nvram "Macinabox BigSur of VM" error: failed to get domain 'Macinabox BigSur of VM' cant get past this ?????? Help Thanks Quote Link to comment
ghost82 Posted July 26, 2022 Share Posted July 26, 2022 On 7/25/2022 at 2:40 AM, dlfz.Network said: "Macinabox BigSur of VM" I bet your vm name is not "Macinabox BigSur of VM", but maybe "Macinabox BigSur" Quote Link to comment
dlfz.Network Posted August 10, 2022 Share Posted August 10, 2022 it was my first time I did this wrong. I removed the VM files but the VM still shows in the VM list an I cant remove it. Any thoughts Thanks dlfz Error Message Requested operation is not valid: cannot undefine domain with nvram ! Not valid! Quote Link to comment
ghost82 Posted August 12, 2022 Share Posted August 12, 2022 On 8/10/2022 at 4:50 PM, dlfz.Network said: Requested operation is not valid: cannot undefine domain with nvram ! Not valid! Type this in unraid terminal: virsh undefine --nvram "Macinabox BigSur" Quote Link to comment
dlfz.Network Posted August 14, 2022 Share Posted August 14, 2022 OMG Thank you it worked right off the Bat !!!!!!!!!!!!!!!! Quote Link to comment
HomerJ Posted June 13, 2023 Share Posted June 13, 2023 On 10/18/2016 at 4:04 AM, dmacias said: You can also go to /etc/libvirt/qemu/ through the command line or mc and delete the vm's xml. Then restart rc.libvirt, the array or the server. How do I go about restarting rc.libvirt? Quote Link to comment
Recommended Posts
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.