Hi,
I'm using the VIPerlToolkit and trying to write a script, which disconnects the CD-ROM of all VMs.
I think it's just about a few line code, but I don't get it working.
Maybe Henry can help?
Hi,
It's not written in Perl but it works.
http://www.ntpro.nl/software/VMCDConnected.7z
Regards,
Eric Sloof
Henry,
thank you very much.
I tried the script and got the following error message:
./cdromdisconnect.pl --host esx01 --op list
No session or username/password provided
Vim uninitialized at /usr/lib/perl5/site_perl/5.8.8/VMware/VIM2Runtime.pm line 132
Vim::get_service_content() called at ./cdromdisconnect.pl line 52[/i]
I think the login is not working right or maybe I did a mistake. In the script I didn't find something, where I can add a username or password.
I tried with a ESX-Server and VC.
Christoph
Try to add username and password as an argument like you did with host and op:
cdromdisconnect.pl --host esx01 --op list --username user --password password
Sorry, I forgot the standard login syntax:
cdromdisconnect.pl --host esx01 --op list --server name --username user --password password
If the server is VC, then the host argument is required.
If the server is an ESX host, then you don't need to specify the --host argument.
Hope this helps.
404 on that link
I don't understand your message. You can't retrieve the sample script or you get a 404 when you try to run it?