Guest User!

You are not Sophos Staff.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

[Hyper-V] How to make partitions and disk smaller?

I am running XG in Hyper-V.

First mystery, the vhd files (the auxiliary in particular) keep growing and growing, although not much space is being used when I check from the Advanced Shell.

The virtual disk size is 80 Gb, so I'm guessing the vhd file will stop growing when it reaches that size.

Unfortunately, I don't have that much space available on the host. I'd like to resize the disk to a smaller size.

Resize-VHD gives me the error below.

fdisk confirms there is no partition table:

So, what are my options? Is there a way to make the disk smaller? Should I create my own disks and install XG on the VM instead? A detailed walk-through for either case would be appreciated, as I am new to both Sophos and Hyper-V.

Cheers.



This thread was automatically locked due to age.
  • RustemA,

    The minimum disk size required by XG is 80 GB. You cannot shrink the disk because XG used its space to allocate logs and all the rest. 80 GB nowadays are nothing.

    Regards

  • df reports that /dev/var, which is 74 Gb in size , is only 2% used. Does df not show correct information in Sophos XG?

    Respectfully, I'd like to get an answer, not to have people try to talk me out of it.

    If you must know, I put together an appliance to host XG VM, and I used a small SSD for storage. If I knew beforehand, I'd get a bigger SSD, you are right, it's not that big of a deal. But for now, I'm stuck with this one, and it's just a bit too small. (Windows partition takes up a good amout of space as well.)

  • RustemA,

    see the answer from here:

    https://community.sophos.com/products/xg-firewall/f/initial-setup/83283/sophos-xg-home-installation-on-apu1d4/311928#311928

    DF -h shows partitions and mountpoint.

    The log partition will be filled during the usage and you cannot shrink it because XG will complain about that. Only XG85/w can use smaller partition.

    Regards,

  • TS doesn't want to shrink the log partition. He wants to use a dynamic VHD file, that starts small and grows if log partition fills up.

    Worth a try  (backup your VHD first):
    http://serverfault.com/questions/551053/how-can-i-compact-the-vhd-file-with-ubuntu

  • Thanks sixteen.

    Nothing against the thin disk on hyper-V but nowadays 80 gb are nothing.

    Sophos could prepare a vm where thin disks are used.

    Open a feature request on ideas.sophos.com

    Regards

    .

  • Hi together,

    I would like to bring an update to this thread as I was struggling with the growth of my dynamic image file also.

    I'm using KVM with a qcow2 image and noticed that the image is growing endlessly (it was > 27GB) while the XG inside is using only 2GB after 6 weeks. This must have something to do with the way log rotation and the reporting database is working inside XG. All tries to reduce the logging e.g. with deactivating logging for web protection and the per-fw-rule-logging to keep the growth rate in an acceptable rate were unsuccessful.

    Of course 80GB are nothing nowadays but if you are running a dedicated hypervisor in a small box at home you probably wouldn't want to put in a very big SSD into it. (I'm using a 128GB SSD) Second I'm a fan of doing regular full backups of the VMs itself and with these image sizes you would easily get hundreds of GBs if you would keep some backup generations on the hardware itself before moving it to an archive.

    After checking the install PDFs I noticed that the minimum disk requirement for a software-based installation is only 10GB. Therefore I decided to try a fresh install of my XG with a smaller disk size and recover a backup of my config.

    I'm now running with a 20GB disk/image (which means the var-partition is set up with a size of 14GB) since yesterday and I will give some feedback in the future if I will run into problems with it.

    Best regards

    DomNik