Vmware compact disk linux

Vmware compact disk linux

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

  • VMware Technology Network
  • :
  • Desktop Hypervisor
  • :
  • VMware Workstation
  • :
  • VMware Workstation Pro Discussions
  • :
  • Compact Disk on Linux guests does not work?
  • Subscribe to RSS Feed
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page

m4ntic0r

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

i have two VMs, one Ubuntu 16.10 and a Debian 8.

Ubuntu 10G HDD, df -h shows used 2,2G but vmdk size on NTFS Host shows 9,2G

Debian 10G HDD, dh -h shows used 1,6G but vmdk size on NTFS Host shows 6.16G

I tried everything to shrink those vmdks..

1. In VM Settings, select HDD and «defrag» and «compact» disk -> no difference in size

3. run sudo e4defrag /dev/sda X in both guests

4. run dd if=/dev/zero of=wipefile bs=1024×1024; rm wipefile in both guests

5. run defag and compact in vm settings again -> no difference in size

i dont know what i am doing wrong

m4ntic0r

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

use the open-vm-tools (i already use them)

apt-get install open-vm-tools

then shrink live your file system:

vmware-toolbox-cmd disk shrink /

my vmdk files are now 1,95GB and 2,34GB big

would always do a backup before this

bartgrefte

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

Thanks for posting that, worked perfectly

But now I am curious why the dd-method didn’t work (ran into the same thing here), I’ve been trying to get that method to do what’s advertised on several websites, without succes.

wila

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

AFAIK the dd method still works, but should be followed up by a «vmware-vdiskmanager -k » run

I’ve listed all methods that I am aware about on hosted VMware platforms here:

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva

bartgrefte

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

According to your link that command is used on Linux hosts, I’m using a Windows host.

Читайте также:  Vlc linux log file

wila

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

For the record I wrote that article, I’m just posting a link as it has benefits over using copy&paste.

Besides that it allows me to improve the text over time without having to correct it in every reply.

The relevant part is this and I’ve bolded the bit about windows.

You can shrink the .vmdk file as follows:

vmware-vdiskmanager -k Ubuntu\ Desktop.vmdk

On Windows the command also uses the -k option , so I leave that for you as an exercise.

Perhaps I should reword it a bit at the vi-toolkit.com site?

it is the same on Windows as is on Linux, but you will have to adjust operating specific things like use a backslash in the path instead of a forward slash.

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva

Источник

How to Shrink Virtual Machine Disk (.vmdk) Size in VMware

If you use VMware Workstation or VirtualBox to create a virtual machine, you may find that there is a .vmdk file in hard drive occupying plenty of space, even as high as tens of gigabytes. A virtual machine disk (.vmdk) file is used to store all the data of a virtual machine’s hard drive. As the data is added to a virtual disk over time, the size of .vmdk file will grow larger and larger. So, it is necessary for us to reduce the size of virtual machine disk. In this post, we will introduce three effective methods to shrink virtual machine disk size in VMware Workstation.

how to shrink virtual machine disk vmdk size in vmware

Method 1: Shrink virtual machine disk size by Compacting disk

VMware Workstation provides us with a feature that allows us to compress disks to reclaim the unused space. So, you can use it to shrink the size of virtual machine disk and here is what to do.

Step 1: Open VMware Workstation application and open a virtual machine (Shortcut: Ctrl + O).

Step 2: Click VM tab and select Settings option to open Virtual Machine Settings window (Shortcut: Ctrl + D).

open settings window

Step 3: On Hardware tab, click Hard Disk option in the left pane and the click Compact button in the right pane.

compact disk

Step 4: Then wait for a while until a popup window prompts that the disk was successfully compacted. Click OK button to close the window. Finally, you can find out that the size of .vmdk file has been reduced dramatically.

compact completed

Method 2: Shrink virtual machine disk size with Disk Cleanup

In addition, VMware Workstation also offers us Disk Cleanup feature that can reclaim disk space that is allocated to virtual disk files but that the guest OS no longer uses. It is also very helpful to shrink the size of virtual machine disk in VMware Workstation. The following steps will guide you through this operation.

Читайте также:  Справочник командной строки линукс

Step 1: Open VMware Workstation application and open a virtual machine (Shortcut: Ctrl + O).

Step 2: Click VM tab and move the mouse cursor over Manage option and then select Clean Up Disks option.

clean up disk

Step 3: On the popup window, click Clean up now button to start cleaning up.

clean up files

Step 4: Wait for a while until a popup window prompts that Disk cleanup is finished. Then click OK button to close the window. After this operation, the size of .vmdk file in VMware Workstation can be reduced to some extent.

clean up finished

Method 3: Shrink virtual machine disk size by third-party tool

In the end, you can also shrink virtual machine disk size by third-party tool. Actually, the more files in virtual machine, the more space the virtual machine disk occupies. So, cleaning up the junk files in the virtual machine can effectively reduce the space occupied by the virtual hard disk. For more convenience, you can install a cleanup tool in the virtual machine and use it to remove the useless files from virtual machine. Here I recommend a cleanup tool named iSunshare System Genius that designed to clean up the junk files and the registry to free up disk space with one click. Here are detailed steps to use it to free up virtual machine disk.

Step 1: Open the virtual machine in VMware Workstation and download and install this tool on your virtual machine. Then launch it.

Step 2: Click Scan button to scan and the virtual machine thoroughly.

scan junk files in virtual machine

Step 3: Wait for a while until scanning is completed and the scan results will be shown on the screen, listing all kinds of useless files on your computer. Then click Clean button to clean up all the selected files in one go.

start cleaning

Step 4: Once completed, click OK button to exit. Ultimately, the virtual machine has freed up a lot of space and the size of virtual disk has been shrunken successfully.

completed

Tips: In addition, iSunshare System Genius is a multi-functional Windows optimization utility that can help you free up system disk space with one click, disable the auto-run programs and manage Windows system services, etc.

free download

Related Articles:

Источник

Vmware compact disk linux

Tech talks of Sherihan.

Java

Sunday, April 21, 2013

Compact the Virtual Disk in VMware Workstation

My previous post was about how you can defragment your virtual disk in VMWare. Though I already mentioned there that you cannot reclaim your virtual hard disk’s unused space on a virtual disk, it is best practice to run a disk defragmentation before compacting the disk.

What really happens if you compact the virtual Disk?

If you have a virtual disk that grows as data is added, you can shrink it as describes in this post. Note that if you have allocated all the space for you virtual disk at the time you created it, you cannot shrink it. In my case, I am running a fedora 14 virtual machine (VMWare workstation 7.1.4) which has oracle 11g installed in it. As I create databases and maintain them, the disk size grows fast and ultimately I had to perform some tasks to come out of the disk full issue by following some actions.

Читайте также:  Linux gui ssh client

When you delete files from your virtual machine, the disk space occupied by those files is not immediately returned to your host system. If a virtual disk has such empty space, you can use the Clean up disks command to return that space to the hard drive on a Microsoft Windows host.

The Clean up disks command is similar to the Compact command in the Workstation virtual machine settings and the shrink command provided by VMware Tools.

If you want to know how to Defragment the virtual hard disk in VMWare, refer the post under Defragmenting the virtual Disk in VMWare because it is best [raactice to defragment your virtula hard disk before you compact or shrink it

Before shrinking the virtual disk, consider the following restrictions and requirements

  • Shrinking requires free disk space on the host equal to the size of the virtual disk you are shrinking.
  • Shrinking applies only to virtual disks. You cannot shrink physical disks or CD-ROMs.
  • You cannot shrink the virtual disk if,
    • you have already created Snapshots of your virtual machine
    • If your VM is a parent of a linked clone
    • If your VM is a linked clone (because linked clone depends on its parent clone

    Note that there are two types of clones that you can create using a Virtual machine. They are Full clones and Linked Clones. For the moment, remember that Full clone is similar to a Copy of a file that you create in any Operating system and a Linked clone is like a shortcut that you create for a file. Shortcuts are always dependent on the actual file whereas copies of files can work independently. I’ll explain these concepts in some other post but keep in mind you have to consider the above points before performing a Shrinking of disk.

    Steps to Shrink a virtual hard disk

    Please note that I run my virtual machine in VMWare Workstation 7.1.4 in which the Shrink task is refers as Compact. follow the below steps to perform the task

    1. Power off the virtual machine if it is already running
    2. select the proper tab of your virtual machine from the VMWare Home screen
    3. Select VM tab from the top and select Settings
    4. Under Hardware tab, click on Hard Disk (SCSI) and select Compact from the Utilities drop down list.
    5. The disk compact starts automatically and displays a success message if it completes

    It would take some time to complete the disk compact task. When it completes, it will display a success message.

    Источник

Оцените статью
Adblock
detector