Bug 1404112 - set usable video model default for aarch64 qemu (not cirrus)
Summary: set usable video model default for aarch64 qemu (not cirrus)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-13 06:13 UTC by Sam Song
Modified: 2017-09-14 20:35 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-09-14 20:35:25 UTC
Embargoed:


Attachments (Terms of Use)
the domain definition (948 bytes, text/plain)
2016-12-13 06:13 UTC, Sam Song
no flags Details

Description Sam Song 2016-12-13 06:13:28 UTC
Created attachment 1231067 [details]
the domain definition

Description of problem:
When I define a aarch64 domain, the libvirt throws the error below:
$ virsh define arm1.xml
error: Failed to define domain from arm1.xml
error: unsupported configuration: PCI controller at index 1 (0x01) has bus='0x01', but index must be larger than bus


Version-Release number of selected component (if applicable):
$ libvirtd --version
libvirtd (libvirt) 2.2.0

$ uname -a
Linux sam-pc.local 4.8.12-300.fc25.x86_64 #1 SMP Fri Dec 2 17:52:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

$ qemu-system-aarch64 --version
QEMU emulator version 2.7.0(qemu-2.7.0-7.fc25), Copyright (c) 2003-2016 Fabrice Bellard and the QEMU Project developers


How reproducible:

Steps to Reproduce:
1.install qemu-system-aarch64, libvirt, edk2-aarch64
2.define a domain using the attached

Actual results:
define failed

Expected results:
define the domain successfully

Additional info:
$ cat arm1.xml
<domain type='qemu'>
  <name>arm1</name>
  <uuid>8028f71a-1db8-40a4-94fa-5a4a42014270</uuid>
  <memory unit='MiB'>2048</memory>
  <currentMemory unit='MiB'>2048</currentMemory>
  <vcpu>2</vcpu>
  <os>
    <type arch='aarch64' machine='virt'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/edk2/aarch64/QEMU_EFI-pflash.raw</loader>
  </os>
  <cpu mode='custom' match='exact'>
    <model fallback='allow'>cortex-a57</model>
  </cpu>
  <devices>
    <emulator>/usr/bin/qemu-system-aarch64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/home/sam/xenial-server-cloudimg-arm64-uefi1.img'/>
      <target dev='vda' bus='virtio'/>
    </disk>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <graphics type='vnc' port='5900' autoport='yes' keymap='en-us'/>
  </devices>
</domain>

Comment 1 Cole Robinson 2017-06-24 13:59:08 UTC
That particular error is about libvirt not setting up a correct PCI controller layout, however that's fixed in f26. The remaining 'bug' in this area is that the default added <video> device gets model=cirrus which isn't available for aarch64, so libvirt should default to a different model

That said, your config as is isn't going to work at any point. For x86 VMs you can just add a <graphics> device and automatically and libvirt fills in the <video> config, and qemu gives an implicit mouse/keyboard setup. However on other archs you need to specify the mouse/keyboard manually

On f26, you can define that XML, then open up virt-manager, and add a controller=usb3, input=tablet, input=usb keyboard, and change the video model to virtio and it should work

Comment 2 Cole Robinson 2017-06-28 20:32:45 UTC
patches posted upstream:

https://www.redhat.com/archives/libvir-list/2017-June/msg01269.html

Comment 3 Cole Robinson 2017-09-14 20:35:25 UTC
Upstream now:

commit dda0da14cd6ebff98c2293b1407371286853a38f
Author: Cole Robinson <crobinso>
Date:   Sun Aug 27 11:04:42 2017 -0400

    qemu: Default to video type=virtio for machvirt


Note You need to log in before you can comment on or make changes to this bug.