2010/08/19

vWorkspace locks VM

Recently a colleague of mine was playing with the vWorkspace broker from Quest Software. It was all fun and games until vWorkspace decided to lock one of the VMs. Result:
-Unable to delete snapshots (creating them was no problem)
-Unable to migrate the virtual machine
-Unable to delete the virtual machine
-Unable to remove the virtual machine from the inventory.
Notice, they did not throw an error. The options were just grayed out.

Of course I like a challenge so I started my quest ;)

First of all I noticed that I was able to create snapshots, remove the virtual machine from the inventory and so on directly from the ESX host. This was my first clue. Removing the machine from the ESX locally created an orphaned machine. Luckily since the VM was down I could power it on and it was reregistered and no longer orphaned. This lead me to believe that the problem was in the vCenter database.

I started searching the KB and I found the following article

So I started by shutting down vCenter. I then opened up the database and executed
  • select ID from VPX_ENTITY where name ='';
This returned an ID. I then executed
  • delete from VPX_VM where ID=;
  • delete from VPX_ENTITY where ID=;
In my case this deleted 2 rows (one row for each VM)

Lastly I restarted the virtual center. Because the virtual machine was still available on the ESX it was "rediscovered" by vCenter after booting. Result : VM unlocked.

This let me believes that the vWorkspace changes something in the database that locks the virtual machine. Probably the result of some linked-clone locking...

Notice : I have no idea if this broke vWorkspace things though ;)

1 comment:

  1. Just unlock the snapshot from that template/vm in vWorkspace and 'Voila'
    It's correct vWorkspace locks the template/vm in vCenter. This is as it supposed to be ;-)

    ReplyDelete