Change VMware Disk Persistence mode (on the fly) |
Tuesday, 08 December 2009 by Michel Roth | |||
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. Within the vSphere client, you can’t change this setting while the VM is powered on. 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: 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/
Show/Hide comment form
|