26.4. Duplicating an existing guest and its configuration file

26.4. Duplicating an existing guest and its configuration file

This section outlines copying an existing configuration file to create a new guest. There are key parameters in your guest's configuration file you must be aware of, and modify, to successfully duplicate a guest.

name

The name of your guest as it is known to the hypervisor and displayed in the management utilities. This entry should be unique on your system.

uuid

A unique handle for the guest, a new UUID can be regenerated using the uuidgen command. A sample UUID output:

$ uuidgen 
a984a14f-4191-4d14-868e-329906b211e5
vif
  • The MAC address must define a unique MAC address for each guest. This is automatically done if the standard tools are used. If you are copying a guest configuration from an existing guest you can use the script Section 26.6, “Generating a new unique MAC address”.

  • If you are moving or duplicating an existing guest configuration file to a new host you have to make sure you adjust the xenbr entry to correspond with your local networking configuration (you can obtain the Red Hat Virtualization bridge information using the command brctl show.

  • Device entries, make sure you adjust the entries in the disk= section to point to the correct guest image.

Now, adjust the system configuration settings on your guest:

/etc/sysconfig/network

Modify the HOSTNAME entry to the guest's new hostname.

/etc/sysconfig/network-scripts/ifcfg-eth0
  • Modify the HWADDR address to the output from ifconfig eth0

  • Modify the IPADDR entry if a static IP address is used.

/etc/selinux/config

Change the SELinux enforcement policy from Enforcing to Disabled. Use the GUI tool system-config-securitylevel or the command:

# setenforce 0

Note: This documentation is provided {and copyrighted} by Red Hat®, Inc. and is released via the Open Publication License. The copyright holder has added the further requirement that Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. The CentOS project redistributes these original works (in their unmodified form) as a reference for CentOS-5 because CentOS-5 is built from publicly available, open source SRPMS. The documentation is unmodified to be compliant with upstream distribution policy. Neither CentOS-5 nor the CentOS Project are in any way affiliated with or sponsored by Red Hat®, Inc.