vimage patches and example run.

Julian Elischer julian at elischer.org
Fri May 16 12:36:56 UTC 2008


vimage patches as of 8AM in ottawa:

http://www.freebsd.org/~julian/vimage.diff

apply these to a new -current tree and make the VIMAGE kernel
cd to usr.sbin/vimage to make the utility and the man page:


here is a small transcript where a new virtual system called 'fred'
is created, and teh bge1 interface is shifted into it.
we then enter 'fred' and set up the interface and check that it works.

note that load averages are given for each virtual machine..
this work is not complete and may not show correct numbers.


========== transcript ==================


root at trafmon2:vimage -l
".":
     Processes (cur/max): 45/0;  load averages: 0.00, 0.06, 0.05
     CPU usage: 0.11%
     Sockets (cur/max): 47/0;  4 network interfaces
root at trafmon2:vimage -lr
".":
     Processes (cur/max): 45/0;  load averages: 0.00, 0.05, 0.05
     CPU usage: 0.01%
     Sockets (cur/max): 47/0;  4 network interfaces
root at trafmon2:vimage -c fred
root at trafmon2:vimage -lr
".":
     Processes (cur/max): 45/0;  load averages: 0.00, 0.05, 0.05
     CPU usage: 0.00%
     Sockets (cur/max): 47/0;  4 network interfaces
"fred":
     Processes (cur/max): 0/0;  load averages: 0.00, 0.00, 0.00
     CPU usage: 0.00%
     Sockets (cur/max): 0/0;  1 network interfaces
root at trafmon2:ifconfig
bge0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
         options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
         ether 00:0f:1f:6a:7b:90
         media: Ethernet autoselect (100baseTX <full-duplex>)
         status: active
bge1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
         options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
         ether 00:0f:1f:6a:7b:91
         inet 172.28.10.2 netmask 0xffffff00 broadcast 172.28.10.255
         media: Ethernet autoselect (1000baseTX <full-duplex>)
         status: active
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
         options=b<RXCSUM,TXCSUM,VLAN_MTU>
         ether 00:02:b3:ef:c8:22
         inet 172.28.0.102 netmask 0xffffff00 broadcast 172.28.0.255
         media: Ethernet autoselect (100baseTX <full-duplex>)
         status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
         inet6 ::1 prefixlen 128
         inet 127.0.0.1 netmask 0xff000000
root at trafmon2:vimage -i fred bge1
eth0 at fred
root at trafmon2:ifconfig
bge0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
         options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
         ether 00:0f:1f:6a:7b:90
         media: Ethernet autoselect (100baseTX <full-duplex>)
         status: active
fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
         options=b<RXCSUM,TXCSUM,VLAN_MTU>
         ether 00:02:b3:ef:c8:22
         inet 172.28.0.102 netmask 0xffffff00 broadcast 172.28.0.255
         media: Ethernet autoselect (100baseTX <full-duplex>)
         status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
         inet6 ::1 prefixlen 128
         inet 127.0.0.1 netmask 0xff000000
root at trafmon2:vimage fred
Switched to vimage fred
root@:ifconfig
lo0: flags=8008<LOOPBACK,MULTICAST> metric 0 mtu 16384
eth0: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
         options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
         ether 00:0f:1f:6a:7b:91
         media: Ethernet autoselect (1000baseTX <full-duplex>)
         status: active
root@:ifconfig eth0 172.28.10.2
root@:ifconfig
lo0: flags=8008<LOOPBACK,MULTICAST> metric 0 mtu 16384
eth0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
         options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
         ether 00:0f:1f:6a:7b:91
         inet 172.28.10.2 netmask 0xffff0000 broadcast 172.28.255.255
         inet6 fe80::20f:1fff:fe6a:7b91%eth0 prefixlen 64 scopeid 0x2
         media: Ethernet autoselect (1000baseTX <full-duplex>)
         status: active
root@:ping 172.28.10.4
PING 172.28.10.4 (172.28.10.4): 56 data bytes
64 bytes from 172.28.10.4: icmp_seq=0 ttl=64 time=0.441 ms
64 bytes from 172.28.10.4: icmp_seq=1 ttl=64 time=0.177 ms
64 bytes from 172.28.10.4: icmp_seq=2 ttl=64 time=0.196 ms
64 bytes from 172.28.10.4: icmp_seq=3 ttl=64 time=0.228 ms
64 bytes from 172.28.10.4: icmp_seq=4 ttl=64 time=0.245 ms
64 bytes from 172.28.10.4: icmp_seq=5 ttl=64 time=0.109 ms
^C
--- 172.28.10.4 ping statistics ---
6 packets transmitted, 6 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.109/0.233/0.441/0.103 ms
root@:


More information about the freebsd-current mailing list