VMware Cloud Community
alvserversuppor
Contributor
Contributor
Jump to solution

How do I tell which PC has a CDROM client device in use or locked?

I've searched the forums several different ways and can't find a question similar, but perhaps my keywords are wrong.

vCenter 2.5.0 Build 119598

VI Client 2.5.0 Build 119826

ESX 3.5u3 Build 143128

All of our VM's have Device Type "Client Device" selected for CDROM's. If someone has one connected to their local PC's CDROM drive, then this VM cannot be VMotioned.

This drive could have been mounted days ago. The employee could be out of the office. Obviously, if we can't VMotion when we need to this is bad.

First question, is there a logfile somewhere (I've searched everywhere under the ESX host and the VM logfile, and the only places I'm familiar with on the vCenter server), that will list, perhaps by IP or hostname, which PC mounted the drive?

Second question. Once we discover whose got the attached drive and if said person is out, what are our options? Will hard booting their PC free the lock in vmware? Is their something we can do in our own VI Client session to boot them? It's greyed out, so it's not like we can disable it or stop it. I know it is like a unix mount and sometimes the only thing you can do in those cases is reboot. But there is no way we are rebooting the VM or the ESX host, so must wondering if a PC reboot would do the trick or if vmware has a server side solution, or if this is a feature request. I surely hope my first question is not going to be a feature request, but in a large environment I don't see why they wouldn't have an easy way to see which machine currently has the client device attached...

Thanks!

Reply
0 Kudos
1 Solution

Accepted Solutions
bggb29
Expert
Expert
Jump to solution

You can run a powershell script to see if cd-rom or floppies are connected and disconnect them.

What I am unsure of is if this will also break a lock for a client that has the cd connected.I suspect it will

look for the vi toolkit and there are several scripts available for this

View solution in original post

Reply
0 Kudos
3 Replies
bggb29
Expert
Expert
Jump to solution

You can run a powershell script to see if cd-rom or floppies are connected and disconnect them.

What I am unsure of is if this will also break a lock for a client that has the cd connected.I suspect it will

look for the vi toolkit and there are several scripts available for this

Reply
0 Kudos
dm330
Contributor
Contributor
Jump to solution

You can use RVtools from http://www.robware.net/

with this tool you can see all the snapshots, cdroms etc on the vm's

you can even see the vmtools version and install a new vmtools to all your vm's at once...

we use it and it gives a good overview of all your vm's

""

RVTools is a small .NET 2.0 application which uses the VI SDK to display information about your virtual machines. Interacting with

VirtualCenter 2.x or ESX 3.x RVTools is able to list information about cpu, memory, disks, nics, cd-rom, floppy drives, snapshots,

VMware tools, ESX hosts and datastores. With RVTools you can disconnect the cd-rom or floppy drives from the virtual machines

and RVTools is able to list the current version of the VMware Tools installed inside each virtual machine. and update them to the latest version.

""

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
alvserversuppor
Contributor
Contributor
Jump to solution

I checked out RVtools from http://www.robware.net/ and it works as advertised.

I also, tried the VI Toolkit with Powershell and this command displayed machines with the CDROM in use:

Get-VM | Get-CDDrive | ? { $_.ConnectionState.Connected -eq "true" }

And this one disconnected them:

Get-VM | Get-CDDrive | ? { $_.ConnectionState.Connected -eq "true" } | Set-CDDrive -Connected:$false -Confirm:$false

I'm sure there is a .ps1 script already out there, but I didn't look that hard for one.

I can recommend healthcheck.ps1 as it displays a lot of useful information (including CDROM's in use) and outputs to a html file or email.

Still wondering about my first question. VMware please send this information to a logfile so that we can get onto repeat offenders. The above solutions gets us around our vmotion problem, but doesn't help us determine who keeps CDROM drives in use.

Thanks!

Reply
0 Kudos