I started using kvm, the network works fine under the bridge mode.

But a wanted my vm to have a external ip address , like xen server , where you can create a virtual interface for a vm and define a external ip address for it.

I only found a way using IP Aliases, but it doesn't work very well.

https://help.ubuntu.com/community/KVM/Networking

is There any other way of doing this ?

link|improve this question
feedback

2 Answers

Since kvm bridging mode allows guests to use the same physical media as a host uses to access the real network you can just configure your guest to use an external IP address using its standard configuration procedure. Just if it was physically plugged to the external network. IP Aliases etc. is an overkill.

link|improve this answer
If I configure a external ip address on the guest other machines in the network can't see him . – Fabio H. F. Sep 6 '11 at 17:58
feedback

Ok i got it like this.

ubuntu 10.04 x64, my network has a dhcp server.

#vim /etc/network/interfaces

auto lo eth0

auto br0
iface br0 inet dhcp
bridge_ports eth0
bridge_fd 0
bridge_stp off

#virsh edit VM_NAME

<interface type='bridge'>
<source bridge='br0'/>
<model type='virtio'/>
</interface>

#/etc/init.d/networking restart

start the vm. access the vm console, you can set the ip manualy or use dhcp.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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