following ubuntu guide on kvm, I've a test server up and running at this ip address (netmask The virtual machine (same as host ubuntu 11 server) use dhcp but has a specific ip The host (already in bridge with guest) can access guest but for other nodes it's impossible! I've created a new virtual ip on the host and trying to route all requests made to (guest) to this ip, but it fails. I've followed this guide: https://help.ubuntu.com/community/KVM/Networking (paragraph IP Aliases).

Anyone can help?

Regards, Giacomo


It sounds like you're using one of the 192.168.122.x addresses libvirt assigns by default, when using the NAT mode. This means the VM is running behind a NAT and not on the bridge you've set up.

Check the configuration, and make sure the VM is plugged into the bridge, and not set up to use NAT

  • The VM is accessible from the kvm host, so I think is on the bridge. Right? Anyway I've found a solution, routing packets from aliased net interface ( to vm guest ( on SPECIFIC PORT. I used this commands: sudo iptables -t nat -A PREROUTING -p tcp -d --dport 80 -j DNAT --to-destination sudo iptables -I FORWARD -m state -d --state NEW,RELATED,ESTABLISHED -j ACCEPT Thanks, Regards, Giacomo – gsscoder Oct 14 '11 at 18:23
  • >The VM is accessible from the kvm host, so I think is on the bridge. Right? ....... wrong. The host has an interface inside the NAT, so it can access it. What you've done is port forwarding. This is ok for a couple of VMs, but it does not scale, and definitely doesn't achieve actually putting the VM on the same network (bcast domain) as the host and the rest of the machines in that network – dyasny Oct 14 '11 at 19:20
  • This is what I'm thinking these days... This kind solution can't scale! What's the right way to deploy a virtual network with kvm? How to do to put VM in the same network? Help REALLY appreciated. Can anyone tell me good documentation (books included)? Regards, Giacomo – gsscoder Oct 15 '11 at 7:28
  • I am pretty far from anything ubuntu, however, if you post your VM definition xml file, I might be able to help – dyasny Oct 15 '11 at 8:02
  • In these days we've moved the test server from a place to another, when it will become available I'll post it. Thanks a lot! – gsscoder Nov 9 '11 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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