VMware Cloud Community
FrankWoodall
Contributor
Contributor

Reducing the size of a virtual disk

I've got a virtual disk that comes preloaded at 30 GB. I need it to be no larger than 10. I keep seeing references to reducing a disk's size by cloning it to a smaller disk using VMware Converter. I installed version 4.0.1 of the VMware vCenter Conveter Standalone. However, at no point in the conversion process am I given the option of changing the disk size. This is a V2V conversion, if that helps.

So my question is, how can I resize this disk from 30GB to 10GB, what am I doing wrong with the converter?

Reply
0 Kudos
20 Replies
rick-vanover
Enthusiast
Enthusiast

I believe you want to change it as I've shown in the figure below:

Reply
0 Kudos
wila
Immortal
Immortal

Hi,

I moved your thread to the converter forum.

Is your guest OS windows?



--
Wil
_____________________________________________________
VI-Toolkit & scripts wiki at http://www.vi-toolkit.com

Contributing author at blog www.planetvm.net

Twitter: @wilva

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
dragooner
Enthusiast
Enthusiast

When U use the converter to resize your vm's disks, you can change it in the V2V progress.

If you want to manage your storage space usability, maybe you can use the thin provisior.

Reply
0 Kudos
FrankWoodall
Contributor
Contributor

I believe you want to change it as I've shown in the figure below:

I don't have that option at that stage. Here are the steps I followed from start to finish:

1) Click "Convert Machine"

2) Select source type -> VMware Workstation or other VMware virtual machine

3) Browse to machine file -> BackTrack4-Final.vmx

4) Next!

5) Select destination type -> VMware Infrastructure virtual machine (This is our vCenter Server)

6) Enter the login credentials to the server

7) Next!

:smiling_face_with_sunglasses: Name the virtual machine (BackTrack4 x86)

9) Choose ESX host

10) Select the datastore (VMStorage-VOL1)

11) Set VM Version to Version 7

12) So we're at View/Edit Options and here is what I see:

To the guy asking about the guest OS, it's BackTrack 4, when I click View source details it sees the OS as Ubuntu.

Reply
0 Kudos
rick-vanover
Enthusiast
Enthusiast

Click the "Data copy type" drop down, and I think you will get to where you want to go.

Reply
0 Kudos
FrankWoodall
Contributor
Contributor

No dice =(

Reply
0 Kudos
rick-vanover
Enthusiast
Enthusiast

Have you tried the Standalone Converter or are you using the plug-in built into vCenter?

If you are using the Standalone, are you on version 4.01?

What OS is the guest?

Reply
0 Kudos
FrankWoodall
Contributor
Contributor

Using VMware vCenter Converter Standalone version 4.0.1

Guest OS is the BackTrack4 final release VM downloaded from here http://www.backtrack-linux.org/downloads/

The converter sees it as Ubuntu.

Reply
0 Kudos
rick-vanover
Enthusiast
Enthusiast

Ah... OK, I'm not so familiar with Linux, but I bet that is the issue.

I think your best bet is thin provisioning of the VMDK.

Reply
0 Kudos
FrankWoodall
Contributor
Contributor

I'm hesitant to do a thin provision. This image will be used by hundreds of students in a lab environment. Our storage space is obviously limited. If I spawn off 150 images at 10GB each, that's doable. If they start messing with larger files (we do that a lot) and their images start ballooning up to 30GB, that's going to be a problem. Or I could be completely misunderstanding how thin provisioning works, that's a distinct possibility.

Reply
0 Kudos
rick-vanover
Enthusiast
Enthusiast

I run heavy hitters all the time on Thin Provisioned VMDK's. I can't imagine you will in any way feel or notice the incremental grow as a perceived performance hit of the Thin Provisioned VMDK.

Worst case, V2V it back to thick.

FrankWoodall
Contributor
Contributor

Alrighty, I'll give it a shot and see what happens. Thanks for the help Rick :grinning_face_with_big_eyes:

Reply
0 Kudos
wila
Immortal
Immortal

Hi,

It's been a while that I used Converter, but as I remember it from the last time it doesn't offer resizing for linux operating systems.

That's why asked what OS you used.

As for thin provisioning, you are misunderstanding how it works. The disk size you set is the maximum size. So if you set the virtual disk to 10 GB, your student cannot make it grow to 30GB. Only when using snapshots they can use more disk space.

Converting your image to thin provisioning will likely clear up the unused space.

Another thing you can do is to clone the disk to another smaller disk after first resizing the partition as smaller using a tool like gparted. That's what I usually do.

Resize target partition to the smaller size i want. Reboot to see if it all works. Then -while running from a liveCD- clone the partition onto a new smaller virtual disk with for example partimage or dd.

hope this helps,



--
Wil
_____________________________________________________
VI-Toolkit & scripts wiki at http://www.vi-toolkit.com

Contributing author at blog www.planetvm.net

Twitter: @wilva

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
Rajeev_S
Expert
Expert

Did you try Converter Installer for Linux?

Not sure if this will work. You can try!


Award Points if helpful!!

Reply
0 Kudos
continuum
Immortal
Immortal

Our storage space is obviously limited. If I spawn off 150 images at 10GB each, that's doable.

Why don't you leave the base-image as it is and then create linked clones for each student ?

Linked clones start with a size of a few Mb only ... and so for 150 VMs starting with the Out-of-box backtrack image linked clones would be the most disk-space effective variant .

Do the math yourself

...

1 x 30 Gb

+ 150 x 5 MB

-


= 30.5 Gb for 150 ready to use independant Backtrack VMs - using linked clones

150 x 10 Gb

-


= 1500 Gb for 150 ready to use independant Backtrack VMs - using your original plan

I made some notes on how to do that on ESXi ... see

http://sanbarrow.com/linkedcloneswithesxi.html






___________________________________

VMX-parameters- WS FAQ -[ MOAcd|http://sanbarrow.com/moa241.html] - VMDK-Handbook


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
Untalented
Contributor
Contributor

I have the same exact issue as the OP trying to convert a Server 2008 x64 VM and reduce the size from 80 to 40. My screen looks exactly like his with no options to resize.

Reply
0 Kudos
schopey
Contributor
Contributor

I resized my BT VM (and several other linux boxes) using converter standalone 4.0.1 and selecting a source type of "Powered-on Machine" under "Specify Source" and setup "Helper VM Network" under "View/Edit Options".

HTH

EDIT: Those are the options that I believe allowed me to do the resize. I'm looking at the converter logs to get this.

Message was edited by: schopey

Reply
0 Kudos
Untalented
Contributor
Contributor

Gave this a try as a powered on machine. Not having any luck here. Is there any other safe way I can shrink the size of a VM running Server 2008 R2?

Reply
0 Kudos
Untalented
Contributor
Contributor

Is VMWare aware of this issue?

Does anyone have any other workaround?

I don't understand why converter isn't giving us the resize options when doing a V2V. Last night I even converted it to a Workstation VM and back and the resize option was greyed.

Reply
0 Kudos