Link to home
Start Free TrialLog in
Avatar of lolekbolek
lolekbolek

asked on

Can't delete an empty datastore in vSphere Client

I have two datastores on ESXi and want to delete datastore2 in order to extend the datastore1 that is full (see screenshot).  I have deleted files on the datastore2 (using Veeam FastSCP), but when I try to delete datastore2 I have an error saying it's in use (see screenshot).  Maybe this datastore2 has some files that are still open, but they don't show either in vSphere Client nor in Veeam FastSCP.

What should I do to delete this datastore?
Veeam-datastore-screenshot-1.png
deleting-datastore-in-Configurat.png
Avatar of Luciano Patrão
Luciano Patrão
Flag of Portugal image

Hi

Check if any VMs have the CD-ROM(ISO option) point to any file on that datastore

Some times this is the issue

Jail
Avatar of lolekbolek
lolekbolek

ASKER

I know I had to mount an ISO image some time ago when I was installing Ubuntu for this VM/datastore I want to delete.  But I can't figure out where to look.  I looked in properties for both vms (Win2k3 I want to keep and Ubuntu I want to delete).  See attached screenshot.  Should I look elsewhere?
ubuntu-virtual-device-node-scree.png
win2k3-virtual-device-node-scree.png
Hi

You need to check all the VMs that are on that ESX host, or vCenter. On the settings check CD/DVD Drive and the Datastore ISO File. See if any of the VMs are mounting with any ISO

If you have many VMs to check, you can run this small script and will list all the VMs that have an CD/DVD ISO mounted

Use this in your powershell

Jail
$server = "servername"
$user = "user"
$pwd = "password"

Connect-VIServer $server -User $user -Password $pwd

$vms = Get-VM
write "`nVM's with CD-ROM device type set to 'Datastore ISO file' :"
foreach ($vm in $vms | where { $_ | Get-CDDrive | where { $_.ISOPath -like "*.ISO*"}}) {
	write $vm.name}

Open in new window

Hi BestWay,

Please don't laugh, but I don't know where I can access my powershell since I only have vSphere Client access to two VMs out of a few dozens on our network that our admin provided me with.  And I only see what's shown on the screenshots above when it comes to CD/DVD drive.  I click on one of my two vms -> edit settings -> hardware and voila.

Sorry, if I am missing something I should know where to find :(
ASKER CERTIFIED SOLUTION
Avatar of bgoering
bgoering
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi

ohh if like bgoering said, if one of your VMs was created in that datastore, you need to removed from the inventory, or just delete the VM

Jail
Hi

You you want to close the question, just use the split points, or add the points to one of the EE expert, you dont need to close the question like this

Jail
oops - sorry - it's the first time i was trying to accept multiple solutions and i guess i botched it!  let me retry.
aloha!  i've closed questions with one solution before w/o problems.  but this first time, i can't close the one with multiple solutions.  it tells me i must provide the reason for closing, but i can't see where :(  (screenshot attached)
closing-the-question-1.png
I object to my own comments, because I would love the moderator to have a look at it and help me assign 250 points to two accepted solutions.  As well, newbies like me might benefit from adding more tips (or a troubleshooting section) to EE's otherwise wonderful Help on accepting solutions.
Hi

Yes Vee_Mod i see the comments(with the split points), I have click the object, not because of the points, but only to explain that the user can use the Accept Multiple Solutions, and don't need to close the question like that.

Sorry if i did explain correctly

Jail