VMware Cloud Community
eagleh
Enthusiast
Enthusiast
Jump to solution

shrink VM ?

A vm created on an ESX server (3.5 update 1, evaluation version without Virtual Center Server). Evaluation expired. I want to transfer this VM to another working ESX host which is on a seperate network. This VMDK file is 150G big. I don't want to FTP that huge monster. How do I shrink it?

If you found this information useful, please kindly consider awarding points for "Correct" or "Helpful". Thanks!
0 Kudos
1 Solution

Accepted Solutions
Troy_Clavell
Immortal
Immortal
Jump to solution

VMware Converter will do what you are looking to do.

View solution in original post

0 Kudos
11 Replies
Troy_Clavell
Immortal
Immortal
Jump to solution

VMware Converter will do what you are looking to do.

0 Kudos
eagleh
Enthusiast
Enthusiast
Jump to solution

Excellent. Thanks Troy.:8}

If you found this information useful, please kindly consider awarding points for "Correct" or "Helpful". Thanks!
0 Kudos
AWo
Immortal
Immortal
Jump to solution

Good old vmkfstools should do it also...

Cloning a Virtual or Raw Disk with "vmkfstools -i --importfile -d --diskformat rdm:<device>"

This option creates a copy of a virtual disk or raw disk you specify.

You can use the -d suboption for the -i option. This suboption specifies the disk format for the copy you create. A non-root user is not allowed to clone a virtual disk or a raw disk.

I would try thin or monosparse.

Disk types are:

-zeroedthick (default) – Space required for the virtual disk is allocated during creation. Any data remaining on the physical device is not erased during creation, but is zeroed out on demand at a later time on first write from the virtual machine. The virtual machine does not read stale data from disk.

-eagerzeroedthick – Space required for the virtual disk is allocated at creation time. In contrast to zeroedthick format, the data remaining on the physical device is zeroed out during creation. It might take much longer to create disks in this format than to create other types of disks.

-thick – Space required for the virtual disk is allocated during creation. This type of formatting doesn’t zero out any old data that might be present on this allocated space. A non-root user is not allowed to create this format.

-thin – Thin-provisioned virtual disk. Unlike with the thick format, space required for the virtual disk is not allocated during creation, but is supplied, zeroed out, on demand at a later time.

-rdm – Virtual compatibility mode raw disk mapping.

-rdmp – Physical compatibility mode (pass-through) raw disk mapping.

-raw – Raw device.

-2gbsparse – A sparse disk with 2GB maximum extent size. You can use disks in this format with other VMware products, however, you cannot power on sparse disk on an ESX Server host unless you first reimport the disk with vmkfstools in a compatible format, such as thick or thin.

-monosparse – A monolithic sparse disk. You can use disks in this format with other VMware products.

-monoflat – A monolithic flat disk. You can use disks in this format with other VMware products.

AWo

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
eagleh
Enthusiast
Enthusiast
Jump to solution

AWo, I may have to try your suggestion. VM Convertor failed at 97%. Smiley Sad

If you found this information useful, please kindly consider awarding points for "Correct" or "Helpful". Thanks!
0 Kudos
AWo
Immortal
Immortal
Jump to solution

Please give a feedback. Thanks.

AWo

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
eagleh
Enthusiast
Enthusiast
Jump to solution

AWo, not so good. both "thin" and "monosparse" created almost identical size of vmdk.

If you found this information useful, please kindly consider awarding points for "Correct" or "Helpful". Thanks!
0 Kudos
eagleh
Enthusiast
Enthusiast
Jump to solution

FYI: This VM is a CentOS machine. When I used VM Convertor, it didn't recognize it's "Disk0" (a question mark in front of it). thought?

If you found this information useful, please kindly consider awarding points for "Correct" or "Helpful". Thanks!
0 Kudos
AWo
Immortal
Immortal
Jump to solution

Have you defragmented it within the guest? That may help. You can defrag it and use the VMware Tools shrink function, first to free up continuous free space. How much is really used of this drive?

AWo

vExpert 2009/10/11 [:o]===[o:] [: ]o=o[ :] = Save forests! rent firewood! =
0 Kudos
eagleh
Enthusiast
Enthusiast
Jump to solution

evaluation expired. so i can't power on this VM any more. i believe it used about 80G.

If you found this information useful, please kindly consider awarding points for "Correct" or "Helpful". Thanks!
0 Kudos
sapirgolan
Contributor
Contributor
Jump to solution

Isn't it a waste of storage?

80GB for on VM? what are you running in there? MS SQL Server+DBs? Wouldn't it be better to create two disks: One for the Os and one for the DATA?

0 Kudos
eagleh
Enthusiast
Enthusiast
Jump to solution

Indeed it is a waste. Anyway, I managed to use VM Convertor to move it over (the whole disk without resize). Thank all you guys.

If you found this information useful, please kindly consider awarding points for "Correct" or "Helpful". Thanks!
0 Kudos