Specifications

21. Cloning the Guest Configuration Files
You can copy (or clone) an existing configuration file to create an all new guest. You must
modify the name parameter of the guests' configuration file. The new, unique name then
appears in the hypervisor and is viewable by the management utilities. You must generate an all
new UUID as well (using the uuidgen(1) command). Then for the vif entries you must define
a unique MAC address for each guest (if you are copying a guest configuration from an existing
guest, you can create a script to handle it). For the xen bridge information, if you move an
existing guest configuration file to a new host, you must update the xenbr entry to match your
local networking configuration. For the Device entries, you must modify the entries in the
'disk=' section to point to the correct guest image.
You must also modify these system configuration settings on your guest. You must modify the
HOSTNAME entry of the /etc/sysconfig/network file to match the new guest's hostname.
You must modify the HWADDR address of the
/etc/sysconfig/network-scripts/ifcfg-eth0 file to match the output from ifconfig eth0
file and if you use static IP addresses, you must modify the IPADDR entry.
22. Creating a Script to Generate MAC Addresses
Red Hat Virtualization can generate a MAC address for each virtual machine at the time of
creation. Since is a nearly unlimited amount of numbers on the same subnet, it is unlikely you
could get the same MAC address. To work around this, you can also write a script to generate a
MAC address. This example script contains the parameters to generate a MAC address:
#! /usr/bin/python
# macgen.py script generates a MAC address for Xen guests
#
import random
mac = [ 0x00, 0x16, 0x3e,
random.randint(0x00, 0x7f),
random.randint(0x00, 0xff),
random.randint(0x00, 0xff) ]
print ':'.join(map(lambda x: "%02x" % x, mac))
Generates e.g.:
00:16:3e:66:f5:77
to stdout
23. Configuring Virtual Machine Live Migration
Red Hat Virtualization can migrate virtual machines between other servers running Red Hat
Enterprise Linux 5.1 with Virtualization. Further, migration is performed in an offline method
(using the xm migrate command). Live migration can be done from the same command.
Cloning the Guest Configuration Files
97