VMware Cloud Community
BonnoB
Enthusiast
Enthusiast

Cannot delete VM from disk using webclient

We upgraded to vSphere 5.5 a few weeks ago. I have been trying to use the webinterface as much as possible to get used to it but now I am running into something that I think might be a bug, but I am not sure.

I cloned a Windows 2008 R2 VM yesterday. At the end of the clone process there was an error

Clone virtual machine

Ein-TemplateW2k8R2_SP1

fault.CustomizationPending.summary

Customizing the new Virtual Machine

And indeed after staring the new VM I noticed indeed that is had not been customized. No idea what caused it but wanted to get rid of the new VM so wanted to delete it in the webinterface.

I shut down the VM by loggin into it with RDP and selecting shut down.

After a while the right detail screen showed the VM to be "Powered off". On the left in the VM list there was still a green triangle as if it was running. Hitting F5 te refresh the screen was needed to get rid of that wrong indicator. (Bug?)

After that I did Right-Click, All vCenter actions.

To my surprise the "Delete from disk" option was grayed out, same as the "remove from inventory". I tried all kind of stuff to get FF to show me the 2 options as available, switched focus to different parts, looking at different info at the host or datastore,, etc.

I then started the the "old" VMware client and I do have both options available to me. Same when I logged on to the vCenter server using IE11.

I then logged out from the vCenter server using FF and logged back on. Surprise.. that did the trick.

Now the option to delete from disk, and remove from inventory, are available.

Now why did I have to log off and back on to be able to delete (or remove) a VM? I dod not think the failed clone option was a problem. That event is related to the original template. Also the VM had been started and over 12hrs later been stopped with any problem.

Bonno Bloksma

10 Replies
gver
Contributor
Contributor

I have similar issue.

Using standard vsphere client a user has the ability to delete VMs.

Using vsphere web client the same user has the "Delete from Disk" greyed out.

The user can remove from inventory and then browse the DataStore and delete the files.

Reply
0 Kudos
Justin1234
Contributor
Contributor

Hi BonnoB,

I don't think the VM is powered off "properly", hence you cannot delete the VM from the disk.

In the VSphere web client:

The state of my VM shows "Powered Off" on the Objects page but the "Power off" option is still available under  the following menu:

Try right click on the VM, select "All VCenter Actions" -> "Power" --> "Power Off".

Try to delete the VM from disk under "All VCenter Actions"

Cheers

BonnoB
Enthusiast
Enthusiast

Hello Justin,

Please reread my mail.

The VM was power off, the webinterface even reported that in the details screen on the right. Just the status in the tree on the left was wrong and stayed wrong untill I logged off and logged in again.

Reply
0 Kudos
JPM300
Commander
Commander

This may be a silly question but the account that you are logging into the vSphere Web Client with does have full admin rights?  If you have no other issues removing from disk on other vm's I would start the VM up and power it off again, or drop down to the CLI and put the VM into a powered off state with the CLI commands then try and removing it again.


If push comes to shove you can always remove it from the CLI client.

Reply
0 Kudos
SRTATech
Contributor
Contributor

Hi BonnoB:

Justin1234 was on the right track.. 

I had the same problem.  It was powered off and when I tried to power it off again via "All VCenter Actions" -> "Power" --> "Power Off", it displayed the message:  "The attempted operation cannot be performed in the current state (Powered off)."

I chose "edit settings" for the VM and noticed that the CD/DVD drive was connected to a Datastore ISO file.  Once I deselected the "Connected" checkbox, I was able to delete the VM using "All VCenter Actions" -> "Delete from Disk".

(Side Note:  I also made sure the nics' checkboxes were deselected as well, just to cover all possibilities.)

Reply
0 Kudos
SirPoot
Contributor
Contributor

I had the same problem. I was able to connect to my vCenter server via VMware Workstation and delete the VM's from disk. It's a work around and not a fix. Hopefully this will be addressed.

- Devin

Reply
0 Kudos
DOHagan
Contributor
Contributor

I just had the same issue trying to remove a powered off guest.

I noticed that the device status showed the CDROM powered to host for connection (or something similar).

I removed the CDROM from the guest and I was then able to delete from disk. (I also changed the video settings from custom to auto, but I doubt if that was it).

Anyway, as others have said, it's a workaround, not a fix.

Reply
0 Kudos
jjlak
Contributor
Contributor

I had the same problem as well. Then through the web client I did the same thing you did: "All VCenter Actions" -> "Power" --> "Power Off". I got the same message afterwards as well: "The attempted operation cannot be performed in the current state (Powered off)."

However, I was then able to delete the VM from disk. I guess the web client had to check for itself to make sure it was turned off. What a crazy application.

Reply
0 Kudos
jamesarmstrong1
Contributor
Contributor

An ISO mounted to the vm when powered down is not the issue there could be a hung process,

1#  if you have vSphere client log into the host directly where the VM resides see if it is still powered on if so power it off try again,

2# if the VM cannot be deleted from the host directly there could be a hung process on the host,

3# use esxtop from ssh via putty so type esxtop hit v on the keyboard see if tasks are running for that vm

4# if process are found running use this kb http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=101416...

5# if VMstill will not delete then the vmdk (virtual disk ) could have a stale lock on it

6# open a case with VMware support team to identify why the files are in read only mode.

hope this helps

Excellence as a service!
Reply
0 Kudos
npadmani
Virtuoso
Virtuoso

I personally have experienced this several times in vSphere web client 5.5

in some cases, you close and reopen web client does the trick and it works.

In some cases, It even allow you to click on 'Remove VM from Disk' option when it's powered off. Then running tasks gives you feeling that it's happening and task even gets completed in some cases/in some cases it keeps on going forever and you got to close web client and open it.

but all you find is VM is not deleted, it remains there in inventory and disk too.

Similar thing I have experienced when I try to move VM/ESXi host from one container to another by dragging or dropping and it doesn't happen.

Work around I use for this activity is, login in your vCenter server using vSphere client.

works perfectly well from there.

(Note: keep both available to you while managing vSphere 5.5 or later infra, if you find something it troubling you in one console, use the other one)

Narendra Padmani VCIX6-DCV | VCIX7-CMA | VCI | TOGAF 9 Certified
Reply
0 Kudos