Link to home
Start Free TrialLog in
Avatar of sglee
sglee

asked on

can not increase hard drive size in Windows 2008 Virtual Machine

Hi,

  I have a virtual machine in ESXi v5.1 with Windows 2008 Standard 32bit.
  It has 60GB assigned and I need to increase the size as there is a plenty of space on datastore.
  But when I go to EDIT SETTINS/Hard Disk, the hard drive size field is recessed.
  I can change memory size though.
  What can I do?

Thanks.
User generated imageUser generated image
Avatar of Kevin Cross
Kevin Cross
Flag of United States of America image

As far as I know, there is no magic here.  The rules on disk expansion are the same as with a physical system.  You typically have to add another disk, then expand the drive on the OS level using a partition tool.  For Windows, they offer dynamic disks but I have found those are unstable for OS partition --- at least it was years ago when it was first introduced.  You could get corruption, server crashes, and cannot boot.  Dynamic disk for data drives works well, though.

Anyway, VMWare allows you to expand the vmdk:
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1004047

They have a nice write up on my point about the disk partition being a separate concern with some tools/instructions for that part:
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1004071
Avatar of sglee
sglee

ASKER

@Kevin,
 
 Thanks for vmdk option. I will try that on a test VMWare Box.
 Is this due to OS  (Windows 2008 32bit), VM version: 7  or ESXi 5.1 limitation?
Its a bit of both in my experience, though I always leaned more on the Windows side since the behavior on expanding drives is the same on physical hardware.  You can swap out disks on the hardware level to increase capacity but you must use a tool to increase the partition on the Windows side.  With ESXi being an embedded (free edition ESX), we always had to go to the command line with the guest system powered down.
ASKER CERTIFIED SOLUTION
Avatar of Kevin Cross
Kevin Cross
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sglee

ASKER

Would you be able to provide steps to go thru?
It looks like I need to connect to the host using Putty to go to the directory of the VM to execute commands?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sglee

ASKER

I went to Snspshot manager of this VM and did not see any snapshot made.
You wont!

Read My Article, if you still do not believe you have a snapshot!

If you are most likely using a backup application, which has left your VM running on a snapshot for days, you have fallen into the first VMware Admin trap, of looking in snapshot manager for snapshots which are not listed and will not be listed, because they were not created through the GUI!

You need to add, daily Admin checks to all VMs after they have been backed up, to check not running on a snapshot!

Believe in me, your VM is running on a snapshot, now go and read my EE Article, and prove it to yourself!
Andrew, I was hoping you would stop by.  I knew the issue but you far better than I can advise on best ways to move forward.  Leaving you to help here just wanted to let Author know why I stopped commenting.
Avatar of sglee

ASKER

User generated imageUser generated image@Andrew,
 
 Sorry it took so long to revisit this issue. Yes I see two vmdk files in the datastore1:
(1)  TS1.vmdk                 10GB in size / 62GB provisioned
(2)  TS1-000001.vmdk   48GB in size / 62GB provisioned

 And you are right. I have not created a snapshot by myself. I think it is NAKIVO backup software that might have done it.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sglee

ASKER

Ok. I will try that after hours this evening and report back.
I checked other VMs and they have their normal vmdk files (ie. Win7.vmdk). I wonder what causes this kind of problem? Is there a some type of alert mechnism that notifies admins whenever a VM is running off the snapshot?
As I have to manage more and more VMs, checking these kind of activities would be time consuming.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sglee

ASKER

Should I shut down the VM before taking the snapshop?
Can the name of the snapshot be anything?
If you have the opportunity to shutdown the VM, then yes it is best.

Snapshot name will follow the parent name with -0000X.vmdk, X indicating the snapshot number.
Avatar of sglee

ASKER

ok. I will wait until this evening to shut the VM down and create a snapshot. I will report back.
Avatar of sglee

ASKER

Andrew,

  I shut down the VM and ready to create a snapshot, but then I see this. What do I do?
User generated image
Avatar of sglee

ASKER

I went ahead and created a snapshot and here is what I have after the task was completed.
User generated imageUser generated image
Okay, it would appear, some-one has manually created a snapshot, and left it running  on it! (naughty naughty!).

select DELETE ALL (and that will merge all the snapshots into the parent disk, and they will all be gone!)
Avatar of sglee

ASKER

User generated imageUser generated imageSince we were talking about snapshots created by Backup software, I decided to check other VMWare hosts.
Then I discovered that some of them had multiple snapshots like on the screenshots posted.
If there are more than one snapshot already created, can I just choose "DELETE ALL" in the snapshot manager instead of creating a new one and deleting them all?
Avatar of sglee

ASKER

User generated imageSorry I forgot to add this screenshot.
Correct, but be careful these could take a very long time to merge!
Avatar of sglee

ASKER

Andrew,
  I clicked on [Delete All] button in Snapshot manager at 9:30PM EST. It moved pretty quick and it reached 99% in about an hour or so. Now it has been stuck at 99% for almost 4 hours.
  I am curious what is holding up the process. If it shows the progress proportionally whether in time or percentage, it would be helpful because you know how much time is remaining.
  I am hoping that this would be finished before 7AM EST as users would need to access this VM when they come to work.

  If it is still stuck at 99% in next 5 hours, what options do I have other than just waiting?
Avatar of sglee

ASKER

Here is screenshot of the TS1 folder in datastore via WInSCP.User generated image
Avatar of sglee

ASKER

Fyi, to prepare for the worst, a few days ago, I shut downed the TS1 VM and copied entire TS1 folder in datastore to an external USB hard drive.

User generated image
Be Patient.....

snapshots, take time to merge, seconds, minutes, days, hours, weeks......this depends on the size and speed of your datastore.

once you have started you have no options but let it complete.....

if you mess, meddle, stop, cancel, restart host, restart VM, you risk the chance of causing virtual disk corruption, and the loss of a virtual disk.

As stated, it can appear to hang at 90, 95, or 99%.....

this is normal....
Avatar of sglee

ASKER

I get that. But the problem is that users will begin to log in in 4 hours. If this does not complete, it would be faster to stop this, disable this VM, copy TS1 folder from external USB into datastore and add this to inventory?
I really can not afford to wait this to complete passed 3 hours from now on.
Copying TS1 to datastore will take less than 2 hours. Since this is a terminal server, there aren't changes that I need to worry about.
What do you think?
Avatar of sglee

ASKER

It is finally done. Now I can change the hard disk size and will do that over the weekend.

Thanks Andrew!
User generated imageUser generated image
Avatar of sglee

ASKER

It took 7 hours to merge! Just imagine if the VM size was a lot bigger than 60GB?
This is something that you should do over the weekend.
Thanks, I hope it's been an Education!

Correct, arrange emergency downtime!

and Regularly Check those Snapshots! DAILY!

Larger the snapshot, long it takes to MERGE!

and whilst the VM is running on a snapshot disk, performance is poor!
Avatar of sglee

ASKER

I hope it's been an Education! ---> No doubt!
What was the link again where I can learn to set up an alert (when there is a leftover snalshot in VM)?
I've not got a link, it's just a standard vCenter Server, Snapshot alert.
Avatar of sglee

ASKER

Got you. I will look for it in my vCenter Server.