VMware Cloud Community
poltraf
Enthusiast
Enthusiast
Jump to solution

CD auto-eject

Hello,

we've a clustered HA vMotion vCenter, serving a vCloud Director layer.

We experienced some problems for vMotion (and HA) functions because of some customer's VMs that kept a CDrom mounted, either with any .iso, either with Vmtools. In the first case it depends on the org-assigned multimedia file residing inside the original datastore unable to switch to the target datastore

Does exist any system to solve this issue, other than advising them to unmount the CD as soon as they finish to use it?

Maybe any script time-based, or to copy/move that multimedia file to the new datastore?

Thank you for support.

Cheers

Raffaello

Reply
0 Kudos
1 Solution

Accepted Solutions
poltraf
Enthusiast
Enthusiast
Jump to solution

Maybe I found it:

Get-VM | Get-CDDrive | Set-CDDrive –NoMedia

Thank you for the hint!

View solution in original post

Reply
0 Kudos
6 Replies
admin
Immortal
Immortal
Jump to solution


I believe .iso mounted VMs cant be vMotioned unless the .iso file is in a shared storage.

also look at the below thread:

https://communities.vmware.com/thread/97027?start=0&tstart=0


~dGeorgey

Reply
0 Kudos
akkayyakapisett
Enthusiast
Enthusiast
Jump to solution

We have the same issue.

Recommend the users to eject the CD option on vCloud after done with ISO

and use powercli "get-vm | get-cdrom | set-cdrom -nomedia " to unmount on all VM's of vcenter

Venkat

http://www.peeradmin.com

poltraf
Enthusiast
Enthusiast
Jump to solution

Wow this sounds great! Where should I exec the powercli command, on the vCenter server? Is this simple syntax enough to eject ALL the CD media from ALL the VM?

Thank you very very much

Raffaello

Reply
0 Kudos
poltraf
Enthusiast
Enthusiast
Jump to solution

I'm sorry. I wasn't clear. My fault.

I connect to vCenter as per the KB.

Then, launching the command I receive:

PowerCLI C:\Windows\system32> get-vm | get-cdrom | set-cdrom -nomedia


The term 'get-cdrom' is not recognized as the name of a cmdlet, function, scrip
t file, or operable program. Check the spelling of the name, or if a path was i
ncluded, verify that the path is correct and try again.
At line:1 char:19
+ get-vm | get-cdrom <<<<  | set-cdrom -nomedia
    + CategoryInfo          : ObjectNotFound: (get-cdrom:String) [], CommandNo
   tFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PowerCLI C:\Windows\system32>

Reply
0 Kudos
poltraf
Enthusiast
Enthusiast
Jump to solution

Maybe I found it:

Get-VM | Get-CDDrive | Set-CDDrive –NoMedia

Thank you for the hint!

Reply
0 Kudos