compact disk to reclaim unused space что это

Compact disk to reclaim unused space что это

Hi
I’m using VMware Workstation Pro 15.

I have a Ubuntu VM and I delete two folders with 60GB size after using them.

But The Storage on my laptop hard disk not freeing up after deleting these folders and still allocates 150GB on my hard disk.

you are right, i run this command and it takes about an hour on my laptop (with SSD hard disk):

it needs root permission.

vmware-toolbox-cmd disk shrinkonly

for this command, i first install vmware tools package.

and it works and storage start freeing up during running of that commands.

You need to Shrink the virtual disk from the host. ANY hard disk operation is a *write* operation (even deletes!), so the space is still in use as far as the host is currently concerned. There should be an option under the VM settings for that virtual hard disk within the Workstation settings. Note that the VM must be shut down first.

There are two options there, compact disk and disk defragment.

Defragment : Defragment files and consolidates free space.

Compact : Compact disk to reclaim unused space.

I run these two options, but the storage not changed at all.

you are right, i run this command and it takes about an hour on my laptop (with SSD hard disk):

it needs root permission.

vmware-toolbox-cmd disk shrinkonly

for this command, i first install vmware tools package.

and it works and storage start freeing up during running of that commands.

Источник

Reduce the Size of Virtual Machine Disk in VMware Workstation

If you work with VMware Workstation on your Windows PC, you’ve probably noticed how the virtual machine disk image can become quite large very fast, especially if you are running Windows 7 or Windows 10 as a guest OS.

Luckily, there are a couple of ways you can shrink the size of the virtual disk to a more manageable size. In this article, I’ll walk you through the different methods I use to make my virtual disks smaller.

Step 1 – Clean Up Guest OS

The first step in reducing the size of the image is to power on the virtual machine, log into the operating system and clean up anything you can there.

This means uninstalling applications you no longer need, deleting files and running disk cleanup with the option to scan system files to remove previous installations of Windows.

This step is important because you can gain significantly more space back from the virtual machine disk if it has more free space inside of it.

For example, I installed the Creator’s Update on my Windows 10 virtual machine and was able to use disk cleanup to remove 25GB of previous Windows installations. This saved me about 10 GB in space on the actual disk image file when I performed the steps below.

Step 2 – Run Disk Cleanup

Once you have cleaned up the guest OS, you should power off the virtual machine. Next, click on VM in the menu bar, then Manage and then Clean up Disks.

Читайте также:  какой коньяк подарить отцу

This will bring up a small dialog that will tell you how much space is reclaimable. If you haven’t done a cleanup in a while, it could be a decent amount of space.

Click the Clean up now button and let the process complete. It could take a little time the first time you run it.

Step 3 – Defragment the Virtual Disk

The next step is to defragment the disk, which you can do by going to VM again and then clicking on Settings instead of Manage.

Then click on Hard Disk and you’ll see some options on the right. Firstly, you want to click on Defragment, which will consolidate all of the free space in the virtual disk image.

Next, click on Compact, which will reclaim any unused space. If you did everything up to now, hopefully you’ve gotten back at least a couple of GB’s of space.

Step 4 – Manage Snapshots

The other major space hogger is snapshots. These are great and incredibly useful, but if you don’t manage them well, they can literally become larger than the Guest OS itself.

Go to VM again, then click on Snapshot and then click on Snapshot Manager. Here you’ll see a list of all the different snapshots for this particular virtual machine.

As you can see from my screenshot, I only have one snapshot called Latest. I have a smaller SSD drive, so this is how I save space. Once I install updates, etc., I create a second snapshot and then delete the older one. The less snapshots you have, the less space your virtual machine will take up.

In addition, you should check the Show AutoProtect snapshots box to see if there are any snapshots taken by VMware itself. Since I manage my own snapshots, I disable AutoProtect altogether. You can do that by clicking on the AutoProtect button and making sure the checkbox is unchecked.

Step 5 – Power Off Instead of Suspending

The last piece of advice is if you really need all the extra space you can get. When you suspend a virtual machine, it saves temp files that are several GB’s worth of data.

If you don’t use your virtual machine on a daily basis, it might be a better idea to simply power it off. This removes all the temp files and will usually free up 2 to 4 GB on your hard disk.

Note that you can follow all of these steps for each virtual machine that you have installed in VMware and therefore save even more space. If you have any ideas or tricks of your own to save space, feel free to let us know in the comments. Enjoy!

Founder of The Back Room Tech and managing editor. He began blogging in 2007 and quit his job in 2010 to blog full-time. He has over 15 years of industry experience in IT and holds several technical certifications. Read Aseem’s Full Bio

Читайте также:  с каким усилием затягивать свечи зажигания ngk

Источник

How do I get back unused disk space from ubuntu on wsl2?

So here is the problem: I’m using Ubuntu 20.04 on WSL2 on Windows 10, and I noticed that after removing files on Ubuntu I was not getting the space back that was taken up by the removed files. For example: Before I deleted files on Ubuntu it showed on Windows explorer that my free space on the (C:) drive was around 46GB. Then after I deleted around 10GB of files, which in my case where some temporary Gatsby sites, it resulted in even less free space, around 45GB. Which I thought was very weird.

So I guess my question is: How can I get back those unused bits? Is there some terminal command which I can use or can I do something via the windows gui or something.

PS My previous question got closed for a lack of detail. I hope this time around it will suffice. Also please do not downvote this without some comment on why, but at least give me some information as to why.

2 Answers 2

There’s a WSL Github issue open on this topic. WSL will automatically grow the virtual disk (ext4.vhdx), but shrinking it to reclaim unused space is something that must currently be done manually.

The first thing you’ll need to do is know the location of your ext4.vhdx. For a default Ubuntu installation, it should be in something like %PROFILE%\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\

On Windows Home (and higher) you can use diskpart as described in this comment.

Exporting the WSL distro and re-importing it into a new WSL instance (as in this comment) will also reclaim the space. Note that you will need to reset the default username after an import. See here.

I have tested and confirmed both the second and third techniques personally.

Источник

Compact disk to reclaim unused space что это

Войти

Авторизуясь в LiveJournal с помощью стороннего сервиса вы принимаете условия Пользовательского соглашения LiveJournal

[ website | http://www.raw-photo-processor.com ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]
Как чистить виртуалку,где стоит RPP [Jan. 19th, 2016|01:10 pm]

Ссылки тут, похоже, не вставляются, но ищется по фразе «compress vmware disk». Я лично сжимал.

Сначала надо, как уже советовали, из-под виртуалки забить пустое место нулями, затем, уже из самой вмварной консоли, сделать то, что описано в хелпе по адресу Using VMware Workstation > Configuring and Managing Devices > Configuring and Maintaining Virtual Hard Disks > Compact a Virtual Hard Disk

Compacting a virtual hard disk reclaims unused space in the virtual disk. If a disk has empty space, this process reduces the amount of space the virtual disk occupies on the host drive.
Prerequisites

— Power off the virtual machine.
— Verify that the virtual disk is not mapped or mounted. You cannot compact a virtual disk while it is mapped or mounted.
— Verify that the disk space is not preallocated for the virtual hard disk. If the disk space was preallocated, you cannot compact the disk.
— If the virtual hard disk is an independent disk, verify that it is in persistent mode.

Procedure
— Select the virtual machine and select VM > Settings.
— On the Hardware tab, select the virtual hard disk to compact.
— Select Utilities > Compact.
— Click OK after the disk compacting process is complete.

Источник

How to reduce the size of VMware disk

My Ubuntu image VMware disk has grown to 5GB physical file size. It’s a dynamically growing disk with the maximum capacity of 8GB. I cleaned some stuff inside Linux distro and now inside it occupies 3GB. Obviously the physical file size didn’t shrink back automatically. Is there a way (if possible free of charge) to shrink this disk back to

I need this to fit the image on the DVD.

8 Answers 8

There are three steps:

Defragment (no need to un/remount anything)

Ignore any errors. Some files like symlinks and device files can’t be defragmented.

Zero-fill all unused space so VMware knows it’s indeed unused:

dd if=/dev/zero of=wipefile bs=1M; sync; rm wipefile

Run the shrink operation:

sudo vmware-toolbox-cmd disk shrinkonly

I’ve found the solution – you have to compact your hard drive:

Open VMware Toolbox in the guest (as root) and shrink the disk. (Documentation)

If you don’t have VMware Tools, you can shrink the disk manually in two steps. First, clear the free space on the virtual disk using a tool like zerofree. Zerofree is available in Ubuntu, but since it requires the guest OS filesystem to be mounted read-only you may want to run it off a live CD. Parted Magic reportedly includes zerofree.

After zeroing the free space, open Virtual Machine Settings and compact the virtual disk.

from the command prompt in your Ubuntu guest.

(Tested on Ubuntu 14.04 LTS guest + Windows 10 Host + VMWare Workstation 12.1.1 )

VMWare harddisk resizing:

Procedure:

The following steps are:

For a visual rundown of the steps and additional info, see here.

Thinning (shrinking) VMDK disks on ESXi / vSphere Linux Guests

Note: «Shrinking» is often used interchangeably to refer to the process of reducing the size of a thin-type disk file. VMware uses the term «shrink» to refer to reducing the underlying size of the disk available to the guest, and «thinning» as the process most tend to use of recapturing unused space without altering the underlying available size.

Since ESXi does not support vmtools-based shrinking on Linux guests, the following steps must be used. See reference link below for more information.

(if possible) Stop all disk write-intensive applications and services as the following steps will momentarily fill the target volume

Defragment volume(s) on target VMDK and ignore any errors as symlinks/device files/etc. cannot be defragmented.

Shut down & power off guest

SSH to the ESXi host and issue these commands:

Source

Источник

Читайте также:  при какой температуре погибают тараканы домашние
Сказочный портал