pfsense and virtualbox compact disk space
-
Hi,
I have installed in pfsenes in esxi and exported it to ovf file format and imported it in oracle virtualbox. the acutal pfsense is using hardly 1.2 gb. But the VDI file is of 93 GB. I want to reduce it as i am testing something and will need to restore some dozen pfsense instances. so to lab it i need to virtualize them on test envirnoment and reduce its disk footprint. Any possibility ? or clue ?Filesystem Size Used Avail Capacity Mounted on
pfSense/ROOT/default 172G 1.0G 171G 1% /
devfs 1.0K 0B 1.0K 0% /dev
pfSense/tmp 171G 248K 171G 0% /tmp
pfSense/var 171G 356K 171G 0% /var
pfSense/home 171G 108K 171G 0% /home
pfSense/var/log 171G 3.7M 171G 0% /var/log
pfSense/var/db 171G 960K 171G 0% /var/db
pfSense/var/tmp 171G 152K 171G 0% /var/tmp
pfSense/var/cache 171G 96K 171G 0% /var/cache
pfSense/ROOT/default/cf 171G 2.1M 171G 0% /cf
pfSense/ROOT/default/var_cache_pkg 172G 353M 171G 0% /var/cache/pkg
pfSense/ROOT/default/var_db_pkg 171G 5.0M 171G 0% /var/db/pkg
tmpfs 4.0M 112K 3.9M 3% /var/run
devfs 1.0K 0B 1.0K 0% /var/dhcpd/devgpart show
=> 40 419430320 da0 GPT (200G)
40 532480 1 efi (260M)
532520 1024 2 freebsd-boot (512K)
533544 7128 - free - (3.5M)
540672 2097152 3 freebsd-swap (1.0G)
2637824 416784384 4 freebsd-zfs (199G)
419422208 8152 - free - (4.0M)camcontrol devlist
<VBOX HARDDISK 1.0> at scbus32 target 0 lun 0 (da0,pass0) -
I don't think GParted will do ZFS.
- Backup your config.
- Create a new VM using less disc space.
- Import the config.
-
With my attempts to build small images with VB, I found the easiest way to get the image to be small is to do the install on as small of a virtual disk as possible. In your case try installing pfSense on a 1.3 or 1.4GB disk. I do not know what the minimum install disk size is, but experimentation will get you there. Once there you can always restore the config you have if needed.
There are VB options to reduce the disk, but in this case I suspect it will be easier to just re-install.