VMware Cloud Community
jockmcgonzo
Contributor
Contributor
Jump to solution

can't delete .vmdk file on Datastore

Hello,

In my new company i've inherited an ESX server which runs some virtual server2003 machines stored on a SAN Datastore.

As i investigated more i discovered that is was running short of space, after using the browse function i discovered that there were some 'leftover' .vmdk files which the browser couldn't delete and which are taking up a fair amount of space.

Does anyone have any ideas what i can do to remove these files. I have tried using SCP but only know the root password which comes back as denied.

Please bear in mind when answering that i am new to VMWare ESX so may need step by steps.

Thanks to anyone who can help.

Tags (3)
1 Solution

Accepted Solutions
aldikan
Hot Shot
Hot Shot
Jump to solution

Hi,

I would also highly recommend this free tool from VEEAM:

This will allow you to check/set permissions on leftover vmdk files.

Please check your existing VMs and make sure that no VMs are using any of those vmdk files, as it is a possibility.

Alex

(Please rate this or other answers if helpful)

View solution in original post

7 Replies
Cameron2007
Hot Shot
Hot Shot
Jump to solution

from Virtual Center you should be able to browse to the datastores by selecting Datastores view. Once you open this you will see a Command to Browse Datastores once you go to that you will see thevmdks and by selecting on the required one you should be able to delete them. Alternatively use SSH (Putty) to connect to an ESX host and get to the required datastore by cd /vmfs/volumes/path to vmdk then using the standard commands to delete the vmdk there

aldikan
Hot Shot
Hot Shot
Jump to solution

Hi,

I would also highly recommend this free tool from VEEAM:

This will allow you to check/set permissions on leftover vmdk files.

Please check your existing VMs and make sure that no VMs are using any of those vmdk files, as it is a possibility.

Alex

(Please rate this or other answers if helpful)

jockmcgonzo
Contributor
Contributor
Jump to solution

Hi Camreon2007

I have tried using browse to the datastore and it is using this that i get the "can't delete" error message my problem with usingPuTTy (and the like) is that it appears that root remote logon was diabled when it was originally set up but root was the only account i was given passwords for.

This leaves me in a Catch 22 situation where i can't turn on root remote logon as i can't logon and can't create an alternative account as i can't log on.

Any other ideas? I will check to see if any of the other servers are using these disk images.

Reply
0 Kudos
Cameron2007
Hot Shot
Hot Shot
Jump to solution

create a new vm then add all the disks you want to remove. THen delete from disk. Alternatively go to the console of the host logon locally as root go to the datastores and delete the vmdks from there

Reply
0 Kudos
jockmcgonzo
Contributor
Contributor
Jump to solution

And the prize goes to Aldikan

the chap who set them up had been using the disks on 2 other server.

thanks for the help guys. :smileyblush:

Reply
0 Kudos
khughes
Virtuoso
Virtuoso
Jump to solution

Does anyone have any ideas what i can do to remove these files. I have tried using SCP but only know the root password which comes back as denied.

Do you know that the root password you are entering is the correct one or are you not quite sure if you know the root password? If you don't know the root password to your ESX box that could be a very bad thing. If you know the root password you are entering is correct and it works on the console login, then you probably have allow remote root access denied.

If you know the password is correct, then follow these steps to see if ssh is allowing remote root access. Granted this is a small hole that is opened up to your mgmt just a fyi

vi /etc/ssh/sshd_config

To enter insert mode, hit "i" and to exit insert mode, hit "esc"

Inside the sshd_config file, move down to PermitRootLogin and change no to yes, case sensitive

To save and quit, type ":wq!" which will force save and quit the vi editor

After you make the changes, restart the sshd service --> service sshd restart

then try logging back in with winSCP

  • Kyle

-- Kyle "RParker wrote: I guess I was wrong, everything CAN be virtualized "
Reply
0 Kudos
vMariaL
Enthusiast
Enthusiast
Jump to solution

aldikan wrote:

Hi,

     

I would also highly recommend this free tool from VEEAM:

 

http://www.veeam.com/vmware-esx-fastscp.html

Hey Everyone,

Searching this community, I found a couple of old posts about Veeam.

Quick update: Veeam FastSCP is not available as a standalone product any more. It was built-in to another completely free tool - Veeam Backup Free. First of all, Veeam Backup Free supports VMware and can create ad-hoc backups of live VMs to store them on tapes, drives or external USB. Secondly, you can migrate live VMs between hosts and datastores. Finally, you can manage your VMware VMs (copy, clone, etc.) with this tool. Despite the fact that Veeam Backup Free provides a subset of the functionality of the paid version, it's quite enough for day-to-day VM management.

You can download the latest version of Veeam Backup Free here: http://www.veeam.com/virtual-machine-backup-solution-free.html

Please let me know if any questions will appear - I will be glad to help.

-----

Veeam Community Manager

---- Veeam Community Manager
Reply
0 Kudos