Set static IP addresses for XenServer VM templates

This page has moved to You can now find all Smart Tools documentation at the Citrix Product Documentation site. Please update any page links to the new URL:

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,
  • vm-data/netmask=<netmask> (netmask for the configured static IP address; for example,
  • vm-data/gateway=<gateway> (default gateway for the configured static IP address; for example,

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