sudo apt-get install bridge-utils
Assuming the following scenario:
- host system ip configuration:
- IP: 10.10.10.5
- netmask: 255.255.0.0
- Gateway: 10.10.0.1
- DNS: 10.10.0.250, 10.10.0.251
- guest ip configuration:
- IP: 10.10.10.10
- netmask: 255.255.0.0
- Gateway: 10.10.0.1
- DNS: 10.10.0.250, 10.10.0.251
auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 10.10.10.5 netmask 255.255.0.0 gateway 10.10.0.1 dns-nameservers 10.10.0.250 10.10.0.251
This has to be changed in the following way:
auto lo iface lo inet loopback auto eth0 iface eth0 inet manual auto br0 iface br0 inet static address 10.10.10.5 netmask 255.255.0.0 gateway 10.10.0.1 dns-nameservers 10.10.0.250 10.10.0.251 bridge_ports eth0 bridge_stp off bridge_fd 0 bridge_maxwait 0Now we have to restart networking to incorporate the changes.
/etc/init.d/networking restart
After that we can run vmbuilder to create a new machine with the corresponding client ip configuration.
vmbuilder kvm ubuntu --suite=precise --flavour=virtual --arch=amd64 --install-mirror=http://apt-cacher-ng:3142/ubuntu -o --libvirt=qemu:///system --ip=10.10.10.10 --gw=10.10.10.1 --part=vmbuilder.partition --templates=templates/ --user=admin --name=admin --pass=pass --addpkg=acpid --firstboot=/opt/kvm/images/vslave-001/vmbuilder.boot.sh --mem=4096 --hostname=build-vslave-001 --bridge=br0
- https://help.ubuntu.com/community/KVM/Networking
- http://docwiki.cisco.com/wiki/OpenStack:VM_Build
- http://foswiki.org/Support/UbuntuVmBuilder
- http://www.fak-online.net/?p=22
- http://www.linux-kvm.org/page/Networking
- http://blog.braastad.org/?p=128
- http://www.howtoforge.com/virtualization-with-kvm-on-ubuntu-12.04-lts
Keine Kommentare:
Kommentar posten