Linux VM Template Creation

In this article we are going to show you how to create a Debian Server Virtual Machine Template based on the work of Thomas Liske over at Templating Debian GNU/Linux. While our process is primarily based on Thomas’s work, we have opted to go the bash scripting route instead of installing the ovfdep tool. It is important to note two things in regards to this article. First, we are not actually creating a VMware Template but something more along the lines of a Sysprep image that can be exported to .ova or imaged using your favorite imaging software. Second, while it has not yet been tested, this process will most likely work on Ubuntu Server as well. Thomas uses the terms dehydration and rehydration to describe the processes of preparing and then deploying the template. We really thought those terms made a lot of sense so we are sticking with them. Below are the scripts we will use to prepare ourĀ  server for export or imaging (vm-dehydrate) and then deployment (vm-rehydrate).


Usage: copy the script to the server and make it executable then run the script.


Usage: once the template or image has been deployed, copy the script to the server and make it executable then run the script as seen below by only passing the new server host name to the script.

Did you find this article useful? Why not share it with your friends?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.