Multiple IP addresses assigned to one KVM VM

Jguy asked:

OS: Debian 6.0 64-bit with KVM installed from packages
KVM is managed with Cloudmin 6.4.kvm

I have a /29 subnet from my host. The bridge is setup properly for each VM to have its own IP, assigned through a DHCP server running on the host. I followed this guide from my host: (You’ll have to run it through GTranslate, it’s a German host, so German guide)
Host IP (not my real IP):
My subnet is, which means I have the following IP’s available to my VM’s:

As mentioned, the routing is setup and the 4 VM’s I do have setup all have an IP and can communicate with the outside world and each other. That’s not the problem I’m having. When I attempt to add another IP to a VM, the IP is not able to ping from the outside world.

For the record, my ultimate goal is to be able to run a DNS server and have it registered, so that I can point all my domains to it and control DNS from a virtualmin installation installed on one of the VM’s (and therefore make it easier to run my websites instead of having to go into my registar’s DNS console, making a subdomain, then making an apache virtual server manually, yadda yadda).

So, when I create a VM, it gets the next available IP, which, in this case, is I want to also be able to give this VM or even, or any other available IP. When I do, however, the IP cannot be ping’d from the outside world.

Steps I take:
1. Create the VM as usual in Cloudmin.
2. Install the OS and get the first IP setup on the VM
3. Navigate to ‘System Configuration’ -> ‘Network Interfaces’ in Cloudmin and add another ethN device with the desired MAC Address and bridge device as per my hoster’s guide above.
4. Add the new device to the VM and then reboot the VM, but when it comes back up, the ethN I added (eth1) claims it’s not present on the VM, so I can’t do something like
ifconfig eth1 up
or I’ll get the error message “No such device”.

I think it’s because Cloudmin assigns an IP to the machine and then adds an entry to some sort of routing on the host. I can’t find any documentation on this, though. Does anyone have any ideas on how I can accomplish this?

EDITED: Alternatively, is there a better, open source GUI that I can use to administrate KVM that will allow me to do this easier that you would recommend?

My answer:

First, make sure you have set up bridging properly so that your virtual machines can communicate with the network.

Second, create an IP Pool containing your /29 network and the gateway address within that /29. Setting the gateway address correctly is probably the part you missed. Hetzner will let you know which address in the /29 is the gateway.

Third, assign IPs to virtual machines and enjoy.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.