There are many applications designed to create a system image: for creating your own system with your favorite pre-installed applications, preparing an image of a game server easily mountable, duplicating a fine-tuned server, or simply saving your system…
Note:
You may now duplicate the disk on the disk management page and create a VPS using this copy, it is simple and faster than the usual process with "dd".The process is really quite simple and may be done by anyone who follows the procedures carefully:
You must first create a data disk with a maximum of 3 GB (this limit is temporary). This can be done fom the disk creation interface in your hosting account. If you do not have enough disk space, you can purchase more during the operation.
Simply attach your new disk to the server to be copied (the one that you want to make an image of).
To create the image of your system and copy it to your newly-created data disk, you must first use the UNIX command: dd
The syntax of the command requires a bit of attention however. Here is an example that we will examine in a second:
dd if=/dev/xvda of=/dev/xvdc conv=sync
The parametr if corresponds to the path to the source (the system that we want to copy), while of is the path to the destination disk (the data disk where you want to copy the data to that you just created).
Tip:
To see the path of your disks, we suggest that you first use the df command.Please note however that the path to use for the 'if' operation will always directly be '/dev/xvda'. If not setup so, the image will not be bootable.
Important:
You need to re-configure the network of your machine in DHCP before proceeding with the creation of the image. Please note that the command "dd" takes time (because it is copying the source disk to the destination disk bit by bit)Important:
The linux kernel for virtual machine is booting by default on the first partition (root=/dev/xvda1 on the boot command line). If you copy an existing system disk, the partition layout will be correct. Otherwise please make sure you have a first partition containing your system files and the bootable attribute. Please note that a second partition containing a swap space could help your system.Return to your disk management interface on Gandi's website in your hosting account, and remove the disk from your server that you have copied the disk image on.
On the Gandi.net control panel, you are now able to set a kernel on a disk, take the concerned data disk, then, apply a appropriate kernel to the image you have created.
For example, take a data disk on the conrol panel that you want to transform in a system/image disk :
Use the link to modify the parameters or informations of this disk, you will find an option at the bottom of the page to change the disk type into system :
You will gain access to the advanced mode like on a system disk :
Note:
Adding a kernel, the disk can be used as a "personal image", it will be available in the images list when you will create a new server on the control panel.Now all that remains is to create a new server. The only difference will be in the choice of your system, as you now have an extra option: use your custom-made image!
Note:
We are currently working on Gandi disk images (game servers for example) that we will soon be able to offer you, as well as extend the disk size to over 3GB.
Last modified: 08 Jul 2011 at 13:44 by Emerick M. (Gandi)