Change VMware Disk Persistence mode (on the fly)
Tuesday, 08 December 2009 by Michel Roth
Quest vWorkspace allows you to set the disk persistency of virtual desktop. This is done from the vWorkspace management console. If you are a commandline kind of guy, check this out.

When you have some vmdk’s with the Independent Persistent mode enabled. You might get problems with Storage vMotion (some DMotion errors). I was able to fix this with disabling  the Independent mode and create and remove a snapshot of the VM. But within the vSphere client you’re not able to change the Independent setting of a running VM. With PowerCLI you can!

The first one-liner will return all the vmdk’s with the Independet Persistent mode enabled:

Get-VM | % { Get-HardDisk -VM $_ | Where {$_.Persistence -eq "IndependentPersistent"} }

This is what you see in the console.

image

Within the vSphere client, you can’t change this setting while the VM is powered on.

image

But why use the vSphere client when we have PowerCLI ;-) . If you run the following one-liner, it will return all the vmdk’s with Independent Persistent mode enabled. The next step is to disable this setting.

Get-VM | % { Get-HardDisk -VM $_ | Where {$_.Persistence -eq "IndependentPersistent"} | `% {Set-HardDisk -HardDisk $_ -Persistence "Persistent" -Confirm:$false} }

This is the output you’ll see:

image

When you check the settings within the vSphere client, you’ll notice that the Independent mode is disabled.

Source: http://ict-freak.nl/2009/12/01/powercli-change-persistence-mode-on-the-fly/


Related Items:

Quest vWorkspace Mac AppPortal Released (23 November 2009)
Quest vWorkspace Client for Mac (26 October 2009)
vSphere and MSCS (20 August 2009)
VMware View: Reset, Refresh, Recompose, Rebalance? (8 July 2009)
How To Upgrade To From VI 3.x To vSphere 4 (3 June 2009)
Get Thin Provisioning working for you in vSphere (26 October 2009)
How To Use the /autodelete Option With vWorkspace AppPortal (30 June 2009)
Free Thin Provisioning In VI 3.5 (13 November 2008)
Citrix Desktop Switcher (12 June 2009)
Amazon EC2 AWS Management Console – Bundling AMIs (2 September 2009)
Comments (0)