Current location - Health Preservation Learning Network - Healthy weight loss - How to compress the disk space of linux vmware virtual machine
How to compress the disk space of linux vmware virtual machine
Tools/raw materials

Vmware software

Xmanager software

Methods/steps

When the disk is not cleaned, you can see the occupied space of 17G, and then log in to vmware's linux system using xshell tool of xmanager.

Enter the following command in the xshell terminal:

DD if =/dev/0 of =/0 bits bs = 2097 1520

sudo rm /0bits

Used to clean up unused disks and then shut down the virtual machine.

Under the windows system where vmware is located, open the command line and switch to the vmware software directory.

Then enter the virtual machine disk cleaning command, such as:

Vmware-vdiskmanager-k "e: \ myvmware \ rhel6x86-64-Cognos \ Red Hat Enterprise Linux 6-cl1.vmdk" and wait until the command is executed.

The execution process is relatively long, and the size of the virtual machine disk file is obviously reduced after execution, and the disk cleaning is completed. If you think this operation is still complicated, you can write the commands under linux and windows into scripts, and you only need to execute the scripts every time.

Step reading

end

Matters needing attention

Some information can also be introduced through vmware-tools, but I haven't tried it yet.

For reference only, please contact me in time if you have any questions.