但是 KVM 設置網路環境時會幫你自動裝好 DHCP ,這樣反倒會無法自己來
參考了 libvirt 官方 wiki 後
http://wiki.libvirt.org/page/VirtualNetworking#Further_dnsmasq_info
找到了可行的黑暗兵法
$ sudo vim /etc/libvirt/qemu/networks/default.xml
<network> <name>default</name> <bridge name="virbr%d" /> <forward/> <ip address="192.168.122.1" netmask="255.255.255.0"> <dhcp> <range start="192.168.122.2" end="192.168.122.254" /> </dhcp> </ip> </network>
把 <dhcp></dhcp> tag 裡的東西通通 dd 掉!
<network> <name>default</name> <bridge name="virbr%d" /> <forward/> <ip address="192.168.122.1" netmask="255.255.255.0"> </ip> </network>
It works! XD
No comments:
Post a Comment