Changes between Version 11 and Version 12 of Internal/VMHostSetup


Ignore:
Timestamp:
Jun 18, 2013, 2:03:23 AM (11 years ago)
Author:
ssugrim
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/VMHostSetup

    v11 v12  
    204204    install_vm takes 2 parameters, the name of the disk image to install on (the image created earlier via kvm-img) and the iso to mount. It takes the default vnc port :0 (tcp port 5900), and also mounts a cdrom. The vnc port number is also the last digit of the mac address. start_vm has two arguments, the first is also the image name, the second is which vnc port to take (1-9). It also follows the last digit mac convention.
    205205
     206----
     207=== Incase you are using regular linux bridgeing ===
     208
     209In winlab we used simple bridgeing instead of the open-V-switch. Many steps remain the same however there are a few adjustments. These adjustments basically have to do with installed packages and the ifup and ifdown scripts.
     210
     211 1. The package installed was
     212    {{{
     213    apt-get install bridge-utils
     214    }}}
     215 1. /etc/networks/interfaces was reconfigured to reflect the bridged interface:
     216    {{{
     217# This file describes the network interfaces available on your system
     218# # and how to activate them. For more information, see interfaces(5).
     219
     220# The loopback network interface
     221auto lo
     222iface lo inet loopback
     223
     224# The primary network interface
     225auto eth0
     226iface eth0 inet dhcp
     227
     228auto  eth1
     229iface eth1 inet manual
     230
     231auto br0
     232iface br0 inet static
     233address 192.168.200.67
     234        network 192.168.200.0
     235        netmask 255.255.252.0
     236        bridge_ports eth1
     237        bridge_stp off
     238        bridge_fd 0
     239        bridge_maxwait 0
     240    }}}
     241 1. The ifup and ifdown scripts were replaced with the brctl equivalents:
     242    {{{
     243/etc/ifup-br0
     244--------------------------------------------------------------------
     245#!/bin/sh
     246
     247switch='br0'
     248/sbin/ifconfig $1 0.0.0.0 up
     249/sbin/brctl addif ${switch} $1
     250--------------------------------------------------------------------
     251
     252/etc/ifdown-br0
     253--------------------------------------------------------------------
     254#!/bin/sh
     255
     256switch='br0'
     257/sbin/ifconfig $1 0.0.0.0 down
     258/sbin/brctl delif ${switch} $1
     259--------------------------------------------------------------------
     260   }}}
     2611. The kvm startup script was modified to use these scripts instead of their ovs coutnerparts:
     262   {{{
     263vmhost2:/root# more start_vm
     264kvm -daemonize -vnc :$2 -m 2048 -smp 2 -net nic,model=virtio,macaddr=00:11:22:EE:EE:E$2 -net tap,script=/etc/ifup-br0,downscript=/etc/ifdown-br0 -drive file=$1
     265   }}}
     266   Where $1 is the image name, and $2 is the last digit of the mac and it's matching vnc port number.
     267----
    206268
    207269refrences: