Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


VMDK Thick to Thin or Shrink

Posted on 2014-01-14
Medium Priority
Last Modified: 2014-01-14
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?
Question by:DerekFG
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
LVL 124
ID: 39780546
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.

Author Comment

ID: 39780571
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~
LVL 124
ID: 39780579
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?
Put Machine Learning to Work--Protect Your Clients

Machine learning means Smarter Cybersecurity™ Solutions.
As technology continues to advance, managing and analyzing massive data sets just can’t be accomplished by humans alone. It requires huge amounts of memory and storage, as well as high-speed processing of the cloud.


Author Comment

ID: 39780593
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.
LVL 124
ID: 39780613
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?

Author Comment

ID: 39780631
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.
LVL 124
ID: 39780654
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
LVL 13

Expert Comment

ID: 39780774
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.

Author Comment

ID: 39780817
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!

Author Comment

ID: 39780831
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.
LVL 124

Accepted Solution

Andrew Hancock (VMware vExpert / EE MVE^2) earned 2000 total points
ID: 39780832
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!

Author Closing Comment

ID: 39781070
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.


Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's recap what we learned from yesterday's Skyport Systems webinar.
Wouldn't it be nice if objects in Active Directory automatically moved into the correct Organizational Units? This is what AutoAD aims to do and as a plus, it automatically creates Sites, Subnets, and Organizational Units.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question