VMware Communities
SurferL
Contributor
Contributor
Jump to solution

Delete VM from library if file is missing

I deleted the .vmwarevm from command line, however the VM is still in the Fusion library and I can't delete it now as it keeps saying it can't find the file when I try delete it.

How would I go about removing it from the Fusion library now? Is there a command line option I can use to do this?

Thanks

Reply
0 Kudos
1 Solution

Accepted Solutions
zhus
VMware Employee
VMware Employee
Jump to solution

Quit Fusion, then relaunch it.

It can be deleted now.

View solution in original post

Reply
0 Kudos
10 Replies
zhus
VMware Employee
VMware Employee
Jump to solution

Quit Fusion, then relaunch it.

It can be deleted now.

Reply
0 Kudos
SurferL
Contributor
Contributor
Jump to solution

Thanks!

Reply
0 Kudos
SurferL
Contributor
Contributor
Jump to solution

Is there anyway it can be deleted via the terminal after relaunching it?

Reply
0 Kudos
wila
Immortal
Immortal
Jump to solution

Hi,

You could do so via the REST API.

http://www.virtuallyghetto.com/2017/07/vmware-fusion-2017-tech-preview-adds-rest-api-support.html

or directly via the command line using vmrun (found at \Applications\VMware\ Fusion\Contents\Library ) using the DeleteVM option.

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
SurferL
Contributor
Contributor
Jump to solution

Regarding vmrun - I can't use deleteVM if I have already removed the file manually via finder?

Also with deleteVM, it doesn't work if it is registered to the Fusion Library?

Reply
0 Kudos
wila
Immortal
Immortal
Jump to solution

Hi,

You make a good point. If the vmx is already removed then passing it as a parameter might not have the desired result (haven't tested it in your scenario)

It might still work though, depends on how VMware implemented this.

Hmm... just tested it and ended up getting a "the virtual machine cannot be found" error.

Can't really advise to meddle with the file, but the registrations for non shared VMs are located at:

~/Library/Application Support/VMware Fusion/vmInventory

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
SurferL
Contributor
Contributor
Jump to solution

Thanks for checking it out!

Although my vmInventory seems empty... And also has a slightly different path of:

/Library/Application Support/VMware/VMware Fusion/Shared/vmInventory

Reply
0 Kudos
wila
Immortal
Immortal
Jump to solution

Hi,

There's two vmInventory files.

The one you are pointing at is for shared virtual machines.

The location I was pointing you towards is the default one and should have the normal list of virtual machines.

Note that my path is prefixed by "~" so it is under your home folder and is normally hidden from finder.

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
SurferL
Contributor
Contributor
Jump to solution

Ah gotcha, thanks!

Just to verify, deleteVM doesn't work if the VM is registered in the library of Fusion?

Reply
0 Kudos
wila
Immortal
Immortal
Jump to solution

Hi,

I'm not sure I understand the question.


But to be fair, I don't have the time to test today anymore (got to get some work done) and I have not used that function myself before so you'll have to test it by yourself.

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos