After testing our appliance a bit, it is now time to make it clean before shipping it:
-
Remove the
/etc/opt/sample-app/initial_config_done
file:sudo rm /etc/opt/sample-app/initial_config_done
-
Reset the passwords to their default values if you have changed them.
-
Remove services that are no longer needed (remember to remove configuration files, too, so use sudo aptitude purge, sudo apt-get --purge remove, or sudo dpkg -P whichever tool you prefer). From our example this would include:
-
openssh-server
-
build-essentials
-
linux-headers-$(uname -r)
-
-
Clear out the apt cache:
sudo apt-get clean
-
Remove $HOME/.ssh for both user and root:
sudo rm -rf /home/user/.ssh && sudo rm -rf /root/.ssh
-
Remove any build directories that may have been used in the process. In our example that would be the contents of the
/tmp
directory. -
Remove the history of your commands:
history -c
-
Shutdown the system.
-
In VMware management console:
-
Go to your virtual machine settings.
-
Select the virtual disk.
-
Defragment it (which should reclaim all the space you freed, making your appliance smaller).
-
-
Your appliance is ready for shipment!