VMWare Server-specific information

From wiki.zmanda.com
Jump to navigation Jump to search

Backup method

If you run VMWare Server you cannot simply backup the virtual disk files to ensure you have a backup of the virtual machines you are running. The operating system running inside the virtual machine has a queue of pending writes, and during the backup the virtual disk file will be written to, enlarged and/or shrunk. Even if the backup finishes successfully you most likely won't have a consistent copy of the virtual machine, which may prevent the virtual machine from starting after a restore and/or may result in data loss.

To ensure correct backups of your virtual machines install the Amanda client in all your virtual machines and exclude the VMWare files on the host running VMWare Server.

Exclude lists

VMWare Server uses files for virtual disks and the virtual machine memory. For each of these files a lock file is also created. All these files can be excluded:

*.vmem
*.vmem.lck
*.vmdk
*.vmdk.lck

Also add the absolute paths and/or patterns for any virtual disk files that do not end with the extension vmdk (e.g. disk images of virtualized machines) to the exclude list.

Concurrency

Backing up DLEs that are on the same physical disk hurts performance. As multiple virtual machines run on the same host and multiple virtual disk files are commonly stored on the same physical disk, backing up virtual machines is prone to poor backup performance. You can improve performance by preventing DLEs on the same physical disk from being backed up simultaneously.

Disks of one virtual machine

Amanda supports backing up DLEs of the same host in sequence instead of simultaneously. You have to add spindles numbers to your DLEs to tell Amanda which disks must not be backed up at the same time. Disks with the same spindle number will be backed up in sequence.

For virtual machines this means that you have to give DLEs of virtual disks that are stored on the same physical disk the same spindle number. For example:

# The virtual disk files of / and /home are stored on the first physical disk
vm1 / linux 1
vm1 /home linux 1
# The virtual disk file of /opt is stored on the second physical disk
vm1 /opt linux 2

Using the above DLEs, / and /home will never be backed up at the same time. / or /home may be backed up at the same time as /opt though.

Virtual machines

Unfortunately preventing simultaneous backup of DLEs is only possible per host and not across hosts. This means that Amanda may back up multiple virtual machines on the same host and the host itself at the same time, so backup performance can be poor.

This has already been discussed on the mailing list, and the Amanda team has already created an issue for it. A possible workaround is also mentioned:

Failures

Backing up multiple virtual machines simultaneously on the same host may cause I/O problems in the virtual machines. So the backup report will contain strange results. For example:

? gtar: ./bin/netstat: Warning: Read error at byte 0, while reading 1536 bytes: Input/output error
? gtar: ./bin/ping: Warning: Read error at byte 0, while reading 9728 bytes: Input/output error
? gtar: ./bin/ping6: Warning: Read error at byte 0, while reading 8704 bytes: Input/output error

Under Linux the following messages appear in /var/log/messages:

mptscsih: ioc0: attempting task abort! (sc=c411c780)
sd 0:0:0:0: [sda] CDB: cdb[0]=0x2a: 2a 00 00 b0 d5 af 00 00 08 00
mptscsih: ioc0: task abort: SUCCESS (sc=c411c780)

The filesystems of your virtual machine are also remounted read-only in many cases. And of course this prevents your virtual machine from functioning normally.

This issue occurs because the emulated SCSI controller of VMWare cannot handle intensive I/O operations on the host properly. As Amanda will backup the virtual machines at the same time, the I/O operations of these virtual machines will happen at the same time. This I/O load causes the emulated SCSI controllers to fail.

The emulated IDE controller is more stable than the emulated SCSI controller, so it is better to use IDE disks for your virtual machines. Also see: IDE vs SCSI Emulation of VMware in Linux.