Amanda Enterprise allows you to backup VMware ESX images to various media supported by Amanda. The backups are performed in a file system in a 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).
Full and incremental backups of the VM are supported. The incremental backups contain only the changed data blocks in the virtual machine.
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 (paid) versions of vSphere 5 and VMware 4.x (or called vSphere). VMware ESX 3.x is not supported because vStorage APIs are not available for ESX 3.x. If you are using ESX 3.x, please contact Zmanda support for a solution.
Amanda Enterprise VMware ESX application does not backup VMware independent disks or RDM (Raw Device Mapping) disks. According to VMware, "snapshots of raw disks, RDM physical mode disks, and independent disks are not supported". For more information, refer to the vSphere Basic System Administration guide, Section 17. They have to be backed up by installing Amanda client from another machine.
Please check supported platforms for VCLI and VDDK in their release notes (Example: VCLI 5.5 release notes).
Amanda Enterprise server should run on these supported platforms for backing up VMware virtual machines.
The VMware packages have following operating system dependencies:
perl-Crypt-SSLeay
perl-URI
perl-XML-LibXML
libxml2.i686
fuse
fuse-libs
curl
openssl-devel
On SLES 11, the above dependencies are required except for the openssl-devel package. Instead of the openssl-devel package, please install the following dependencies from SLES SDK distribution (DVD 1)
libopenssl-devel
zlib-devel
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/CentOS/Oracle Linux systems, you can install these dependencies using:
# yum install fuse-libs fuse perl-Crypt-SSLeay perl-URI curl openssl-devel perl-XML-LibXML libxml2.i686
To install VCLI 5.1.x package on CentOS 6, you will have to install following packages. You can use the following command:
# yum install make gcc libuuid-devel libxml2-devel
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 32bit packages are also required:
libcrypt-ssleay-perl libclass-methodmaker-perl libxml-libxml-perl libwww-perl libxml2:i386
VMware vCLI is available at the VMware web site. VMware VDDK package is available at Zmanda Network Downloads page. 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
Please set http_proxy and ftp_proxy to (empty string) in the user shell before running VCLI installer, if Amanda server has direct access to internet. If there is a proxy server, the environment variables - http_proxy and ftp_proxy must be set to proxy server IP address.
Amanda ESX VMware application is installed as part of Amanda server. Separate software is not required. Please install the latest Amanda VMware patch available in Zmanda network.
The application is licensed. Amanda VMware license must be a 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-vcli for VCLI and /usr/bin for vmware-diskmanager), you will have to modify /etc/zmanda/zmc/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.
Create a backup set for the guest VMs in the Zmanda Management Console. Use ZMC Backup What page to add DLEs for ESX servers. Select VMware ESX Virtual Machine from Applications drop down menu to begin configuring a VM backup. Click Add/Update to save the configuration after providing the details.
ESX Host Name is the name of the ESX server whose guest VMs are being backed up or the VMware vCenter that manages the ESX server. It can be the IP address or the IP name.
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. This is the VM Display name (not the name of the data storage folder on the ESX server) as shown in the left panel in the Vsphere Client. This value is case sensitive. If ESX Host Name is VMware vCenter, the VM can reside on any ESX server managed by the vCenter.
Datastore Name is the name of the VMware datastore used by the guest VM. This field is mandatory.
ESX server user and password is the authentication information for the ESX server or VMware vCenter server. These credentials are used to perform backup and recovery. 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 user name and password must be the same for the ESX server where the VM is running and VMware vCenter server. The user account must be local to the ESX server (login to ESX server and create the VMware user) not a vCenter-wide/domain account used on the ESX server.
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 Now 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.
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.
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 Alias/Directory/Path (guest VM name) in \\<esx or vCenter server name>\<datastore name>\<guest VM name> format. It should be exactly same as what was entered in ZMC Backup What page.
In the Restore Where page, Select Destination Host as localhost. The Destination Directory can be one of the following:
If you are restoring to an alternate ESX server (not the original ESX server from where backup was performed), the /etc/amanda/<backupset name>/esxpass file should contain ESX user name and password for the ESX server being restored to.
An example esxpass file is shown below:
//esx4.company.com root%root_password
esx4.company.com is the IP address or the name of the ESX server. root is the user on the ESX server used for the backup and restore operations and password for the user is root_password. The password must not be encrypted.
After reviewing the entries, Click Restore button on the Restore Restore page to start the restore process as shown below:
When errors occur, the temporary space used for restoration (Destination Directory) is not cleaned up after restoration. This should be done manually.
The CDROM device file name on the restored VM may not be correct. It should be verified on the restored VM.
Please log in to ESX server to see the restored folder and to troubleshoot restore issues. You may not be able to see the restored datastores from the vCenter server.
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/amanda-orig/backupsetname
The syntax of directory value is //restore-esxi/datastore/target-name/orig-name/backupsetname
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
If you are backing through a vCenter server, the same username/password combination being used on the vCenter server must also exist with the same privileges on each ESX server that is ultimately hosting the virtual machines being backed up.
The backup and restore user privileges required depends on whether you are using vCenter or ESX server directly. It will be easier to use non-root user with Administrator privileges as the user for backup and restore. If you have to restrict the privileges, create a backup user role with specific privileges.
The example set of privileges required for backup are (please note this list may not be complete):
The example set of privileges required for restoration are (please note this list may not be complete)
Please note that the ESX user should have administrator role on the whole ESX server not just the specific Virtual Machines being backed up.
After creating the role, assign the role to specific user that can be used for VMware backups.