Detailed description of vmwarevm System Image File compression method

Source: Internet
Author: User
Tags centos server

When you create a VM in VMware, the wizard determines whether to pre-Allocate the virtual disk space (preallocate for virtual disk). If you select this option, VMware will immediately Allocate all the space (Allocate all disk space now ); otherwise, the virtual machine file will increase with the use of the virtual system. By the way, VMware seems to have a strange limit: FAT32 supports a maximum of 4 GB files, and if you do not choose to split the disk into 2 GB files (split disk into 2 GB files ), if you save the VM on the FAT32 drive, the system prompts "the target file system does not support large files ". I don't know what the software is.

If you choose not to allocate space immediately, after using the virtual machine for a while, you will find that the virtual machine files only increase or decrease, much larger than the space used in the virtual system; there is also a gradual decline in the speed of virtual systems, which may cause a lot of inconvenience. In this case, you can organize and compress the Virtual Disks/Partitions: you can find the Virtual Disk settings in the virtual machine settings. The key is to maintain the continuity of disk data and improve disk performance. The Shrink function can reclaim unused space in the virtual system, so that the file size of the virtual machine is basically the same as the occupied space of the virtual system.

To compress the Virtual Machine System image file generated by vmware, you must install vmware-tools and use the vmware-toolbox tool in the tool kit to compress it. First download the vmware-tools image file from the Internet. If you are too reluctant to search for it online, you can directly download it using the functions provided by vmware.

If vmware finds that there is no local vmware-tools file, it will automatically download it from the official website. After the download, vmware will automatically load the image file. Now, the VM is powered on, in a virtual machine, because it is relatively simple to install vmware-tools in a windows system and a graphic interface in linux, I will not describe it here. interested viewers can search online.

My current system version is 64-bit CentOS server version linux. After successfully logging on to the system, I first mount the virtual optical drive containing vmware-tools on vmware, before that, you can open the settings panel of vmware and view the optical drive items to confirm the file.

In the command line, enter mount-t iso9660/dev/cdrom/mnt/cdrom. the content in the iso file is mounted to the/mnt/cdrom directory of the Virtual Machine System. If it is a debian operating system, you can directly use the mount/media/cdrom command to mount the optical drive, the ubuntu system uses the mount/dev/cdrom/media/cdrom command. Now, go to the CD directory and view the files in it.

Then use the cp VMwareTools-8.8.2-590212.tar.gz/tmp command to copy the tar file to the/tmp directory of the system, and then enter the tmp directory, use the tar-zxvf VMwareTools-8.8.2-590212.tar.gz command to decompress it. After decompression, a directory named vmware-tools-distrib is automatically generated in the extracted directory.

Go to the directory, give the run permission to the installation file vmware-install.pl file, and run it.

During the running process, the installer is required to perform several settings. If you are too reluctant to set the settings, press enter to set the default setting. For the first time, select the directory where the generated binary file is located. The default directory is/usr/bin.

The second is to select the directory in which to generate the vmware-tools Startup File. The directory is available from rc0.d to rc6.d. The default value is rc. d. Set the priority of Automatic startup of vmware-tools. If you do not want to change the priority, press enter to generate the default value.

The third time is to select the directory where the boot script is located.

The fourth option is to specify the directory where the background running files are located, which is installed in the/usr/sbin directory by default.

The fifth option is to specify the directory where the vmware-tools library file is located. The default option is good. Because the directory does not exist, you will be prompted to create it later. Enter yes to create it.

The sixth option is to specify the directory where the help and learning documents to be generated are located. It is installed by default. Because the directory does not exist, the system will ask whether to create it. Enter yes to create it.

Finally, you need to configure the features of vmware and configure them as prompted. The following interface is displayed to verify that the vmware-tools installation is complete.

For more information, click the next page!

  • 2 pages in total:
  • Previous Page
  • 1
  • 2
  • Next Page

Related Article

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.