Android-x86_64 安裝程式無法在 QEMU/KVM 中啟動 - 而是顯示 EFI Shell

Android-x86_64 安裝程式無法在 QEMU/KVM 中啟動 - 而是顯示 EFI Shell

我下載了安卓 x86_64 5.1-rc1作為可啟動img安裝映像。

我想將其安裝到使用 QEMU/KVM 和 virt-manager 作為圖形前端的 Ubuntu 16.04 64 位元 UEFI 上運行的虛擬機器。

OVMF 已安裝,且虛擬機器管理程式應正確配置,因為具有 UEFI 的 Ubuntu 測試虛擬機器(其虛擬磁碟檔案和安裝程式映像位於相同位置)運作正常。

但是,當我使用下面轉儲的設定啟動新建立的 VM 並將下載的 Android-x86 映像安裝到虛擬 CD 磁碟機時,它不會啟動,但會顯示 EFI Shell:

UEFI 互動式 Shell v2.1 螢幕截圖

我在這裡做錯了什麼?如何在 QEMU/KVM 中安裝 Android-x86?

$ virsh dumpxml android-x86_64-5.1rc1
<domain type='kvm' id='2'>
  <name>android-x86_64-5.1rc1</name>
  <uuid>599615a7-aaad-499a-84b4-0d894080dd95</uuid>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-wily'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader>
    <nvram>/var/lib/libvirt/qemu/nvram/android-x86_64-5.1rc1_VARS.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='custom' match='exact'>
    <model fallback='allow'>Broadwell-noTSX</model>
  </cpu>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
  <devices>
    <emulator>/usr/bin/kvm-spice</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/vms/Android-x86_64-5_1rc1.qcow2'/>
      <backingStore/>
      <target dev='hda' bus='ide'/>
      <boot order='1'/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/storage/ImageFiles/android-x86_64-5.1-rc1.img'/>
      <backingStore/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <boot order='2'/>
      <alias name='ide0-0-1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <interface type='network'>
      <mac address='52:54:00:9b:51:f7'/>
      <source network='default' bridge='virbr0'/>
      <target dev='vnet0'/>
      <model type='rtl8139'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/5'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/5'>
      <source path='/dev/pts/5'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0' state='disconnected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='spice' port='5900' autoport='yes' listen='127.0.0.1'>
      <listen type='address' address='127.0.0.1'/>
      <image compression='off'/>
    </graphics>
    <sound model='ich6'>
      <alias name='sound0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </sound>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <redirdev bus='usb' type='spicevmc'>
      <alias name='redir0'/>
    </redirdev>
    <redirdev bus='usb' type='spicevmc'>
      <alias name='redir1'/>
    </redirdev>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </memballoon>
  </devices>
  <seclabel type='dynamic' model='apparmor' relabel='yes'>
    <label>libvirt-599615a7-aaad-499a-84b4-0d894080dd95</label>
    <imagelabel>libvirt-599615a7-aaad-499a-84b4-0d894080dd95</imagelabel>
  </seclabel>
</domain>

答案1

在您的網域 XML 中可見的「android-x86_64-5.1-rc1.img」檔案不是帶有 El Torito / EFI 啟動映像的 CD-ROM 映像。相反,它似乎是預先安裝的硬碟映像。它應該用來代替“Android-x86_64-5_1rc1.qcow2”。

下載頁面似乎沒有提供適合您用途的 ISO 映像。

答案2

有一個適用於 Android-x86 的 QEMU HowTo,但它對我不起作用: https://www.android-x86.org/documentation/qemu.html

如果其他人遇到問題,您可以嘗試使用 virt-manager,它使用帶有 GUI 的 QEMU/KVM 並且可以正常工作。

相關內容