Welcome, Guest
Please Login or Register.    Lost Password?

Compressing a virtual hard disk
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: Compressing a virtual hard disk
#2979
Re:Compressing a virtual hard disk 10 Years, 7 Months ago Karma: 1
The method in the post above looks like it will work easier then the way I did it.

1.) Installed MS Virtual PC 2007
2.) Opened up the VM I wanted to compress
3.) Mounted ISO File (C:\Program Files\Microsoft Virtual PC\Virtual Machine Additions\Virtual Disk Precompactor.ISO
4.) Mounted the ISO in VMLITE and ran the program (it zeros any extra space out) this step takes some time to complete
5.) Once that operation has completed shutdown the VM
6.) Open MS Virtual PC Click "File" Then Select "Virtual Disk Wizard"
7.) Select "Edit Existing disk" Enter the File location click Ok
8.) Select "Compact it"
9.) Now you can chouse weather or not you want to create a new vhd or overwrite the original file then hit OK and this will take some time to complete
helpdesk98
Junior Boarder
Posts: 22
graphgraph
User Offline Click here to see the profile of this user
richardneil@live.com
The administrator has disabled public write access.
 
#2980
Re:Compressing a virtual hard disk 10 Years, 7 Months ago Karma: 0
While the way listed is certainly doable it is quite slow. The way I do it is to create a second disk file the size I want the replacement to be, I then mount a Windows PE ISO disk and boot to it and simply COPY the files from one disk to another. Alternately you can use a Linux live CD and do the copying. This can INCREASE or DECREASE the size of the disk as needed - as long as you make the disk as large as the data that's on it.

The next issue is to fix the MBR of the new disk to make it bootable, since I use a Windows PE that has disk repair utilities on it that's no problem. Otherwise you'd have to mount the OS's original install CD while having the replacement mounted and do a repair to fix it and make it bootable.

Not to contradict myself but the last few times I've done this I actually used Symantec Ghost while booted to the Windows PE ISO to move the files and make the replacement bootable. But not everyone has Ghost. Perhaps one of the many other Ghost "clones" can do it too.
Rootman
Junior Boarder
Posts: 25
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2010/07/31 11:37 By Rootman.
The administrator has disabled public write access.
 
#2982
Re:Compressing a virtual hard disk 10 Years, 7 Months ago Karma: 52
to make vhd bootable, it's very easy to do, no need to use any 3rd party tools.

(1) mount the raw vhd, using windows 7, or our vmlitectl.exe (click control c to exit vmlitectl.exe when looping around to find a drive letter, since it's not formatted, it won't find)

(2) run "DiskMgmt.msc" to partition, format, and mark an Active partition

(3) now copy all files from old vhd (needs to be mounted too) to the new one.
admin
Moderator
Posts: 2350
graph
User Offline
Gender: Male
Last Edit: 2010/07/31 12:00 By .
The administrator has disabled public write access.
 
#3127
Re:Compressing a virtual hard disk 10 Years, 6 Months ago Karma: 1
Not sure if anyone knows this already but under Windows 7 and maybe Vista (ughh) you can use diskpart to compress VHD's without any additional software.

The usage is.

select vdisk file="C:\Users\XXX\VMLites\VMLite XP Mode\VMLite XP Mode.vhd”
attach vdisk readonly
compact vdisk
detach vdisk
daleski75
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#3147
Re:Compressing a virtual hard disk 10 Years, 6 Months ago Karma: 1
daleski75 wrote:
Not sure if anyone knows this already but under Windows 7 and maybe Vista (ughh) you can use diskpart to compress VHD's without any additional software.

The usage is.

select vdisk file="C:\Users\XXX\VMLites\VMLite XP Mode\VMLite XP Mode.vhd”
attach vdisk readonly
compact vdisk
detach vdisk


nice find!
helpdesk98
Junior Boarder
Posts: 22
graphgraph
User Offline Click here to see the profile of this user
richardneil@live.com
The administrator has disabled public write access.
 
Go to topPage: 12