Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Manipulate image file of VM (make it smaller?)

Featured Replies

Is there a way I can make my image file smaller after I uninstall several apps that take up a lot of space (or reset Windows 10 and start from scratch?)

Maybe creating a new image from the original image (BUT somehow only copy data sectors and not free sectors?)

 

Right now my image file is 110 gigs, it's set to grow, but I uninstalled a lot of apps and deleted a lot of install files and files that took a lot of space, and right now I am only using 50~60 gigs worth, not 110 gigs.

 

Thanks!

Edited by m4f1050

If you keep it sparse it will only use the actually used space, more info here.

  • Author

Awesome, just what I was looking for!   Thanks!

In Unraid 6.5 this excellent idea of @johnnie.black is accomplished even easier. It is possible to change the vdisk bus format to SCSI from the GUI.

The only 'manual' setting to add is discard='unmap'

 

10 minutes ago, bonienl said:

In Unraid 6.5 this excellent idea of @johnnie.black is accomplished even easier. It is possible to change the vdisk bus format to SCSI from the GUI.

The only 'manual' setting to add is discard='unmap'

Yes, I've been meaning to edit that entry, will try to do it soon.

11 minutes ago, bonienl said:

The only 'manual' setting to add is discard='unmap'

Can this be a GUI option also for the feature or not easy to do?

2 minutes ago, johnnie.black said:

Yes, I've been meaning to edit that entry, will try to do it soon.

soon™ :)

 

1 minute ago, johnnie.black said:

Can this be a GUI option also for the feature or not easy to do?

Sure it is doable, you better make it a feature request so it won't get lost.

  • Author

It worked on my Windows 10 VM.   Now, will this work on Windows 2008 R2?   ***FINGERS CROSSED***

25 minutes ago, m4f1050 said:

Now, will this work on Windows 2008 R2?   ***FINGERS CROSSED***

I believe it only works on Windows 8/10 and related server editions, 2012 and 2016, but not sure, let us know.

  • Author

I ran defrag on Windows 2008R2 then I ran SDelete -z to simulate a "TRIM" by zeroing the free space

Also I went ahead and took a further step, I reconverted the image with compression:
 

mv win10.img win10.img.bak
qemu-img convert -O qcow2 win10.img.bak win10.img

mv win2k.img win2k.img.bak
qemu-img convert -O qcow2 win2k.img.bak win2k.img

 


Win 10 from a 135gigs image it compressed to a 58gigs image (the OS is using 95gigs)
Win 2008R2 from a 130gigs image it compressed to a 60gigs image (the OS is using 63gigs) -- No trim, used SDelete from Sysinternals to zero empty sectors.

Got another question, is the docker.img file QCOW2?  Thinking about compressing that one too.   🙂

 

EDIT:  ***DO NOT USE SDelete***  It made the image bigger.  I did SDelete on the Win 10 and then compressed it and from 58gigs it went to 97gigs -- NOT WORTH IT -- I bet if I wouldn't have SDelete'd the Win 2k image it would've compressed even more.

 

Adding a 2nd drive to each VM, cloning the drives then doing the qemu-img convet -O qcow2 and leaving them alone after that.

 

Edited by m4f1050

On 9/13/2018 at 5:29 PM, bonienl said:
On 9/13/2018 at 5:24 PM, johnnie.black said:

Yes, I've been meaning to edit that entry, will try to do it soon.

soon™ :)

Done, also changed the way to install the SCSI controller so you only need to edit the XML to add "discard=unmap", everything else is done using the form view, also made the feature request about that so when done no need to use XML view at all.

  • Author
16 minutes ago, johnnie.black said:

Done, also changed the way to install the SCSI controller so you only need to edit the XML to add "discard=unmap", everything else is done using the form view, also made the feature request about that so when done no need to use XML view at all.

I want to add to that...  If you are already using VirtIO on Windows 2008 R2 (my case,) you need to add a Manual SCSI drive (1 meg should be ok, you can delete afterwards, just to get drivers installed first) then you can swap the type or your Windows 2008 R2 won't boot, it will blue-screen.  After I created the 1 meg drive and booted and installed the drivers, I was able to switch from VirtIO to SCSI without blue-screen.

I want to add to that...  If you are already using VirtIO on Windows 2008 R2 (my case,) you need to add a Manual SCSI drive (1 meg should be ok, you can delete afterwards, just to get drivers installed first) then you can swap the type or your Windows 2008 R2 won't boot, it will blue-screen.  After I created the 1 meg drive and booted and installed the drivers, I was able to switch from VirtIO to SCSI without blue-screen.

Yep, that's the same procedure I changed it to, you can add a 2nd small vdisk or for example use the exiting OS install CD-rom if still present to install the SCSI driver.

 

 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.