[ubuntu-cloud] How to Tun/Tap with KVM hypervisor

nguyenle lemon1707 at gmail.com
Fri May 13 03:44:03 UTC 2011

Hi everyone, please help me correct the problem.
 I installed Ubuntu 9.10 Karmic I386 from store first, I started it
successfully. I mean I can ping it from outsite and It's always running
Then I downloaded a Ubuntu 9.10 Karmic iso file from
http://www.ubuntu.com/download for bundling.

I describe the install process for more detail :

1/ First, I create partition on the host with command, notice that host had
bridge with namd br0 runnind as eth0 physical:

$ kvm-img create -f qcow2 image.img 5G

2/ Then, copied ubuntu-9.10.iso into /home/lemon1707 to install with command
$ sudo kvm -m 512 -cdrom ubuntu-9.10.iso -drive
file=ubuntu9-10.img,if=scsi,index=0,boot=on -boot d -net
nic,vlan=0,model=e1000 -net tap -nographic -vnc :0

3/ When the process installation finished :
I check the VM ip with ifconfig, It doesn't appear eth0 ip, but in the
/etc/network/interfaces it had configurated :
auto eth0
iface eth0 inet dhcp

4/ Then I changed bridge='br0' in the file
/etc/vmbuilder/libvirt/libvirtxml.tmpl on the host system.
After that I relaunched VM with command,  The VM's eth0 interface up and VM
can connect direct to internet.
$ sudo kvm -m 512 -drive file=ubuntu9-10.img,if=scsi,index=0,boot=on -boot c
-net nic,vlan=0,model=e1000 -net tap -nographic -vnc :0

5/ I copied initrd.img-2.6.31-14-server and vmlinuz-2.6.31-14-server from VM
to host. I registerd it with UEC by using memdisk command. Then I ran it by
using Hybridfox, checked the status is running.
Public Ip is, private ip

But I still can not ping or ssh from outsite ( I had opened ports ). The
best thing to do is to let VM's interface know where it can bind with the
host's bridge interface for VM can connect direct to outsite.

Are there any problem in the process ? Should I reinstall because I think we
should change bridge='br0' in the file
/etc/vmbuilder/libvirt/libvirtxml.tmpl before install VM's OS to make sure
they can affect.
Any ideas for that problem ?

Lê Tuấn Nguyền
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-cloud/attachments/20110513/a09d7313/attachment.html>

More information about the Ubuntu-cloud mailing list