6.5
Table Of Contents
- vSphere Command-Line Interface Concepts and Examples
- Contents
- About This Book
- vSphere CLI Command Overviews
- Introduction
- List of Available Host Management Commands
- Targets and Protocols for vCLI Host Management Commands
- Supported Platforms for vCLI Commands
- Commands with an esxcfg Prefix
- ESXCLI Commands Available on Different ESXi Hosts
- Trust Relationship Requirement for ESXCLI Commands
- Using ESXCLI Output
- Connection Options for vCLI Host Management Commands
- Connection Options for DCLI Commands
- vCLI Host Management Commands and Lockdown Mode
- Managing Hosts
- Managing Files
- Managing Storage
- Introduction to Storage
- Examining LUNs
- Detach a Device and Remove a LUN
- Reattach a Device
- Working with Permanent Device Loss
- Managing Paths
- Managing Path Policies
- Scheduling Queues for Virtual Machine I/O
- Managing NFS/NAS Datastores
- Monitor and Manage FibreChannel SAN Storage
- Monitoring and Managing Virtual SAN Storage
- Monitoring vSphere Flash Read Cache
- Monitoring and Managing Virtual Volumes
- Migrating Virtual Machines with svmotion
- Configuring FCoE Adapters
- Scanning Storage Adapters
- Retrieving SMART Information
- Managing iSCSI Storage
- iSCSI Storage Overview
- Protecting an iSCSI SAN
- Command Syntax for esxcli iscsi and vicfg-iscsi
- iSCSI Storage Setup with ESXCLI
- iSCSI Storage Setup with vicfg-iscsi
- Listing and Setting iSCSI Options
- Listing and Setting iSCSI Parameters
- Enabling iSCSI Authentication
- Set Up Ports for iSCSI Multipathing
- Managing iSCSI Sessions
- Managing Third-Party Storage Arrays
- Managing Users
- Managing Virtual Machines
- Managing vSphere Networking
- Introduction to vSphere Networking
- Retrieving Basic Networking Information
- Troubleshoot a Networking Setup
- Setting Up vSphere Networking with vSphere Standard Switches
- Setting Up Virtual Switches and Associating a Switch with a Network Interface
- Retrieving Information About Virtual Switches
- Adding and Deleting Virtual Switches
- Checking, Adding, and Removing Port Groups
- Managing Uplinks and Port Groups
- Setting the Port Group VLAN ID
- Managing Uplink Adapters
- Adding and Modifying VMkernel Network Interfaces
- Managing VMkernel Network Interfaces with ESXCLI
- Add and Configure an IPv4 VMkernel Network Interface with ESXCLI
- Add and Configure an IPv6 VMkernel Network Interface with ESXCLI
- Managing VMkernel Network Interfaces with vicfg-vmknic
- Add and Configure an IPv4 VMkernel Network Interface with vicfg-vmknic
- Add and Configure an IPv6 VMkernel Network Interface with vicfg-vmknic
- Setting Up vSphere Networking with vSphere Distributed Switch
- Managing Standard Networking Services in the vSphere Environment
- Setting the DNS Configuration
- Manage an NTP Server
- Manage the IP Gateway
- Setting Up IPsec
- Manage the ESXi Firewall
- Monitor VXLAN
- Monitoring ESXi Hosts
- Index
n
Virtual machine disks must be in persistent mode or be raw device mappings (RDMs). For physical and
virtual compatibility mode RDMs, you can migrate the mapping le only. For virtual compatibility
mode RDMs, you can use the vSphere Web Client to convert to thick-provisioned or thin-provisioned
disks during migration as long as the destination is not an NFS datastore. You cannot use the svmotion
command to perform this conversion.
n
The host on which the virtual machine is running must have a license that includes Storage vMotion.
n
The host on which the virtual machine is running must have access to both the source and target
datastores.
n
A particular host can be involved in up to four migrations with vMotion or Storage vMotion at one
time. See Limits on Simultaneous Migrations in the vCenter Server and Host Management documentation for
details.
If you use the vSphere Web Client for migration with svmotion, the system performs several compatibility
checks. These checks are not supported by the svmotion vCLI command.
Running svmotion in Interactive Mode
You can run svmotion in interactive mode by using the --interactive option. The command prompts you
for the information it needs to complete the storage migration.
In interactive mode, the svmotion command uses the following syntax.
svmotion <conn_options> --interactive
When you use --interactive, all other options are ignored.
I When responding to the prompts, use quotes around input strings with special characters.
Running svmotion in Noninteractive Mode
You can run svmotion in noninteractive mode if you do not use the --interactive option.
I When you run svmotion, --server must point to a vCenter Server system.
In noninteractive mode, the svmotion command uses the following syntax.
svmotion [standard vCLI options] --datacenter=<datacenter_name>
--vm <VM config datastore path>:<new datastore>
[--disks <virtual disk datastore path>:<new datastore>,
<virtual disk datastore path>:<new datastore>]
Square brackets indicate optional elements, not datastores.
The --vm option species the virtual machine and its destination. By default, all virtual disks are relocated to
the same datastore as the virtual machine. This option requires the current virtual machine conguration le
location. See “Determine the Path to the Virtual Machine Conguration File and Disk File,” on page 64.
The --disks option relocates individual virtual disks to dierent datastores. The --disks option requires the
current virtual disk datastore path as an option. See “Determine the Path to the Virtual Machine
Conguration File and Disk File,” on page 64.
Determine the Path to the Virtual Machine Configuration File and Disk File
To use the --vm option, you need the current virtual machine conguration le location.
Procedure
1 Run vmware-cmd -l to list all virtual machine conguration les (VMX les).
vmware-cmd -H <vc_server> -U <login_user> -P <login_password> -h <esx_host> -l
vSphere Command-Line Interface Concepts and Examples
64 VMware, Inc.