Common commands of VIX

Source: Internet
Author: User

After testing to a certain scale, you will inevitably use virtual machines. For VMware ESX, list several common commands:

 

1. List the storage paths of VMS on ESX Server (only list running VMS)

Vmrun-t esx-H https ://Serverip/SDK-uServerusername-PServerpasswordList

 

2. Start a VM.

Vmrun-t esx-H https ://Serverip/SDK-uServerusername-PServerpasswordStart"[Datastore1] vmname/vmname. vmx"

 

3. Stop a VM.

Vmrun-t esx-H https ://Serverip/SDK-uServerusername-PServerpasswordStop"[Datastore1] vmname/vmname. vmx"

 

4. list all snapshots on a VM

Vmrun-t esx-H https ://Serverip/SDK-uServerusername-PServerpasswordListsnapshots"[Datastore1] Vmname/vmname. vmx"

 

5. revert to the specified snapshot on the specified VM

Vmrun-t esx-H https ://Serverip/SDK-uServerusername-PServerpasswordReverttosnapshot"[Datastore1] Vmname/vmname. vmx"Snapshotname

Note: This command is invalid for ESX 3.5, Ref: http://www.vmware.com/support/developer/vix-api/VIX-1.6.2-ReleaseNotes.html

 

6. execute a program on the VM.

Vmrun-t esx-H https ://Serverip/SDK-uServerusername-PServerpassword-GuVmusername-GPVmpasswordRunprograminguest"[Datastore1] Vmname/vmname. vmx"-Interactive" C:/Windows/system32/cmd.exe"

 

7. Execute a bat on the VM.

Vmrun-t esx-H https ://Serverip/SDK-uServerusername-PServerpassword-GuVmusername-GPVmpasswordRunscriptinguest"[Datastore1] Vmname/vmname. vmx"Cmd.exe/k/" C: // program files // Microsoft Visual Studio // VC // vcvarsall. BAT/"x86"

Note: Set the interpreter of BAT ""

 

8. copy file from guest to host

Vmrun-t esx-H https ://Serverip/SDK-uServerusername-PServerpassword-GuVmusername-GPVmpasswordCopyfilefromguesttohost"[Datastore1] Vmname/vmname. vmx"" C:/temp/test. xml "" // 192.168.0.1/shared/test. xml"

 

9. copy file from host to guest

Vmrun-t esx-H https ://Serverip/SDK-uServerusername-PServerpassword-GuVmusername-GPVmpasswordCopyfilefromhosttoguest"[Datastore1] Vmname/vmname. vmx"" // 192.168.0.1/shared/test. xml "" C:/temp/test. xml"

 

Other Commands include:

Listprocessinguest, killprocessinguest, stop (power off VM), reset (reboot VM ),

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.