Objective 1.4 - Implement and Manage Storage VMotion Print E-mail
Written by Matthijs van den Berg   
Tuesday, 06 January 2009 13:30

KNOWLEDGE

  • Describe Storage VMotion operation
    Storage VMotion moves a running Virtual Machine from one storage pool to another storage pool on one ESX server. During this process the VM keeps on running while all VM (disk) files are being transported to anther LUN. Both the source and destination LUN must be visible to the ESX servers in the farm.
  • Explain implementation process for Storage VMotion
    Storage VMotion must be done from the commandline of a server. On the particularly server the VMware Remote CLI must be installed. A storage VMotion is always performed from the commandline. Currently (3.5U2) nu official GUI is available.
  • Identify Storage VMotion use cases   
    Storage VMotion can be use in numerous scenarios like:
    • The VM must be placed on a LUN to increase free space on this LUN
    • The disks of a VM must be places from one LUN to different LUNs to optimize performance
  • Understand performance implications for Storage VMotion
    Storage VMotion copies all VM files from a LUN to another LUN via the storage HBA/ NIC controller. This puts a heavy load on the connection possibly influencing performance for this and other VMs. Also during the storage VMotion a snapshot of the VM is made. This process also influence VM and ESX host performance.

SKILLS AND ABILITIES

  • Use Remote CLI to perform Storage VMotion operations
    • Interactive mode
      the command svmotion –interactive enters the interactive mode. In this mode it will prompt the user for all the arguments.  The advantage of this is that the arguments are sanity-tested as you type them in. (there is a typo in the help of svmotion. Type svmotion and see if you can find the typo! Just a little fun!)
    • Non-interactive mode
      In this example we use the VMware storge VMotion appliance (downloadable via VMware.com). First we configure a . visdkrc file in the home directory of the user that will perform the storage vmotion. The content of the file must contain:
      VI_SERVER = 
      VI_USERNAME =
      VI_PASSWORD =
      VI_PROTOCOL = https
      VI_PORTNUMBER = 443
    Next a vmotion can be performed wit the command:svmotion --datacenter -vm '[] /:’
    Example:
    svmotion --datacenter Site_A -vm '[LUN004] VM012/VM012.vmx:LUN001'
    A keep one disk in its current location the following example can be used:
    svmotion --datacenter Site_A -vm '[LUN004] VM012/VM012.vmx:LUN019' --disks
      '[LUN004] VM012/VM012.vmdk:LUN004'
  • Implement Storage VMotion based on various use cases
    • Migration of all virtual disks to target storage location
      svmotion --url=https://myvc.mycorp.com/sdk
      --username=me
      --password=secret
      --datacenter=DC1
      --vm='[old_datastore] myvm/myvm.vmx:new_datastore'
    • Migration of virtual disks to independent target storage locations
      svmotion --datacenter='My DC'
      --vm='[old_datastore] myvm/myvm.vmx: new_datastore'
      --disks='[old_datastore] myvm/myvm_1.vmdk: old_datastore, [old_datastore] myvm/myvm_2.vmdk:
      old_datastore'

TOOLS

  • Remote CLI