How to grow a virtual machine disk bigger?

Hello there,

I was talking with a customer very recently who used a very old and less than ideal method to grow a virtual machine disk.  I realized that something I have done for a long time and take for granted that everyone knows is not actually known by everyone.  So here we are and now you will see how – if you need to – to grow a virtual machine disk.

What I will walk us through below will work as I show it for Windows 2008 and later.  So that includes Win7 and later too.  There is no outage or restart necessary.  I will include a link at the end to a tool that you can use with Linux or Windows for that matter if your Windows is older than what we are looking at here.

I am working in vSphere 5.5 Update 1, and using the vSphere Web Client but this will work with older versions as well as using the vSphere Client.

First we look at the VM disk info.  We can see that Hard disk 1 (drive C:) is 40 GB (you can click on the image for a bigger look).

start

You can see from the screenshot below that we do in fact have a 40 GB drive C:.

diskinfoinside

Now we need to edit the settings for the VM that needs a bigger drive C:.  Our VM name is Junk.

editsettings

Now you should be able to see the virtual hardware settings.  See below for mine.

sizebeforesettings

Note where it says 40 GB?  Lets change it read as 70 and than hit OK to complete the work.

nwsize

For a fairly brief moment you can see in the Recent Tasks window a reconfigure message.

reconfig

Now we need to work inside the VM.  Remember it is still running(this is particularly cool for the old timers among us who remember doing the machine off!  We need to be in Server Manager, Storage, and Disk Management.  Once there, you should select Rescan Disks from the Action menu as seen below.

rescan

Once that completes, you will now see additional storage for Disk 0 and it will be unallocated as seen below.

seennew

Now you need to click on the C: partition that is in the middle and right click.  Than select the Extend Volume choice.

extend

You will have a number of choices but you can just hit Next, and than Finish.

extend1

extend2

Once you hit Finish, as seen above, you are done.  it should not take long and you should see C: as bigger now.

extendedfinished

Now if you look in Computer you will see something like below.  But definitely drive C: should be bigger.

NewinComputer

And that is it.  You now have a bigger disk.  Questions?  Let me know.

You an use this tool to do this sort of thing with Linux.  I have used it with Linux and various versions of Windows and while it did not always work, it never corrupted or lost data!

And are you curious what prompted this?  What did I hear?  When the customer wanted a bigger disk he added a new VMDK to the VM, and use the operating system to add that disk to the existing disk.  This was something that was done long ago, but I never liked it at all so I never used this technique.  When I had to, I used the tool I reference above for Linux and it worked great.

Michael

=== END ===

Tagged with: , ,
Posted in How To
3 comments on “How to grow a virtual machine disk bigger?
  1. Calgary VMUG says:

    Now if there were a way to shrink the disk that would be wonderful.

    • Agreed. I think the pieces are all there in modern OS and arrays, but I think not all easily linked yet. I will write it out if I figure it out.

      Michael

  2. […] for similar directions for Windows? See this post by Michael […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: