I need to change multiple VMs to a different port group and adjust their memory settings. How can I accomplish this with a script?
Port Group 1 = VM1 / VM2 / VM3 / VM4 > Port Group 2
VM1 = 4096 > 2048
VM2 = 8192 > 2048
VM3 = 3072 > 1024
VM4 = 2048 > 1024
Those are command line options. Each one would have to run in a script. ESX 3.5 uses perl. If you work for a fairly large organization, someone may be able to help you with a perl script. Perl is very common.
A developer or linux guru can help you. Those commands for vmware-cmd are run per VM, that's not a script. You can make a script to do it, but it would take a bit of work. It's easier to use the VI client and make the changes, even if it is tedious.
vmware-cmd </vmfs/volumes/dg_01/virtual_machine.vmx> setconfig memsize 2048
vmware-cmd </vmfs/volumes/dg_01/virtual_machine.vmx> setconfig ethernet0.networkName "Port Group 2"
What type of file/script to process those commands like a batch file? Is there anything that needs to be done to run the script, such as making it executable? I only know how to create DOS batch files.
This is a ESX 3.5, btw.
Thanks!
Those are command line options. Each one would have to run in a script. ESX 3.5 uses perl. If you work for a fairly large organization, someone may be able to help you with a perl script. Perl is very common.
A developer or linux guru can help you. Those commands for vmware-cmd are run per VM, that's not a script. You can make a script to do it, but it would take a bit of work. It's easier to use the VI client and make the changes, even if it is tedious.
When I attempt to run the command:
vmware-cmd </vmfs/volumes/VM_volume/VM/VM.vmx> setconfig memsize 1024
I get:
Error executing the command "1024"
Thoughts?
Try putting 1024 in double quotes "1024"
I have tried that with the same results.