Virtual Machine environment maintenance-VDI to vmdk, vmdk slimming

Source: Internet
Author: User

Virtual Machine environment maintenance-VDI to vmdk, vmdk slimming

After being abused by virutal box three times, I decided to give up happily.

VDI virtual hard disk really hurts me.

Fortunately, VDI can be switched to vmdk, while the Virtual Machine of virtual box can also be opened, open the manager in virtual Box software, you must use the clone method to convert VDI to clone virtual hard disk, create a vmwarevm and use the vmdk. From then on, the virtual box is a passer-by and I unmount it directly.

I found that the vmdk file is too large, so I searched Google and used VMware Tools to slim down the vmdk.

Vmware-vdiskmanager-K *. vmdk, but it is not thin.

In fact, there is such a reason that the vmdk file is large because the guest system always occupies space and does not release it. It does not release the space by itself, and it cannot achieve its goal if it wants to use other tools to force it to release.

Search Google again. In this case, use the root user command on the guest terminal:

CAT/dev/Zero> zero. fill, until this command cannot be executed. The guest system prompts that there is not enough space. Then LS-l will check this zero. the fill file is too large. Delete it happily, turn off the guest system, and use the vmware-vdiskmanager command to quickly lose weight. No error is found, but it is a good habit to back up before executing this slimming command.

If your guest system is not created in single disk mode, but is created using scattered files, there will be a lot of vmdk files in the Virtual Machine directory, you should find the first one, such as the virtual machine called centos, you just

Vmware-vdiskmanager-K centos. vmdk

In addition, to lose weight, you must delete all the previous snapshots. Similarly, if the previous snapshot is important, back up the snapshots.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.