Storage VMotion Command-Line Syntax
In addition to using the Migration wizard, you can initiate migrations with Storage VMotion from the vSphere
Command-Line Interface (vSphere CLI) using the
svmotion
command.
For more information about installing and using the vSphere CLI, see vSphere Command-Line Interface Installation
and Reference.
You can run the
svmotion
command in either interactive or noninteractive mode.
n
To use the command in interactive mode, type
svmotion --interactive
. You are prompted for all the
information necessary to complete the storage migration. When the command is invoked in interactive
mode, all other parameters given are ignored.
n
In noninteractive mode, the
svmotion
command uses the following syntax:
svmotion [Standard CLI 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.
On Windows systems, use double quotes instead of single quotes around the values specified for the
--vm
and
--disks
options.
For more information on the standard CLI options, see the vSphere Command-Line Interface Installation and
Reference.
Table 16-2
describes the parameters for the
svmotion
command.
Table 16-2.
svmotion
Command Parameters
Parameter
Description
<datacenter>
The datacenter that contains the virtual machine to be migrated. You must quote the name
if it contains white space or other special characters.
<VM config datastore
path>
The datastore path to the virtual machine’s configuration file. If the path contains white
space or other special characters, you must quote it.
<new datastore>
The name of the new datastore to which the virtual machine configuration file or disk is to
be moved. Do not include brackets around the name of the new datastore.
--disks
If you do not specify this parameter, all virtual disks associated with a virtual machine are
relocated to the same datastore as the virtual machine configuration file. By specifying this
parameter, you can choose to locate individual virtual disks to different datastores.
To keep a virtual disk on its current datastore, use the
--disk
s option for that disk with its
current datastore as the
<new datastore>
.
<virtual disk datastore
path>
The datastore path to the virtual disk file.
Determine the Path to a Virtual Machine Configuration File
The path to the virtual machine configuration file is a necessary argument to the
svmotion
command.
You must specify the datastore path to the virtual machine’s configuration file in the
<VM config datastore
path>
svmotion
command.
Procedure
1
In the vSphere Client inventory, select the virtual machine and click the Summary tab.
2
Click Edit Settings to display the Virtual Machine Properties dialog box.
vSphere Basic System Administration
198
VMware, Inc.
Summary of Contents for 4817V62 - vSphere - PC
Page 13: ...Getting Started VMware Inc 13...
Page 14: ...vSphere Basic System Administration 14 VMware Inc...
Page 24: ...vSphere Basic System Administration 24 VMware Inc...
Page 38: ...vSphere Basic System Administration 38 VMware Inc...
Page 76: ...vSphere Basic System Administration 76 VMware Inc...
Page 85: ...Virtual Machine Management VMware Inc 85...
Page 86: ...vSphere Basic System Administration 86 VMware Inc...
Page 98: ...vSphere Basic System Administration 98 VMware Inc...
Page 131: ...3 Click OK Chapter 11 Creating Virtual Machines VMware Inc 131...
Page 132: ...vSphere Basic System Administration 132 VMware Inc...
Page 140: ...vSphere Basic System Administration 140 VMware Inc...
Page 172: ...vSphere Basic System Administration 172 VMware Inc...
Page 182: ...vSphere Basic System Administration 182 VMware Inc...
Page 200: ...vSphere Basic System Administration 200 VMware Inc...
Page 207: ...System Administration VMware Inc 207...
Page 208: ...vSphere Basic System Administration 208 VMware Inc...
Page 278: ...vSphere Basic System Administration 278 VMware Inc...
Page 289: ...Appendixes VMware Inc 289...
Page 290: ...vSphere Basic System Administration 290 VMware Inc...
Page 324: ...vSphere Basic System Administration 324 VMware Inc...
Page 364: ...vSphere Basic System Administration 364 VMware Inc...