6.5

Table Of Contents
If VMware Tools is not currently installed on the virtual machine, you can perform only a hard reset
operation.
a Check that VMware tools is installed so that you can reset the virtual machine with the default
powerop_mode, which is soft.
vmware-cmd -H <vc_system> -U <user> -P <password> --vihost
<esx_host> /vmfs/volumes/Storage2/testvm/testvm.vmx gettoolslastactive
See “Retrieving Virtual Machine Aributes,” on page 125.
b Use the reset option to shut down and restart the virtual machine.
vmware-cmd -H <vc_system> -U <user> -P <password> --vihost
<esx_host> /vmfs/volumes/Storage2/testvm/testvm.vmx reset soft
n
Suspend - You have two options for suspending a virtual machine.
n
The suspend option with the hard powerop_mode unconditionally shuts down a virtual machine.
vmware-cmd -H <vc_system> -U <user> -P <password> --vihost
<esx_host> /vmfs/volumes/Storage2/testvm/testvm.vmx suspend hard
n
The suspend option with the soft powerop_mode runs scripts that result in a graceful shut-down of
the guest operating system and shuts down the virtual machine. VMware Tools must be installed
for soft powerop_mode.
vmware-cmd -H <vc_system> -U <user> -P <password> --vihost
<esx_host> /vmfs/volumes/Storage2/testvm/testvm.vmx suspend soft
Connecting and Disconnecting Virtual Devices
You can connect and disconnect virtual devices by using the connectdevice and disconnectdevice
options of vmware-cmd.
The following types of devices are supported.
n
Network adapters
n
CD/DVD drives
n
Floppy drives
These devices must already be dened in the virtual machine virtual hardware list.
The command options connect and disconnect a dened ISO or FLP le or a physical device on the host.
After you connect a device, its content can be accessed from the guest OS. For network adapters, the options
connect the virtual NIC to its dened port group or disconnect the NIC. This is equivalent to selecting or
deselecting the Connected check box in the vSphere Web Client.
N The terms CD/DVD drive, Floppy drive. and Network adapter are case-sensitive.
You can connect or disconnect devices if the following conditions are met.
n
The virtual machine has a guest operating system that supports hot-plug functionality. See the
Operating System Installation documentation.
n
The virtual machine is using hardware version 7 or later.
n
The virtual machine is powered on.
Chapter 8 Managing Virtual Machines
VMware, Inc. 129