首页 文章

在qemu中添加桥接适配器

提问于
浏览
0

我在本地构建的QEMU版本上运行VM(ubuntu 14) . 我正在尝试将预定义的网桥连接到VM,以便VM可以与外界通信 . 我用什么命令?我提到了qemu wiki @ http://wiki.qemu.org/Features-Done/HelperNetworking

运行以下命令会引发错误:

./qemu-system-i386 ../../../img/ubuntu_server_console_bak.qcow2 -monitor stdio -m 1024 -net nic,model = rtl8139 bridge,br = ha207

qemu-system-i386:-net nic,model = rtl8139:存在总线= 0,单位= 0(索引= 0)的驱动器

我之前使用过kvm来启动我的VM . 我能够通过config.xml中的以下更改来连接我的网桥 .

<interface type='bridge'>
      <mac address='00:00:00:00:00:ce'/>
      <source bridge='ha207' name='eth0'/>
      <virtualport type='openvswitch'>
      </virtualport>
      <model type='e1000'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </interface>
    <interface type='bridge'>
      <source bridge='control_sw' name='eth1'/>
      <model type='e1000'/>
      <virtualport type='openvswitch'>
      </virtualport>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </interface>
    <interface type='bridge'>
      <source bridge='virbr0' name='eth2'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>

我如何在qemu中实现相同的目标?

1 回答

  • 0

    这是一个简单的错字 .

    Qemu将 bridge,br=ha207 解释为磁盘映像的文件名,但它已经有一个 . 如果删除 ../../../img/ubuntu_server_console_bak.qcow2 选项,您将看到它 .

    只需添加 -net bridge,br=ha207 而不是 bridge,br=ha207 .

相关问题