Set static IP addresses for XenServer VM templates

For static IP addresses to work with a VM template prepared for resource locations using XenServer, the template must read values from XenStore.

For more information about XenStore, consult the XenStore web site.

Important: This topic applies only to XenServer 6.x, XenMobile 10.1, and NetScaler 10.5. Starting with XenServer 7.0, Smart Tools uses the configure_ipv4 API to set the IP address instead of XenStore values. For more information about the configure_ipv4 API, see the Citrix XenServer 7.0 Management API Guide on the Citrix Product Documentation web site.

Reading values from XenStore inside the Guest and setting static IPs

When you launch a VM with a static IP address, the following values are set:

  • vm-data/ip=<ip address> (static IP address; for example, 10.0.0.2.)
  • vm-data/netmask=<netmask> (netmask for the configured static IP address; for example, 255.255.255.0.)
  • vm-data/gateway=<gateway> (default gateway for the configured static IP address; for example, 10.0.0.1.)

Your VM template must read these values from XenStore and use them to set static IP addresses on the desired network interface card (NIC).

  

0 Comments