Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How do I connect/disconnect a CDROM drive from a virtual machine from the command-line? I don't see anything in the VIX reference.

share|improve this question
add comment

1 Answer 1

You can do this with the vmware-vim-cmd line tool. For example, if your VM is vmid 112, and the CDROM deviceKey is 3002, the command will be:

vmware-vim-cmd vmsvc/device.connection 112 3002 true

You can discover the vmid with the command:

vmware-vim-cmd vmsvc/getallvms

Then you can find the device ID with the command:

vmware-vim-cmd vmsvc/device.getdevices <vmid>
share|improve this answer
    
On my VMWare Server 2.0 installation on a Windows Server 2003 machine, I can't find vmware-vim-cmd. Which directory is it installed in by default? –  ristonj Sep 27 '11 at 21:23
    
I'm not sure, I don't have a Windows machine with Server installed on it to look around. Maybe something in c:\program Files\VMware? You could also look for vimsh.exe or any vmware-*.exe to find possible locations. –  Jed Daniels Sep 27 '11 at 21:52
    
I searched the entire hard drive and didn't find vmware-vim-cmd. I don't think it comes with the Windows version of VMWare Server. –  ristonj Sep 28 '11 at 15:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.