Changes between Version 7 and Version 8 of adherelinux/KVM/qemu-pxe


Ignore:
Timestamp:
Aug 26, 2011, 2:16:36 PM (13 years ago)
Author:
adherelinux
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • adherelinux/KVM/qemu-pxe

    v7 v8  
    11== qemu-pxe ==
     2
     3系統:Ubuntu10.10-i386
     4硬體:Dell OPTIPLEX 980
    25
    36這邊我們引用Stan http://superstanwu.blog.ithome.com.tw/post/775/76131 [[br]]
     
    7477}
    7578}}}
     79
     80重新啟動tftp,dhcp
     81{{{
     82sudo /etc/init.d/dhcp3-server start
     83sudo /etc/init.d/tftpd-hpa start
     84}}}
     85
     86啟動NA讓tap0上的封包轉發到eth0
     87{{{
     88sudo bash -c 'echo 1 > /proc/sys/net/ipv4/ip_forward'
     89iptables -F
     90iptables -X
     91iptables -t nat -F
     92iptables -t nat -X
     93iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
     94iptables -t nat -A POSTROUTING -o eth0 -s 10.0.0.0/24 -j MASQUERADE
     95iptables -L
     96}}}
     97
     98利用qemu指令作網路開機
     99{{{
     100qemu -boot n -option-rom /usr/share/qemu/pxe-ne2k_pci.bin -m 512 -net nic -net tap,ifname=tap0,script=no
     101}}}