Hello All,
How do you resize partition sizes in VMware ESXi 3.5 (version 110271, VI 2.5 build 103682, VCenter 2.5.0 build 104215) and Windows Server 2008 (these were MBR and Simple volumes)?
1) VI client built-in functionality (VI 2.5 build 103682)
2) DISKPART (as included with Windows 2003)
3) GParted (gparted-livecd-0.3.4-11.iso)
4) VMware Converter (3.0.3 build 89816)
5) vmkfstools (VMware ESXi 3.5 (version 110271)
6) none of the above. Re-install the OS.
Spoiler plot... this does NOT have a happy ending. The answer is 6. If you think you can prove me wrong with the versions above, please let me know how.
If you're a reader of my blog skip to the next paragraph, since this is an executive summary for the non-regulars. I'm in the process of finally upgrading to Exchange 2007 from 2003. I've decided to make it a challenge and do it on a platform I have had no experience with, Windows Server 2008. All my clients and all my servers are Windows 2003 or a variation (e.g. R2, x64, etc). To make it even more difficult, even though I have extensive experience with VMware Server and Workstation, I'm running it under VMware ESXi 3.5 [embedded & w/virtual center]. ESXi is a different beast than other VMware products. It contains a WHOLE lot more functionality especially when you add Virtual Center.
After a few months of planning on functionality & redundancy desired, hardware sizing, migration plans, and a number of other factors, I took the plunge into testing. So, I created my base OS images of Windows 2003 (x32) and Windows 2008 (x64) to test for 1 month which turned into 4 months. After I was done testing installs and configurations, I deleted all those images and started again. The party began.
So, I setup base OS images with 30GB partitions since I was planning on adding a minimum of 14 images & 12 virtual machines (aka vm's). Space is a concern since it is 6 x 300GB SAS 10k hard drives in direct attached storage (DAS) in a RAID 10 config. Problem was I mistakenly made the 2008 system partition size 30GB. I figured, it would be large enough. I'm blogging about this, so obviously it was not and the attempted fix wasn't a quick 1-2-3 or even a 2-3 hour fix.
Attempt #1 - How VMware hard drive resizing is suppose to work
So, after making my 2008 partition size 30GB, I figured the beauty of VMware would show of it's skills. Similar to VMware Server & Workstation, you right-click and enter the new larger hard drive size, and click OK, and a few seconds later it would be increased to 50GB. No such luck. Attempting this resulted in ESXi simply ignoring my request to enlarge the partition. No error, nothing. It stayed on 30GB. A bit of research indicated that Windows Server 2008 is NOT supported for hard drive increases via the VMware Infrastructure Client (aka VI). So, I looked into the other options.
Attempt #2 - Diskpart
This techtarget.com article talks about Diskpart, but all the screenshots are 2003 related, so I didn't even bother, since I figured since diskpart shipped with Windows 2003 SP1, it probably was a dead-end solution. Diskpar was Windows 2003 related, diskpart was 2003 SP1 related. You can find a good article about Exchange 2003 and align your partitions for database storage here.
Attempt #3 - GParted
As per attempt #2, that same techtarget article talks about using an open-source partition tool. I uploaded the ISO to the datastore, did the booting, and attempted to modify the partition to 50GB. It reported no additional space execpt for one more 1MB. Obviously, that isn't correct. Next....
Attempt #4 - VMware Converter
I tried this 2 different ways since some sites including the above techtech article here talked about running VMware Converter directly on the server you are attempting to modify the hard drive partition size, and via a remote server. In my case I attempted via Virtual Center. Both ways failed with the same error "Unable to determine Guest Operating system". Problem: Windows Server 2008 is not supported. Oops. Next attempt.
Attempt #5 - vmkfstools
Run a single command to enlarge your partition ("vmkfstools -X 50g ExchangeSrv.vmdk" ["50g" is for 50GB the size you want, and "ExchangeSrv.vmdk" is for the server name]) and all your troubles go away. Or that's how all the documentation sounded. Problem is, you can't run this command via VI or a command line on ESXi out-of-the-box. A number of advanced functionality for ESX require run command line based commands. The only way to do this with ESXi, is to enable console access. This is NOT supported on ESXi by VMware and use your judgement (similar warnings when using regedit). So, to gain console access, I found this handy blog posting that gave a summary how to enable SSH access for ESXi (I found it better than the VMware KB tech article). This is when I had to remember my days back on AIX with the vi editor. Since you need to modify a configuration file, and it's a bit tricky. You'll need to google "vi" if you need help. I then had ssh root access to my ESXi server.
So, I ran the command and then issued a "ls -l" and noticed the server vmdk had increased to 50GB. Awesome, I figured I was done. Nope. So, I then had to run the process in attempt #3, GParted. I ran that and it saw the extra 20GB and enlarged the partition. Almost there. Until I rebooted the server and it failed to boot with a non-bootable error of "winload.exe is missing or corrupt." I started the repair process and then realized I didn't want a base image to be off a corrupt partition or possible issues with files. So, at this point I scrapped the process and did a re-install of 2008.
The best part of Windows Server 2008 is I can install it under 40 minutes on the hardware I'm running. So, this makes it very fast. Also, I recommend you make OS partitions at least 40-50GB. I plan on using a secondary partition for Exchange databases, but I still wanted extra space on the 1st partition. Here are the Microsoft Windows Server 2008 System Requirements. So, I have my 50GB OS partition and a 2nd for the Exchange databases. I return to installing Exchange now.
Good site to explain VMware's resizing of Virtual Disks (primarily for Windows 2003)
Side Notes
- Windows Server 2008 annoyance, why is hibernation enabled on a server OS. I quickly noticed storage was being used up faster than it should. I found out a hibernate file is created on the root of c:\. To delete it and disable this "very useful" [note sarcasm] server feature, open a command prompt and enter "powercfg -h OFF". And it'll delete the file and disable the feature.
- thin provisioning capability (means, create a 50GB partition, and have it dynamically grow. So, only use what you need). Only downside of this, is a reduction in performance. It's only available to SAN based storage. I'll need to explore that in the future.
- I tend to recommend folks avoid Dynamic Disks and GPT based partitions unless there is a requirement to select these since compatibility can easily become a problem with these types of disks. GPT is used when you want partitions over 2TB, as per Dynamic disks, for online resizing (I think) and use of OS based RAID types.
Until next time,
-Ben
Sunday, December 7, 2008
In pursuit of my Exchange 2007 deployment - the ugly of VMware ESXi 3.5 and hard drive resizing for Windows Server 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment