Академический Документы
Профессиональный Документы
Культура Документы
Thomson Reuters
Page 1
Content
About This Book ................................................................................................................. 3 Intended Audience ............................................................................................................. 3 Document Feedback .......................................................................................................... 3 Technical Support and Education Resources .................................................................... 3 Using VM Management Tool .............................................................................................. 4 About VM Management Tool ............................................................................................. 4 Features Highlights ............................................................................................................ 4 System requirement for VM Management Tool .................................................................. 4 Supported Operating Systems ........................................................................................... 5 Using VM Management Tool.............................................................................................. 5 Command-Line Options ..................................................................................................... 5 Examples of Using VM Management Tool Usage ............................................................. 9 Turn on a VM ..................................................................................................................... 9 Turn off a VM ..................................................................................................................... 9 Suspend a VM ................................................................................................................... 9 Reset a VM ........................................................................................................................ 9 Shutdown OS in a VM........................................................................................................ 9 Login OS in a VM............................................................................................................... 9 Logout OS in a VM ............................................................................................................ 9 Create a snapshot of a VM .............................................................................................. 10 Revert to a current snapshot of a VM ............................................................................... 10 Revert to a specific snapshot of a VM .............................................................................. 10 Delete a snapshot of a VM ............................................................................................... 10 Delete all snapshots of a VM ........................................................................................... 10 Copy a file from Guest OS of a VM to a client machine .................................................... 10 Copy a file from a client machine to Guest OS of a VM ............................................... 10
Delete a file from Guest OS of a VM ................................................................................ 11 Delete a VM ..................................................................................................................... 11 Execute a program inside Guest OS of a VM ................................................................... 11 Deploy a template on a VM .............................................................................................. 11 Change IP address of Guest OS of a VM......................................................................... 11 Check status of VMs ........................................................................................................ 12
Thomson Reuters
Page 2
Intended Audience
This book is intended for anyone who needs to manage a virtual machine. Users typically include people who do software development and testing or work with multiple operating systems or computing environments: system administrators, software developers, QA engineers, and anyone who wants to manage virtual machines using command-line interface.
Document Feedback
I welcome your suggestions for improving my documentation. If you have comments, send your feedback to panat.jongsamakkeethaworn@thomsonreuters.com
Thomson Reuters
Page 3
Features Highlights
VM Management Tool 0.1 provides the following key features: Manage basic command on ESX and ESXi Manage as Guest on virtual machine Operating system on ESX and ESXi Deploy templates to ESX and ESXi Check a status of VMs on ESX and ESXi
Thomson Reuters
Page 4
where <server> is the path to the ESX or ESXi, <username> and <password> are username and password to control ESX and ESXi. <option> sees CommandLine Options for the various options. 2. If you want to specifically manage each option, type them after | in <option>.
>vmmgmt <server> <username> <password> <VMname> <option|argument>
Command-Line Options
For every command, you must specify the server, username, and password. Table 1 shows all the commandline options. Some options can be set using the form option|arguments. Many arguments can be enabled. For example: option|argument1&argument2&... For any parameters or arguments, it is suggested that any parameter or argument should be within double quote (argument). For example, (a) > vmmgmt 1.1.1.1 user pass vmname status|poweredOn&suspended
OR (b) > vmmgmt 1.1.1.1 user pass vmname status|poweredOn&suspended
Thomson Reuters
Page 5
Option
on off
Arguments Description
N/A N/A Turn on the VM Turn off the VM
Example
vmmgmt 1.1.1.1 user pass vmname on vmmgmt 1.1.1.1 user pass vmname off vmmgmt 1.1.1.1 user pass vmname suspend vmmgmt 1.1.1.1 user pass vmname reset vmmgmt 1.1.1.1 user pass vmname shutdownGuest|osuser&o spass vmmgmt 1.1.1.1 user pass vmname loginGuest|osuser&ospas s vmmgmt 1.1.1.1 user pass vmname logoutGuest vmmgmt 1.1.1.1 user pass vmname snapshot|name&descripti on
suspend
N/A
Suspend the VM
reset
N/A <username of the OS>&<password of the OS> <username of the OS>&<password of the OS> N/A
shutdownGuest
loginGuest
logoutGuest
snapshot
revertcurrentsnapsh ot
N/A
vmmgmt 1.1.1.1 user Revert to the current pass vmname snapshot of the VM
revertcurrentsnapshot
revertsnapshot
<snapshot name>
deletesnapshots
<snapshot name>
vmmgmt 1.1.1.1 user pass vmname revertsnapshot|snapshotn ame vmmgmt 1.1.1.1 user pass vmname deletesnapshots|snapshot name
Thomson Reuters
Page 6
deleteallsnapshot
N/A
Delete all snapshots of the VM Copy file from Guest VM to Host Machine (You need to put filename and path inside "" (double quote))
vmmgmt 1.1.1.1 user pass vmname deleteallsnapshot vmmgmt 1.1.1.1 user pass "VMname" copyfromGuest|Osuser&O spass&c:\test.txt&c:\test. txt
copyfromGuest
copytoGuest
Copy file from Host Machine to Guest VM (You need to put filename and path inside "" (double quote))
deletefromGuest
Delete file from Guest VM (You need to put filename and path inside "" (double quote))
deleteVM
N/A
Delete the VM
execute
Execute a specified program in Guest <OSusername>&< OS in VM with OSpassword>&<pr arguments(if no ograminGuest>&< argument, an arguments>&<Tim argument can be eoutInSeconds> blank.) and specific timeout Deploy a template to programatically chosen VM slot available
deploy
<template name>
Thomson Reuters
updateip
Update IPaddress of vmmgmt 1.1.1.1 user the Guest OS in VM pass vmname according to the changeip|updateip vmlist.xml vmmgmt 1.1.1.1 user pass vmname changeip|Osuser&Ospass &1.1.1.2&255.255.255.0&1 .1.1.1&10.10.10.10&10.10. 10.11
changeip
N/A
Show only VMs that have the same status as in your parameter. (you can input as many status as you want)
Thomson Reuters
Page 8
Turn on a VM
To turn on a virtual machine in ESX or ESXi, type a command like the following:
> vmmgmt 1.1.1.1 user pass vmname on
Turn off a VM
To turn off a virtual machine in ESX or ESXi, type a command like the following:
> vmmgmt 1.1.1.1 user pass vmname off
Suspend a VM
To suspend a virtual machine in ESX or ESXi, type a command like the following:
> vmmgmt 1.1.1.1 user pass vmname suspend
Reset a VM
To reset a virtual machine in ESX or ESXi, type a command like the following:
> vmmgmt 1.1.1.1 user pass vmname reset
Shutdown OS in a VM
To shutdown OS in a virtual machine in ESX or ESXi, type a command like the following:
> vmmgmt 1.1.1.1 user pass vmname shutdownGuest|OSuser&OSpass
Where OSuser and OS password are username and password of the OS.
Login OS in a VM
To login OS in a virtual machine in ESX or ESXi, type a command like the following:
> vmmgmt 1.1.1.1 User Pass VMname loginGuest|OSuser&OSpass
Please note that loginGuest is used to create a session login on network, not the screen on vSphere client.
Logout OS in a VM
To logout OS in a virtual machine in ESX or ESXi, type a command like the following:
> vmmgmt 1.1.1.1 user pass vmname logoutGuest
Please note that logoutGuest is used to disconnect a session login on network, not the screen on vSphere client.
Thomson Reuters
Page 9
Create a snapshot of a VM
To create a snapshot on a virtual machine in ESX or ESXi, type a command like the following:
> vmmgmt 1.1.1.1 user pass vmname snapshot|name&description of the snapshot
Delete a snapshot of a VM
To delete a snapshot of a virtual machine, named snapshot name in ESX or ESXi, type a command like the following:
> vmmgmt 1.1.1.1 user pass vmname deletesnapshot|snapshot name
Description: It will copy a file program(Guest).exe from Guest OS in drive C: and save it into client machine in drive C: as program(Client).exe
Description: It will copy a file program(Client).exe from Client machine in drive C: and save it into Guest OS in drive C: as program(Guest).exe
Thomson Reuters Page 10
Delete a VM
To delete a virtual machine in ESX or ESXi, type a command like the following:
> vmmgmt 1.1.1.1 user pass vmname deleteVM
Description: It will execute program(Guest).exe inside Guest OS in drive C: with the parameter parameters and set timeout as 60 seconds PS, if you blank the timeout, the default timeout is 60 seconds.
Deploy a template on a VM
To deploy a template on a virtual machine in ESX or ESXi, type a command like the following:
> vmmgmt 1.1.1.1 user pass vmname deploy|Template1
Description: It will deploy a specific template Template1 on a automatically chosen free slot.
Description: It will change IP address, Subnet, Gateway, DNS1, and DNS2 accordingly to vmlist.xml
> vmmgmt 1.1.1.1 user pass vmname changeip|OSuser&OSpass&10.10.10.10&255.255.255.0&10.10.10.1&10.10.10.250&10.10. 10.251
Description: It will change IP address => 10.10.10.10, Subnet => 255.255.255.0, Gateway => 10.10.10.1, DNS1 => 10.10.10.250, and DNS2 => 10.10.10.251 using OSuser and OSpass to login Guest OS
Thomson Reuters
Page 11
Description: Display all VMs that have status poweredOn and suspended accordingly to vmlist.xml.
Thomson Reuters
Page 12