Amanda Enterprise 3.1 allows you to backup VMware ESX images to various media supported by Amanda. The backups are performed in an application consistent manner. These backups can be used for restoration of guest VMs running on the ESX server and can be restored to alternate ESX server. The VMware is backed up using VMware Virtual Disk APIs (Vstorage APIs) The incremental backups contain only the changed data blocks.
Zmanda recommends using Amanda client to backup files from guest VM if file level backup of VMs is needed.
Amanda Enterprise VMware ESX application supports licensed versions of VMware ESX 3.5 and 4 (Vsphere 4). Feature license for Data Recovery is required.
perl-Crypt-SSLeay
perl-URI
fuse
fuse-libs
curl
These dependencies can be installed using yum or yast or apt-get tools available in the Linux distribution. The actual names of the packages might be different in different distributions.
On RHEL systems, you can install these dependencies using:
# yum install fuse-libs fuse perl-Crypt-SSLeay perl-URI curl
On Ubuntu 8.04, following command can be used:
# apt-get install fuse-utils libfuse2 libcrypt-ssleay-perl liburi-perl curl
There are additional dependencies for some Ubuntu platforms. Following packages are also required:
libsoap-lite-perl libuuid-perl libcrypt-ssleay-perl libclass-methodmaker-perl libxml-libxml-perl libwww-perl libio-compress-perl libcompress-zlib-perl libio-compress-zlib-perl libio-zlib-perl unzip perl-doc nfs-common psmisc screen linux-headers-`uname -r` build-essential
VMware VCLI and VMware VDDK packages are available in the VMware web site. VMware VDDK package is also available in Zmanda Network. You can install the VMware packages as follows:
# <extract from VMware-vix-disklib tar archive>
# <extract from VMware-vSphere-CLI tar archive>
# ./vmware-vix-disklib-distrib/vmware-install.pl
# ./vmware-vsphere-cli-distrib/vmware-install.pl
Amanda ESX VMware application is installed as part of Amanda server. Separate software is not required.
The application is licensed. Amanda VMware license must be part of Zmanda License file on the Amanda server.
If the VMware commands (vmware-cmd, vmkfs, vmware-diskmanager, snapshotmanager.pl) are not installed in default locations (/usr/lib/vmware-cli for VCLI and /usr/bin for vmware-diskmanager), you will have to modify /etc/zmanda/zmc_aee/zmc_user_dumptypes to fix the application properties (VCLI-PATH, VCLI-BIN-PATH and VDDK-BIN_PATH).
Configuring VMware guest VM backups requires steps in both Zmanda Management Console and some manual steps.
ESX Host Name is the name of the ESX server whose guest VMs are being backed up. It can be the IP address of the ESX server.
Virtual Machine Name is the name of the guest VM that should be backed up. You should not use the IP address of the guest VM. The name of guest VM that corresponds to the directory name on the ESX server storage should be used. This value is case sensitive.
Datastore Name is the name of the VMware datastore used by the guest VM.
ESX server user and password is the authentication information for the ESX server to perform backup and restores. The password should not contain white space characters. The VMware user privileges that are required are described in Creating ESX Backup User section below.
The backup data can be encrypted and/or compressed. The compression and encryption are performed on the Amanda server and can consume significant CPU/memory resources.
It is a good idea to Disable Staging for VMware DLEs because they do not add any performance for VMware application.
You can schedule backups using Zmanda Management Console Backup When page or run immediate backups for the backup set from the Backup Activate page.
The status of the backup are shown in the Monitor page. Backup reports will be available under the Report tab in the Zmanda Management Console.
Amanda ESX Server application supports only full backups (level 0 backups).
The backups of the guest VM are performed by taking snapshots of the disks associated with the guest VMs. Snapshots are removed after the backup data is copied over. Under certain circumstances, the snapshots are not removed. It is important to remove the backup snapshots.
Zmanda Management Console can restore the VM directly to another or the original ESX server. It can also extract the files on the Amanda server. When the files are extracted on the Amanda server, they have to be transferred to the ESX server to complete the recovery.
The ZMC recovery process starts at Restore What page. Enter the Backup Date - the timestamp of the backup run. The Host Name in case of VMware is always 127.0.0.1. Enter the guest VM name in \\<esx server name>\<datastore name>\<guest VM name> format.
In the Restore Where page, Select Destination Host as localhost. The Destination Directory can be one of the following:
After reviewing the entries, Click Restore button on the Restore Restore page to start the restore process as shown below:
If raw files are being restored (see Restore Where page), the restored files will reside on the Amanda server destination directory. Use the following steps to complete the VM recovery on the ESX server.
To generate an OVF file and copy the virtual machine to ESX server in a single step, use
# /opt/vmware/ovftool/ovftool -ds=<datastore> <Name of vmx file to be copied> vi://<user name>@<ESX host>/
Generate an OVF file. Copy the contents of the directory to the ESX server and import it using Vsphere console.
# /opt/vmware/ovftool/ovftool <vmx file name> <ovf file name>
This section describes how to use Amanda recovery command amrecover to perform ESX guest VM recovery. This procedure can be used to restore guest VM to the original ESX server. These steps can be used instead of the procedure described in the previous section.
amrecover> sethost localhost
200 Dump host set to localhost.
amrecover> setdisk //192.168.1.2/rhel4-32
200 Disk set to //192.168.1.2/rhel4-32
amrecover> setproperty directory //192.168.1.3/datastore2/amanda-restore
amrecover> ls 2010-03-03-17-22-35 rhel4-32.vmx
2010-03-03-17-22-35 rhel4-32.vmdk
2010-03-03-17-22-35 .
amrecover> add *
Added file /rhel4-32.vmx
Added file /rhel4-32.vmdk
amrecover> extract
For VMware backup and restore operations, the ESX user that is specified in the ZMC Backup What page should have certain roles. You can use the following procedure to create an user with minimal privileges for backup and recovery.
After creating the role, assign the role to specific user that can be used for VMware backups.