【问题标题】:Add bridged adapter in qemu在 qemu 中添加桥接适配器
【发布时间】:2016-06-13 03:11:39
【问题描述】:

我在本地构建的 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 来启动我的虚拟机。我能够通过 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 中实现相同的功能?

【问题讨论】:

    标签: networking qemu kvm libvirt hypervisor


    【解决方案1】:

    这是一个简单的错字。

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

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

    【讨论】:

      猜你喜欢
      • 2012-05-25
      • 2020-08-06
      • 2022-10-05
      • 2014-11-11
      • 2014-03-11
      • 2020-05-30
      • 2021-12-12
      • 2018-09-26
      • 1970-01-01
      相关资源
      最近更新 更多