Best Practices of Resizing Windows Virtual Machine Disks on VMWARE ESX Server 3
版权声明:原创作品,如需转载,请与作者联系。否则将追究法律责任。 |
Best Practices of Resizing Windows Virtual Machine Disks on VMWARE ESX Server 3
Author : VM2008
====================================================
Expand:
Workaround 1 : vmkfstools + diskpart ( additional VM need)
Workaround 2: VMWARE Converter (Best and Easy)
Workaround 3: vmkfstools + Parted LiveCD (for no VMWARE Converter users or VMWARE Converter doesn’t work)
Step 1) Power off Virtual Machine
Step 2) Expanding the VMDK
Log into the ESX server via ssh (use Putty) Find the .vmdk file you want to expand and use vmkfstools to expand it:
vmkfstools –X xxxxG /vmfs/volumes/file_system_label/dir/myDisk.vmdknotes: chance xxxx with whatever size you want it to be
Sample : vmkfstools -X 30g /vmfs/volumes/ESX01_LOCAL01/WSOEx64/WSOEx64.vmdk
ls -lah WSOEx64.vmdk
Step 3) Power up the virtual machine
Step 4) Go to command prompt type "chkdsk" - This is critical - it may cause issues if you skip this step.
Step 5) Download the Parted LiveCD from here (A linux based free GUI tool like Partition Magic
VM2008 Notes: 0.3.4-8 doesn’t work for VMWARE machine, but 0.3.4-7 works well Step 6) Mount the downloaded ISO as the CD-Rom of the Virtual Machine. You can mount the ISO directly or burn it to CD then mount the CD-Rom to the Virtual Machine.
Step 7) Restart the virtual machine and boot from the CD. (You may have to hit ESC to bring up the boot menu.)
Step 8) Choose your Language and Keyboard Layout
Step 9) Click the partition you want to expand then apply change
Step 10) Reboot, Power up the virtual machine
====================================================
Shrink:
Workaround 1: VMWARE Converter (Best and Easy)
Workaround 2: Parted LiveCD + cloning utility (Ghost) (for no VMWARE Converter users or VMWARE Converter doesn’t work)
Step 1) Power off Virtual Machine
Step 2) Download the Parted LiveCD from here (A linux based free GUI tool like Partition Magic
VM2008 Notes: 0.3.4-8 doesn’t work for VMWARE machine, but 0.3.4-7 works well Step 3) Mount the downloaded ISO as the CD-Rom of the Virtual Machine. You can mount the ISO directly or burn it to CD then mount the CD-Rom to the Virtual Machine.
Step 4) Restart the virtual machine and boot from the CD. (You may have to hit ESC to bring up the boot menu.)
Step 5) Choose your Language and Keyboard Layout
Step 6) Click the partitions, just shrink the partition, no need to move partitions from right to left to release the free space near the right(end) of vmdk file.
Step 8) create a new vmdk file at the desired size
vmkfstools -a lsilogic -c 15G HA_TEST_small.vmdk ls –lah HA_TEST_small.vmdk Step 9) mount the new vmdk in your VM, and use a disk imaging/cloning utility (ghost, trueimage,etc) to move the VM's primary disk contents to the secondary disk
Step 10) detach the old vmdk from your VM, Power on the VM
VM2008 Notes:: Old solution : Parted LiveCD + vmkfstools doesn’t work under ESX Server 3
==================================================== 本文出自 “虚拟化和存储” 博客,转载请与作者联系! 本文出自 51CTO.COM技术博客 |


rolandliu
博客统计信息
热门文章
最新评论
友情链接