I have been playing around with a graphical kvm virtual machine so I won't have to install Citrix Receiver on my main system because It doesn't meet my software standards being 32 bit on a 64 bit system and required to connect to untrusted network.
I have been intermittently been able to get the kvm machine to bridge properly by playing with the link state of the bridge and the tap device and by adding the interface to the bridge. Both host and the guest are Debian Wheezy machines.
I actually figured it out how to fix it mid post.
- start the host
- start the guest
- add the guest to the bridge
- activate the tap interface on host created by guest (Never have to do this with LXCs)
- activate the tap interface on the bridge again? (Never have to do this with LXCs)
- fix resolve.conf in guest move dns server the host currently is talking to to the top of the list 7 try configure stuff before something goes wrong
- repeat
The new question is how should I script this out so I can actually trust it to work at least 90% of the time? Should I let kvm configure the tap device?
Here is how I start the machine.
#!/bin/sh nohup kvm -hda /dev/mapper/crypt-mach -m 512 -boot d -machine pc -name msa -display sdl -pidfile /var/run/msa.pid -device e1000,netdev=tap258,id=nic0,mac=00:01:c0:a8:03:02 -netdev tap,ifname=tap258,id=tap258,script=no,downscript=no
Here is the bridge configuration.
auto br2 iface br2 inet static address 192.168.3.1 netmask 255.255.255.252 bridge_ports br2 bridge_maxwait 0 up ip route add 192.168.3.0/30 via 192.168.3.1 up down route add 192.168.3.0/30 via 192.168.3.1
[link][11 comments]