1

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

But a wanted my Virtual Machine 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.

Is there any other way of doing this?

2 Answers 2

1

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.

1
  • If I configure a external ip address on the guest other machines in the network can't see him . Sep 6, 2011 at 17:58
1

Ok, I got this working using Ubuntu 10.04 x64. My network has a DHCP server.

Edit interface as following

# vim /etc/network/interfaces

auto lo eth0

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

Edit virtual machine using following command

# virsh edit VM_NAME

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

Restart network service

#/etc/init.d/networking restart

Start the virtual machine. Access the virtual machine console, you can set the IP manually or use DHCP server.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .