vSphere: Storage vMotion Fails with a Timeout


image

When I tried to Storage vMotion a VM to another LUN I got an “operation timed out error”:

image

After analyzing the vpxd.log, I found the following lines:

image

The best part I found out, is that the VM was rolled back to it’s old location without losing data or getting corrupt.

This problem is documented in KB1010045. The following solution will resolve the timeout problem:

Increase the Storage VMotion fsr.maxSwitchoverSeconds setting in the virtual machine configuration file to a larger value.

The default is 100 seconds.

To modify fsr.maxSwitchoverSeconds:

  1. Right-click the virtual machine and click Edit Settings.
  2. Click the Options > Advanced > General.
  3. Click Configuration Parameters.
  4. From the Configuration Parameters window, click Add Row.
  5. For the Name field,  fsr.maxSwitchoverSeconds and for the Value field enter the new timeout value.
  6. Click OK twice to save.
  7. Restart the virtual machine for the changes to take effect.

You don’t want to change this by hand, so I created a PowerCLI script which will set the fsr.maxSwitchoverSeconds to 300 seconds for all your VM’s:

$vms = Get-View -ViewType VirtualMachine | where {-not $_.config.template}

    $vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
      
    $extra = New-Object VMware.Vim.optionvalue
    $extra.Key="fsr.maxSwitchoverSeconds"
    $extra.Value="300"

    $vmConfigSpec.extraconfig += $extra
    

foreach($vm in $vms){
    $vm.ReconfigVM($vmConfigSpec)
}

After changing the value to 300 seconds, I was able to Storage vMotion the VM.

Advertisements

10 thoughts on “vSphere: Storage vMotion Fails with a Timeout

  1. Pingback: Tweets die vermelden vSphere: Storage vMotion Fails with a Timeout « ICT-Freak.nl -- Topsy.com

  2. Pingback: uberVU - social comments

  3. Kevin

    Is it ok to assume this script won’t harm live VM’s and guests in my production environment? I have to shut down the VM’s to make this change manually. Someone recommended I edit the vmx files directly but I was waved away from that as I’m told it’s a good way to crash your VMs.

    Reply
    1. afokkema Post author

      I used this script in a production environment for three times now, and it never gave any trouble. But just to be sure, test the script in a lab to see what it does. This method isn’t supported by VMware but it solved my problem.

      Good luck and let me know.

  4. Kevin

    Fails.

    Property ‘extraconfig’ Cannot be found on this object; make sure it exists and is settable.

    I’m going to make sure I didn’t bone up the script when I copied it.

    Reply
  5. Markus

    Hi,

    i would have one question for this script.

    does it need a reboot of the vm to apply the setting after executing the script?

    thx

    Markus

    Reply
    1. Wim

      I also had this same issue with a storage vmotion (in combination with thin provisioning). The storage vmotion worked fine for more than 200 VM’s and suddenly it ran into timeouts. I used the solution as described above.
      To answer to the quesion of Marcus: you don’t need to reboot after the execution of the script.

      Wim.

  6. Pingback: Lag When Dragging a Window Between Monitors in VMware View

  7. Jesse Sarnovsky

    Reblogged this on Jesse's Blog and commented:
    I was just about to write my own PowerCLI script to update the timeout setting across multiple hosts/clusters when I ran across this post with the script already written. You saved me some time, thanks!

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s