Solved

Can't delete an empty datastore in vSphere Client

Posted on 2010-09-16
15
3,896 Views
Last Modified: 2012-05-10
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
0
Comment
Question by:lolekbolek
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
15 Comments
 
LVL 23

Expert Comment

by:Luciano Patrão
ID: 33697362
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
0
 

Author Comment

by:lolekbolek
ID: 33697386
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
0
 
LVL 23

Expert Comment

by:Luciano Patrão
ID: 33697419
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

0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

Author Comment

by:lolekbolek
ID: 33697468
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 :(
0
 
LVL 28

Accepted Solution

by:
bgoering earned 250 total points
ID: 33697520
I believe at one point in some thread you indictated your Ubuntu was installed on your datastore2. If you have already deleted its files, you need to right click it in the client and remove from inventory. If you haven't deleted the files, right click it and delete from disk. Then hopefully your datastore will free up.
0
 
LVL 23

Assisted Solution

by:Luciano Patrão
Luciano Patrão earned 250 total points
ID: 33697528
Hi

No problem, no reason to laugh

PowerSheell is a "software" to create/run scripts. With this we can do all the commands(just all the informatio, reports, etc) in the console from our VMware Infrastructure. You need to install first on your computer to use.

Just take a look at this to have some information

http://xtravirt.com/xd10133
http://searchvmware.techtarget.com/tip/0,289483,sid179_gci1347396_mem1,00.html

You to register to have access this two articles

But since you only have 2 VMs don't need to use the script. But looking at this 2 VMs none are using the mounted ISO

Are you sure that no one(other VMs that you have no permissions to check) is using that datastores? Or even have ISO mounted with that datastore?

Do you know if your VMware Infrastructure use VMware Disaster Recover? Sometimes also we have any issue when trying to delete a datastore that DR uses for replication

I see that almost 8Gb is been used in this Datastore, if you click right mouse on that datastore and browse do you see any files or folders?

Jail

0
 
LVL 23

Expert Comment

by:Luciano Patrão
ID: 33697533
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
0
 
LVL 23

Expert Comment

by:Luciano Patrão
ID: 33697552
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
0
 

Author Comment

by:lolekbolek
ID: 33697564
oops - sorry - it's the first time i was trying to accept multiple solutions and i guess i botched it!  let me retry.
0
 

Author Comment

by:lolekbolek
ID: 33697575
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
0
 

Author Comment

by:lolekbolek
ID: 33697668
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.
0
 
LVL 23

Expert Comment

by:Luciano Patrão
ID: 33700120
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
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Last article we focus in how to VMware: How to create and use VMs TAGs – Part 1 so before follow this article and perform the next tasks, you should read the first article how to create the TAG before using them in Veeam Backup Jobs.
HOW TO: Connect to the VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere (HTML5 Web) Host Client 6.5, and perform a simple configuration task of adding a new VMFS 6 datastore.
Teach the user how to configure vSphere clusters to support the VMware FT feature Open vSphere Web Client: Verify vSphere HA is enabled: Verify netowrking for vMotion and FT Logging is in place or create it: Turn On FT for a virtual machine: Verify …
This Micro Tutorial walks you through using a remote console to access a server and install ESXi 5.1. This example is showing remote access and installation using a Dell server. The hypervisor is the very first component of your virtual infrastructu…

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question