ESXi - Backups

The ESXi is a free operating system based on the Linux for VMWare virtual machines (VM). The big difference for the VMWare server, is that it runs directly on a layer of hardware, or you do not need an operating system (OS) by using the "eat" physical resources of the server. The ESXi is very light and takes only a few Mega Bytes.
In this article, I will not focus on the installation of ESX and its remote management console, I only focus on the use of a script to backup copies of virtual machines (VM), in an ESX server.

There are also the ESX, which is the commercial version of the OS, and obviously has but features.

The requirements for the tutorial that follows are: ESX and installed PuTTY (or other tool remote connection over SSH);

Tutorial:
1 - Enable SSH access:
In the console of ESXi press ALT + F1 and type the word "unsupported".
Then enter the root password. After that it gets access to bash OS ESXi.

2 - Edit /etc /inetd.conf and uncomment the line #ssh (remove the #);

3 - Restart the ESXi server;

4 - Connect to the server by ssh:
ssh root@IP_ServidorESXi (for your OS is Linux)
If users of Windows : ( can use PuTTY to connect to ESX.

5 - With the command wget-download the script to the VMware ESXi.
ESXi3x Version:
wget http://communities.vmware.com/servlet/JiveServlet/download/8760-34-23594/ghettoVCB.sh
ESXi4x Version:
wget http://communities.vmware.com/servlet/JiveServlet/download/8760-34-23594/ghettoVCB.sh

6 - Edit the script and change some important parameters:

* VM_BACKUP_VOLUME = / vmfs / volumes / backup -> path (local or NFS) which will be the copies of the VM (Virtual Machines). It is recommended to keep a host / remote storage (for NFS).
* ENABLE_2GB_SPARSE = 0 -> = 1 if the copy is divided into files of 2GB.
* VM_BACKUP_ROTATION_COUNT = 3 -> Number of copies to save up to start over.
* VM_BACKUP_DIR_NAMING_CONVENTION -> Format of the name of the copy. It is recommended to leave as is.
* POWER_VM_DOWN_BEFORE_BACKUP = 0 -> = 0 if the copies are made with MV in production.
* ENABLE_HARD_POWER_OFF = 0 -> If = 0 is off. Lets force the closure of the MV if it has not closed during the specified time in ITER_TO_WAIT_SHUTDOWN.
* ITER_TO_WAIT_SHUTDOWN = 4 -> is not applied if the previous option is = 0; recommended to leave as is.

7 - Create vmbackups file with the name of the virtual machines that ESXi contains. Example:

ServerA
ServidorB
ServidorC

8 - Run the script:. / GhettoVCB.sh vmbackups
During the execution of the script will be shown a progress bar.

Recommendations:
- You can create a small script to call the eating presented in section 8 and put it in cron (. Weekly;. Daily; (..)) in order to automate the execution of backups.
- The copies directly to NFS can be slow, you can make them to a local directory and then copy them to a remote NFS shares, thus saving time in the backup copies of each MV.

References:
http://communities.vmware.com/docs/DOC-8760
http://www.vmware.in.th/forum/index.php?topic=6.0
http://blog.theworldrunsontechnology.com/2009/04/creating-virtual-machine-backups-in.html


The research done for this article,
had the help of Ric Silva

Continuar a ler »»
0

Etiquetas

Seguidores

Popular Posts

Free Website Hosting