Posts Tagged ‘ubuntu’

30 second guide to bridging eth0 on Ubuntu

Tuesday, March 18th, 2008

So, you want to switch eth0 from a ‘direct’ network connection to using a software bridge? Ok, here’s your 30 second guide. If you’re using DHCP, make your /etc/network/interfaces look like this:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

auto br0
iface br0 inet dhcp
# Ports you want to add to your bridge
bridge_ports eth0
# Time to wait before loading the bridge
bridge_maxwait 0

And then reboot your machine or run “/etc/init.d/networking restart”. Voila. All your traffic now goes through the software bridge.

Background: This is useful for when you want to run multiple virtual machines, and give them all independent access to the network. The virtual machines need virtual interfaces, and therefore, all the interfaces (both the virtual ones and the ‘real’ eth0) have to go through the bridge and out to the network. So, once you’ve bridged eth0, its easy enough to add virtual interfaces (tap/tun) and use those.

KVM won’t boot Ubuntu with module installed (on Intel)

Sunday, March 16th, 2008

So, I’m planning on using KVM to virtualize my new server, but when I try to boot any of the install ISO images, I get a message like this:

# kvm -no-acpi -vnc :1 -m 2000 -cdrom ./ubuntu-7.10-jeos-i386.iso ../test.img -boot d
exception 6 (0)
rax 0000000000000469 rbx 0000000000800001 rcx 0000000000004300 rdx 0000000000000000
rsi 000000000005961d rdi 000000000005961c rsp 00000000fffaa9cc rbp 000000000000200c
r8 0000000000000000 r9 0000000000000000 r10 0000000000000000 r11 0000000000000000
r12 0000000000000000 r13 0000000000000000 r14 0000000000000000 r15 0000000000000000
rip 000000000000b04b rflags 00033006
cs 4143 (00041430/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
ds 4004 (00040040/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
es 4004 (00040040/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
ss 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
fs 3002 (00030020/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
gs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
tr 0000 (7d850000/00002088 p 1 dpl 0 db 0 s 0 type b l 0 g 0 avl 0)
ldt 0000 (00000000/0000ffff p 1 dpl 0 db 0 s 0 type 2 l 0 g 0 avl 0)
gdt 40920/47
idt 0/ffff
cr0 60000010 cr2 0 cr3 0 cr4 0 cr8 0 efer 0
code: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Aborted

And, if I

# rmmod kvm kvm_intel

Then it can boot, but without the KVM kernel modules, the performance is horrible. The KVM pages say that these exceptions are due to the fact that some Intel processors doesn’t emulate some 8088 instructions. Well, if that means that I can’t boot my install media, then its pretty pointless, isn’t it? BTW, would it be that hard to emulate these unfrequently used instructions properly?

I’m going to see if I can get through the install process without the kernel module (under full emulation), and then boot the resultant image with the module installed, but I don’t have much hope that it’ll work very well.

In the mean time, I’m reading up on Xen, which I think is a bit more mature than KVM is…

WTF, Ubuntu?

Sunday, March 16th, 2008

Hey, so, Ubuntu, what gives?

I’m running a “sudo apt-get install fobar-package-version” and I get messages like this one:

Media change: please insert the disc labeled
‘Ubuntu-Server 7.10 _Gutsy Gibbon_ - Release amd64 (20071016)’
in the drive ‘/cdrom/’ and press enter

What gives? If I put that disc in the drive (the install CD) then when my machine reboots, it’ll boot to that disk, which isn’t what I want. How about you please just get whatever you need from the internet? Oh, and by the way, I have a copy of the .iso image on my harddrive if you really really need something thats in there. How about I just point you at that? Would that be ok? Thanks!

Update: Edit /etc/apt/sources.list and remove the entry for the cdrom, or make it point at the ISO image file to solve this issue.