| 297 | == Set up network environment == |
| 298 | |
| 299 | |
| 300 | We use TUN/TAP to connect host with qemu. We start by writing the '''ifup-qemu''' script |
| 301 | We will put it in the ''~qemu'' directory so it will be in the correct place relative to the other files |
| 302 | |
| 303 | #!/bin/sh |
| 304 | # TUN/TAP to connect host with qemu |
| 305 | ifconfig $1 192.168.9.33 |
| 306 | = Starting Custom Qemu = |
| 307 | |
| 308 | Finally, we can start our patched qemu by |
| 309 | /opt/qemu/bin/qemu-system-i386 -s -m 128 -kernel bzImage \ |
| 310 | -append "notsc clocksource=acpi_pm root=/dev/nfs \ |
| 311 | nfsroot=192.168.9.33:~qemu/rootfs rw \ |
| 312 | ip=192.168.9.88:192.168.9.33:192.168.9.33:255.255.255.0::eth0:auto \ |
| 313 | init=/sbin/init" \ |
| 314 | -net nic,model=e1000,vlan=0,macaddr=00:cd:ef:00:02:01 \ |
| 315 | -net tap,vlan=0,ifname=tap0,script=~qemu/ifup-qemu |