有很多用于 Kvm-networking 的配置。但是我无法从主人或外面接触到客人。我正在 Ubuntu 11.04 上工作。在来宾上,我有一个带 dhcp 的 WindowsXp。
我希望来宾在主机的同一网络中。我试过使用 ip 别名
我已经在 /etc/network/interfaces 中设置了桥接网络
auto eth0
iface eth0 inet manual
auto eth0:1
iface eth0:1 inet static
address 192.168.0.11
netmask 255.255.255.0
auto br0
iface br0 inet static
address 192.168.0.10
netmask 255.255.255.0
gateway 192.168.0.1
bridge_ports eth0
bridge_stp off
bridge_fd 0
bridge_maxwait 0
Run Code Online (Sandbox Code Playgroud)
然后更改 /etc/libvirtd/qemu/network/default.xml 中的默认网络
<network>
<name>default</name>
<uuid>831a93e1-0b84-0b0e-9ca2-23c407983968</uuid>
<forward mode='route'/>
<bridge name='virbr0' stp='on' delay='0' />
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.122.100' end='192.168.122.254' />
<host mac='52:54:00:7c:df:88' name='vm' ip='192.168.122.99' />
</dhcp>
</ip>
</network> …Run Code Online (Sandbox Code Playgroud)