Hi,
I have a script to detach CD/DVD for all VMs running on the specified datastore and print the result if successful or not.
My problem is for one of the VM, the script paused and I have the following "Virtual Machine Message" in vCenter:
"The guest operating system has locked the CD-ROM door and is probably using the CD-ROM, which can prevent the guest from recognizing media changes. If possible, eject the CD-ROM from inside the guest before disconnecting. Disconnect anyway and override the lock?"
The answer could be yes or no but I have to click manually.
How can I insert in my script to continue the process by answering yes or no automatically?
The VM is a Cisco VSG VM and has a CD/DVD attached that is connected and that connect at power on (ISO image is located on the VM folder).
My goal is to move all the VMs running on this datastore to another datastore and I would like to make sure no CD/DVD are attached to them.
I have noticed that when I move this particular Cisco VM to another datastore, the ISO image move at the same time. Not true for other VMs with Media attached to them (e.g. Windows VM with a Windows ISO image attached).
So what I would like is to detach CD/DVD from all VMs and if it's a Cisco VM, answer to the Virtual Machine Message in VC by yes or no for the script to continue.
Thank you for your help.