Search This Blog

Monday, March 14, 2011

How to reduce size of Virtual image (.img) In OVM?

I had created a template of win2k3 machine having size of 80 GB (C drive=30GB,D drive =50GB).

But To cater a request for new VM Machine having size of 1 TB (C drive=30GB, D= 1 TB-30GB)
I had to come up with something .
So i created a machine from template of win2k3(above mentioned one).
Then i deleted d drive partition of 50 GB using Disk management.

Then i shutdown the machine.
Logged in to Server hosting VM guests.

Ran following command
#dd if=/OVS/running_pool/vm_machine_name/System.img of=/OVS/running_pool/vm_machine_name/System1.img bs=1024 count=31457280

Which has reduced the size of System.img to 30 gb.
Modified vm.cfg to include System1.img Instead of System.img.

Started the VM machine.
(Note:It is not advised to do as most of the time you end up getting blue dump for window machines.Not checked on linux machine.)

No comments:

Post a Comment