Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Installed Xen on a server at home, recently moved it to a data center. Worked fine with DHCP behind my router, with each virtual server and the dom0 getting its own IP address.

At the data center, there's plenty of IP addresses to use, but they all need to be static. I managed to get the dom0 setup with a static IP like this, but I'm not sure where to go from here.

auto eth0
iface eth0 inet static
share|improve this question

migrated from Dec 10 '11 at 10:20

This question came from our site for professional and enthusiast programmers.

Basically do more of this. – Chopper3 Dec 10 '11 at 10:59

Just configure every virtual machine's static IP in


To pass the proper IP to your VM when creating one, add to your xen-create-image command this option :

root@nikita:~# xen-create-image --hostname <HOST> --ip <IP> 
share|improve this answer
As in, use the same configuration, but in the /etc/network/interface file of each VM individually? Thanks! – rachelderp Dec 10 '11 at 14:23
well that depends how you have set up your network in Xen, but normally it is a bridge, so yea, the only thing you will need to change are the IP addresses – Lucas Kauffman Dec 10 '11 at 14:24
Is there any additional configuration needed for the bridge? Or does Xen magically detect things like that? – rachelderp Dec 10 '11 at 14:27
yes and no, it is not magical, it is called a script :p : – Lucas Kauffman Dec 10 '11 at 14:28

In /etc/xen/xen-tools.conf you should comment to get the following:

# dhcp = 1

I also use to mention my bridge in /etc/xen-tools/xen-tools.conf


this bridge name will be the name of the bridge from /etc/network/interfaces

then uncomment the following:

gateway    =
netmask    =
broadcast  =

For namerservers, if you don't touch anything, the virtual machine will inherit from the Dom0 namerservers.

then when you create a Xen virtual machine, mention the Ip:

>xen-create-image --hostname=test105 --ip=

From my own experience, i think it is better to put as many parameters as you can in xen-tools to keep the number of parameters to the smallest when you create a new virtual machine.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.