2014年3月6日 星期四

ARMv8 host on Foundation model network setup and guest booted by kvmtool network setup

Foundation model should be run as root with --network=bridged
    --network=bridge will create bridge ARM0 on PC (or you can use --network-bridge=xxx to choose your bridge name)
Remember to build your host kernel with bridge, TUN/TAP device support

After host booting on Foundation model,
          run ifconfig eth0 10.10.10.11 on host,
          run ifconfig ARM0 10.10.10.10 on PC
At this moment, your host on Foundation model can ping PC and vice versa.

For booting guest, use --network "trans=mmio,mode=tap" as and --params "earlyprintk=smh ip=10.10.10.13::10.10.10.11:255.255.255.0::eth0:off console=hvc0 root=/dev/vda rw init=/bin/sh" as parameter of kvmtool.
      mode=tap will create a tap named tap0 on host, trans=mmio means use    mmio for ARM system.

After guest booting, the eth0 on guest should be 10.10.10.13.
This time, host must have a tap0 device, then execute follow command on host:
brctl addbr virbr0 
brctl setfd virbr0 0
brctl addif virbr0 eth0
ifconfig eth0 0.0.0.0
ifconfig virbr0 10.10.10.11
route add default gw 10.10.10.10
brctl addif virbr0 tap0
ifconfig tap0 0.0.0.0

After all, you should able to ping between PC, host, guest with each others.

The following picture is the network topology I think. But I almost know nothing about network so I'm pretty sure that the linking line have some error hahaXD. Just a good picture for me to memorize.






0 意見:

張貼留言