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

Compressing a Virtual UTM in VMware Fusion

The Sophos UTM for my home runs as a virtual machine under VMware Fusion in OS X (Mac). See:

https://community.sophos.com/products/unified-threat-management/astaroorg/f/52/t/27167

The Sophos UTM virtual machine had grown to consume over 50 Gbytes of disk space, so I decided to compress it. When it was done, the same Sophos UTM virtual machine consumed only 8 Gbytes of disk space. A ZIP archive backup of the virtual machine file used only 4 Gbytes of disk space. Here is the procedure:

COMPRESSING A SOPHOS UTM IN A VMWARE FUSION (Macintosh) VIRTUAL MACHINE:

0. Optional, but recommended: Shutdown your Sophos UTM. Copy the VMware virtual machine file to back it up before proceeding. Restart the Sophos UTM after the copy completes. 

1. While the Sophos UTM is still running, connect to it via SSH as root. 

2. Run the "lsblk" command - to find the individual partitions.

3. "cd" to each of the partitions shown in the "lsblk" command, then enter:

4. cat /dev/zero > wipefile; sync; sleep 1; sync; rm wipefile
This will create a file of all zeros that will fill the entire partition. You can ignore disk space full warnings. The file will delete itself when the partition is completely full. If you wish, use "ls -a" to verify that the file "wipefile" has been deleted before moving on to the next partition.

5. Repeat steps 3 and 4 for each partition you found in step 2.

6. Shutdown the Sophos UTM. You may use the WebAdmin interface if you wish. 

7. Quit the VMware Fusion application.

8. Open a terminal on the Mac computer. Run the following command: 
/Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager -k  

Note: An error message may appear: "VixDiskLib: Invalid configuration file parameter. Failed to read configuration file." This error may be safely ignored.

Hints: 
* I paste the first part of the command into the terminal window, then drag and drop the .vmdk file into the terminal window to enter the full path to the file.

* To find the .vmdk file for your virtual machine, right click the virtual machine "file", then choose "Show Package Contents". You will see the .vmdk file. Drag it to the terminal window to enter the full path.

9. OPTIONAL: Before you start the virtual machine, you may want to make a backup of the virtual machine "file". If you right-click the virtual machine file and choose 'Compress ""' you will have a ZIP archive backup of your virtual machine that will consume half the disk space as the virtual machine file itself.

10. Restart the Sophos UTM virtual machine. 

I hope this helps someone!


This thread was automatically locked due to age.