If you use VMWare Workstation and regularly develop with VMs, odds are you will need to expand your VMWare Workstation disk at some point in time.
Unfortunately, there is one MAJOR limitation with expanding VMDK files--you cannot have any snapshots!!
So, if you DO have snapshots in place, you can do one of 2 things:
So, there are essentially 2 ways to accomplish this:
So, of course, a more appealing approach is to instead use the command line utility in conjuction with PowerShell.
The tool responsible for expanding VMWare Disks is called vmware-vdiskmanager.exe which can be found at this path: "C:\Program Files (x86)\VMware\VMware Workstation\vmware-vdiskmanager.exe"
The sample command can be found by entering /? at the command line:
Unfortunately, there is one MAJOR limitation with expanding VMDK files--you cannot have any snapshots!!
So, if you DO have snapshots in place, you can do one of 2 things:
- Clone the existing state of the virtual machine to a new virtual machine
- Delete all existing snapshots
So, there are essentially 2 ways to accomplish this:
- Use the VMWare Workstation Console
- Use the command line (or preferably PowerShell) to accomplish this.
- Open the VMWare Workstation console
- Open the target virtual machine
- Click on Edit virtual machine settings
- Select the Hard Disk for the virtual machine
- On the right hand pane, hover over the Utilities menu and select the Expand menu item
- When the Expand dialog opens, enter the new target disk size
- Wait until the disk is fully expanded
So, of course, a more appealing approach is to instead use the command line utility in conjuction with PowerShell.
The tool responsible for expanding VMWare Disks is called vmware-vdiskmanager.exe which can be found at this path: "C:\Program Files (x86)\VMware\VMware Workstation\vmware-vdiskmanager.exe"
The sample command can be found by entering /? at the command line:
vmware-vdiskmanager.exe -x 36GB myDisk.vmdk
$vdiskMgr = "C:\Program Files (x86)\VMware\VMware Workstation\vmware-vdiskmanager.exe" $srcDisk = "C:\Virtual Machines\Windows2K8R2\Windows Server 2008 R2 x64.vmdk" $expandSwitch = "-x" $targetSize = "80GB" #Run VMWare Expand Disk Command Write-Host $vdiskMgr $expandSwitch $targetSize $srcDisk & $vdiskMgr $expandSwitch $targetSize $srcDisk
No comments:
Post a Comment