VMware Cloud Community
Vijay_Symantec
Contributor
Contributor

Vmrun deleteVM command failed with "The File in use"

Hi Team,

Vmware Workstation v14 Pro(14.1.5 build-10950780)

We have created a ruby wrapper for VMRUN commands and distributed for our internal use. When I call start_vm, first we do linked_clone and then start VM using vmrun command. We're facing an issue when destroying a VM from our ruby wrapper class. When I call destroy_vm,
1. Call "stop" vmrun command.

2. Call "deleteVM" vmrun command

Error:

INFO subprocess: Starting process: ["C:\\Program Files (x86)\\VMware\\VMware Workstation\\vmrun.exe", "deleteVM", "E:/Git/devstack/PluginDevelopment//c702297b-20ab-4756-892a-2e95d6ab6adb/BM-ENU10CPCR6X32.vmx"]

DEBUG subprocess: stdout: Error: This VM is in use.

I understand that {{vm_name}}.vmx.lck folder lock is not deleted and still process is not released.

How to handle this scenario? Should I manually release the process, if yes how to do this?

I need your help to get this issue fixed.

0 Kudos
1 Reply
continuum
Immortal
Immortal

Are you sure that your deleteVM command does not attempt to delete the original base-vmdks ?
That would explain the "file in use" message


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos