Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

I have set up a few soon-to-be production VMs running on QEMU-KVM on Ubuntu 10.04 LTS.

As for networking, I chose the "NAT" option in Virt-Manager and each VM now gets an IP address 192.168.122.x from QEMU's internal DHCP server.

I've restarted the VMs several times and the IP addresses are always the same. I've given each VM a network adapter with a unique MAC address.

So can I rely on that QEMU's internal DHCP server will give out the same IP addresses? Or is the safest option to set static IP addresses from within each VM?

share|improve this question

Seems my question is answered in the libvirt manual. One needs to specifically ensure that the same IP is handed out via DHCP each time. Here's how this can be specified:

  <ip address="" netmask="">
      <range start="" end="">
      <host mac="01:23:45:67:89:ab" name="foo.example.com" ip="">

Alternatively, static IP is a viable option.

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.