I have created a "dirty" web page using PHP (I do not know Perl well) that does the following:
Log in to VirtualCenter (2.5) and get the storage/config file paths for all registered VM's (like this: vm/vm.vmx)
Put the list into a dropdown menu and have an input field for the target storage location. And a move-button to start svmotion.
This is a very dirty solution right now, but it works for me!
The question now is: How can I get a progress bar for the svmotion?
I have included the neccessary files. I have installed this on my apache (linux) webserver with php and perl configured. You will have to install the Remote Client and Perl API to run this.
(VMware-RCLI-1.1.0-64577.i386.tar.gz and VMware-VmPerlAPI-2.3.2-39850.tar.gz used)
Sorry about the bad programming! I'm not exactly a programmer...
By the way.. I'm looking for a small script to list ALL datastores in VC. I want ONLY the friendly names, one name per line.
Like this:
Iscsi1_1
Iscsi1_2
Iscsi2_1
etc
I have found some scripts that will list the datastores, but they also list a lot of other info I do not need. I have not been able to modify them to only output what I want. Can someone please give me an example of how to do this ?
You can use the vifs command
vifs --server VC server --username administrator --password XYZ -Z 'New Datacenter' --listds
I think, this syntax should work for u
Let, me know the results
Thanks
Thank you! that worked like I wanted it. Now I can have a dropdown menu for destination datastore also.
Now, if I just could find a way to poll the relocate status from vc...
The result for now (no progress bar)
Not pretty, but works every time.
All files should be in the same directory on the webserver. svmotion.html is the start-page.
Change it to your own needs.
edit: a small typo in the vmquery.php page. Missed one =
select name='newpath'