VMDK Thick to Thin or Shrink

We are setting up a new backup solution for a client who was previously configured by another source.

ESXI 5.1, Windows Server 2008 R2

Many of the sites have data drives which are 2TB.  We will be using Veeam to do the backups, so the snapshots cannot process at this size.

The servers are set up as follows, most all the same:

C: drive is 80gb
D: drive is 2TB and has all data + the Sysvol and NTDS folders
E: drive is 250gb and used for Shadow Copy

The current disks are Thick provisioned.  I was going to add a new drive and robocopy the data over, but then saw they had the Sysvol and NTDS folders, so was thinking there may be another way to achieve this.

I've read a few articles about V2V the VM.  Can I do this and only pick the Data drive (D:) to convert, then add the new thin provisioned drive and remote the old?  What impact will this have since it's holding the sysvol and ntds data?

Are there other options which are safer, easier, etc?
Who is Participating?
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
I posted the info, (http:#a39780546) in my first post and articles to link to the files.

5.5 is the latest version you should be using, Install on the VM to be converted is recommend and Best Practice.

There is no estimate, but it will give a time for conversion when you start the process.

You can decrease the conversion time, by disabling SSL, also posted in first post.

Not got a clue, what is referred to as Node ID?

SCSI ID maybe? (disk and drive letter).

I would read my FAQ, because P2V, 25% of the time are about luck! (sometimes it's not straightforward!)

Personally, I would do the VMDK hack!
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Hi Derek

The only supported method, of shrinking a drive is to use VMware vCenter Converter Standalone.

HOW TO: FAQ VMware P2V Troubleshooting

HOW TO:  P2V, V2V for FREE - VMware vCenter Converter Standalone 5.5

HOW TO: Improve the transfer rate of a Physical to Virtual (P2V), Virtual to Virtual Conversion (V2V) using VMware vCenter Converter Standalone 5.0

You will need to select all the drives, you need to convert including the OS (C:) drive for the conversion, and then you could discard the new (C:) drive, and just use the "shrunken" D: drive.

BUT....is this a Domain Controller, because the recommendation/best practice is to create a new Server, Promote to DC, and then Transfer Roles.

Would you be interested in a hack and slash (non-supported method of shrinking?)

To be honest with you P2V/V2V of Active Directory are not really supported either.

Rough Summary, you use a 3rd party partition tool, or Disk Management (no sure you can shrink, only extend!), to shrink the partition down to 10GB less than what you need the virtual machine disk to be...e.g.

lets say you want to reduce size of 2TB disk to 250GB.

reduce the OS parition inside the VM to 240GB (safe margin), then we alter the VMDK file sizes, to 250GB. - simply.

VMDK is 250GB, OS partition is 240GB.

(this mod just chops OFF, everything after 250GB). But should be safe, because it's been chopped after the OS partition the 10GB safe margin. Let me know, and I'll post the details.
DerekFGAuthor Commented:
Some of the servers do not have enough room in the datastore to fully convert the whole VM to a new one, which is why I was looking at alternatives.

Question - I see if I go on the server to Disk Management, I can select the data volume and choose Shrink Volume.

The following is shown, yet I am a bit scared to hit Shrink without verifying that it's going to play nice since it is a VM.

Attached picture of what it shows, I'd like to reduce it to 1.5TB~
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
BEFORE you do any Partition Mangling, you need to ensure you have a FULL Backup. (not a snapshot).

Disk Management features work in VMs, just cannot remember, because move from different OS to OS.

Did you read the hack and slash method?
DerekFGAuthor Commented:
Yes, full backups are available.

I did read the method involving editing the vmdk file using the vi editor and modifying the value corresponding to RW to the required disk space, but this almost seems riskier than the other methods.

My main concern really is that the ntds/sysvol are stored on this drive.  I know that I can move those as well, but that requires even more hassle, and I am doing this all remote.
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
that's the hack and slash method. alter size in the VMDK.

We've done it here many times.

other option is the V2V, but you need to be careful, that you do not corrupt AD, in the process of V2V, whilst the VM is hot, is this the only DC?
DerekFGAuthor Commented:
No, there are a total of 10 DC's - so I could demote the server, add new drive, robocopy data, promote server.  However, two of the sites won't have enough disk space for that to work.

I think I may try using the disk management in windows to shrink the volume.  I may create a new drive and test it on that, I want to make sure it not only shrinks the volume but that doing it this way will also shrink the vmdk file.

If that does not go as planned, would you mind posting your step by step procedure of altering the VMDK size.  I believe that would be the next best option for me, as V2V I  won't have the disk space required.
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
the method, is no different to what you've read - I think, altering the vmdk file with vi.

you modify the Extent Description

change the value after RW to your Byte Count in the VM.

Calcualtion is:-

X GB = X x1024 x1024 x1024 / 512 = X (x) 2097152

RW X (x) 2097152 VMFS new-flat.vmdk
Yancey LandrumTechnical Team LeadCommented:
You can absolutely use VMware Converter to convert a single disk, then replace the thick vmdk with the thin one. Just make sure you give it the same node ID, and the OS should be none the wiser. Obviously convert the machine while it is powered off.

The advantage to that is you can also shrink the disk and convert it to thin in a single operation. The other advantage is that it is the preferred method.

Of course be sure to have a full backup first as stated by Andrew.

Windows disk management has no effect on the vmdk file; they are two completely separate operations.
DerekFGAuthor Commented:
Hmm, okay.

Is there a preferred version of VMware Converter to run?  I have 5.1 at the moment.

Also, how do I set the node ID?  And is there a way to estimate the time it would take to convert a drive set to 2TB thick to a thin provisioned 1.5TB with 200~GB of data?

Lastly, does it matter if I run the converter from a remote machine, local machine, etc?  I'll most likely be dumping the new vmdk onto the same datastore, just wasn't sure if there was processing done at either end that made it better to run local to the environment.

I guess for my sites where I don't have enough storage for the new vmdk I could set up a temp esxi box and convert to it, move the old from the host, move the new to host...

Thanks for all the info, just want to make sure things are correct in the end!
DerekFGAuthor Commented:
Nevermind on the node id, duh, you just mean that if it's set to SCSI (0:1) Hard Disk 2 - make sure the new thin one is also that.
DerekFGAuthor Commented:
Did the vmdk hack, simple and worked fine.  Going to work on clearing space on the other servers otherwise i won't be able to do the clone portion.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.