Set static IP addresses for XenServer VM templates
Important: This topic describes deprecated functions and will be removed from the documentation. For more information about deprecated functions in Smart Tools, see What’s New in Citrix Smart Tools.
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=”IPAddress” (where “IPAddress” is the static IP address; for example, 10.0.0.2.)
- vm-data/netmask=”netmask” (where “netmask” is the netmask for the configured static IP address; for example, 255.255.255.0.)
- vm-data/gateway=”gateway” (where “gateway” is the 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).