HP BL680c XenServer Virtual Machine Installation 4.1.0 - Page 26

MAC address, 4.7. Time handling in Linux VMs, 4.8. Configuring VNC for VMs

Page 26 highlights

Installing Linux VMs 4.6.3. MAC address In some cases, the MAC address of a cloned VM's virtual network interface is recorded in the network configuration files. After the VM is cloned, the new cloned VM has a different MAC address. Therefore, when started, the network does not come up automatically. Some Linux distributions use udev rules to remember the MAC address of each network interface, and persist a name for that interface. This is intended so that the same physical NIC always maps to the same ethn interface, which is particularly useful with removable NICs (like laptops). But this behavior is problematic in the context of Virtual Machines. For example, if you configure two virtual NICs when you install a VM, and then shut it down and remove the first NIC, on reboot XenCenter shows just one NIC, but calls it eth0. Meanwhile the VM is deliberately forcing this to be eth1. The result is that networking doesn't work. If the VM uses persistent names, the best thing to do is to turn these rules off. If for some reason you do not want to turn persistent names off, be aware that you will need to reconfigure networking inside the VM in the usual way, and the information shown in XenCenter will be out of sync with reality. 4.7. Time handling in Linux VMs By default, the clocks in a Linux VM are synchronized to the clock running on the control domain, and cannot be independently changed. This mode is a convenient default, since only the control domain needs to be running the NTP service to keep accurate time across all VMs. Upon installation of a new Linux VM, make sure you change the time-zone from the default UTC to your local value (see Section 4.9, "Release Notes" for specific distribution instructions). Procedure 4.5. Individual Linux VMs can be set to maintain independent times 1. From a root prompt on the VM, type the command: echo 1 > /proc/sys/xen/independent_wallclock 2. This can be persisted across reboots by changing the /etc/sysctl.conf configuration file and adding: # Set independent wall clock time xen.independent_wallclock=1 3. As a third alternative, the independent_wallclock=1 may also be passed as a boot parameter to the VM. 4.8. Configuring VNC for VMs With the exception of VMs based on the Debian templates, VMs might not be set up to support VNC by default. For example, if you P2V a server that does not have a VNC server installed, the resulting VM won't have VNC installed either. Before you can connect with the XenCenter graphical console, you need to ensure that the VNC server and an X display manager are installed on the VM and properly configured. This section describes the procedures for configuring VNC on each of the supported Linux operating system distributions to allow proper interactions with the XenCenter graphical console. CentOS-based VMs should use the instructions for the Red Hat-based VMs below, as they use the same base code to provide graphical VNC access. CentOS 4 is based on Red Hat Enterprise Linux 4, and CentOS 5 is based on Red Hat Enterprise Linux 5. 4.8.1. Setting up Red Hat-based VMs for VNC 21

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44

Installing Linux VMs
21
4.6.3. MAC address
In some cases, the MAC address of a cloned VM's virtual network interface is recorded in the network
configuration files. After the VM is cloned, the new cloned VM has a different MAC address. Therefore,
when started, the network does not come up automatically.
Some Linux distributions use udev rules to remember the MAC address of each network interface, and
persist a name for that interface. This is intended so that the same physical NIC always maps to the same
eth
n
interface, which is particularly useful with removable NICs (like laptops). But this behavior is problematic
in the context of Virtual Machines. For example, if you configure two virtual NICs when you install a VM,
and then shut it down and remove the first NIC, on reboot XenCenter shows just one NIC, but calls it eth0.
Meanwhile the VM is deliberately forcing this to be eth1. The result is that networking doesn't work.
If the VM uses persistent names, the best thing to do is to turn these rules off. If for some reason you do
not want to turn persistent names off, be aware that you will need to reconfigure networking inside the VM
in the usual way, and the information shown in XenCenter will be out of sync with reality.
4.7. Time handling in Linux VMs
By default, the clocks in a Linux VM are synchronized to the clock running on the control domain, and cannot
be independently changed. This mode is a convenient default, since only the control domain needs to be
running the NTP service to keep accurate time across all VMs. Upon installation of a new Linux VM, make
sure you change the time-zone from the default UTC to your local value (see Section 4.9, “Release Notes”
for specific distribution instructions).
Procedure 4.5. Individual Linux VMs can be set to maintain independent times
1.
From a root prompt on the VM, type the command:
echo 1 > /proc/sys/xen/independent_wallclock
2.
This can be persisted across reboots by changing the
/etc/sysctl.conf
configuration file and
adding:
# Set independent wall clock time
xen.independent_wallclock=1
3.
As a third alternative, the
independent_wallclock=1
may also be passed as a boot parameter to
the VM.
4.8. Configuring VNC for VMs
With the exception of VMs based on the Debian templates, VMs might not be set up to support VNC by
default. For example, if you P2V a server that does not have a VNC server installed, the resulting VM
won't have VNC installed either. Before you can connect with the XenCenter graphical console, you need
to ensure that the VNC server and an X display manager are installed on the VM and properly configured.
This section describes the procedures for configuring VNC on each of the supported Linux operating system
distributions to allow proper interactions with the XenCenter graphical console.
CentOS-based VMs should use the instructions for the Red Hat-based VMs below, as they use the same
base code to provide graphical VNC access. CentOS 4 is based on Red Hat Enterprise Linux 4, and CentOS
5 is based on Red Hat Enterprise Linux 5.
4.8.1. Setting up Red Hat-based VMs for VNC