Session ID: BUD17-213
Session Name: libvirt integration and testing for enterprise KVM/ARM - BUD17-213
Speaker: Drew Jones, Eric Auger
Track: LEG
★ Session Summary ★
This technical discussion will highlight on-going Red Hat activities for the integration of an Enterprise Virtualization stack and present a vision of an enterprise guest. The status of features such as live migration, device assignment, H52PCIe topology, large guest support, and more will be presented. The status will cover the integration up to the libvirt level of the stack, and exhibit that components above libvirt can """"just work"""", even when development, to this time, has been predominately focused on other architectures. As feature parity with x86 is a goal, the remaining gaps with x86 wil also be highlighted. Finally, the status of the verification efforts, specifically those involving the Avocado and kvm-unit-tests frameworks, will be presented.
---------------------------------------------------
★ Resources ★
Event Page: http://connect.linaro.org/resource/bud17/bud17-213/
Presentation:
Video: https://youtu.be/HJA1h5hgPFU
---------------------------------------------------
★ Event Details ★
Linaro Connect Budapest 2017 (BUD17)
6-10 March 2017
Corinthia Hotel, Budapest,
Erzsébet krt. 43-49,
1073 Hungary
---------------------------------------------------
Keyword: LEG, KVM, ARM, testing
http://www.linaro.org
http://connect.linaro.org
---------------------------------------------------
Follow us on Social Media
https://www.facebook.com/LinaroOrg
https://twitter.com/linaroorg
https://www.youtube.com/user/linaroorg?sub_confirmation=1
https://www.linkedin.com/company/1026961
8. 8
libvirt provides a consistent API
Libvirt API
QEMU QEMU
Libvirt daemon
Node
virsh
virt-manager
OpenStack
libguestfs/
guestfish
virt-install
RPC
RHEV/oVIRT
More at https://libvirt.org/apps.html
9. 9
libvirt 3.x: new AArch64 support
• New support
• Use virtio-pci by default for mach-virt guests
• PCIe placement
• virtio-gpu
• Auto GIC version selection
• Features for free (works like x86)
• vPMU enablement
• PCIe device assignment
• Migration for GICv3/ITS
10. 10
PCIe placement
• PCIe-only (no legacy PCI)
• Complies with QEMU docs/pcie.txt
• Root bus (pcie.0) and PCIe root ports at top
• ioh3420 → generic root port
• Flat hierarchy preferred (but PCIe switches are available)
• Root ports or switch downstream ports necessary for hotplug
PCIe root port #0
pcie.0
PCIe root port #N
Downstream Port
Upstream Port
Downstream Port
PCIe Dev
PCIe Dev
13. 13
Migration
• GICv3 migration support
• Minimum requirements: kernel 4.11, libvirt 3.x
• QEMU: patches posted for 2.9
• ITS migration support
• Patches posted
• Hosts need identical hardware
• Hosts do not need identical QEMU versions
• mach-virt is versioned
14. 14
Migration with libvirt
• Tested with virsh and virt-manager
• Used libvirt managed shared storage pool
• virsh save / virsh restore
• virsh migrate
16. 16
avocado / avocado-vt
• avocado is a test framework inspired by autotest
• Supports plugins
• avocado-vt is a plugin supporting QEMU/KVM/libvirt tests
• Can drive QEMU or libvirt / virt-tools
• Ported to AArch64
• Teaching it defaults that match AArch64 enterprise guest setups
• Has thousands of test cases: functional and performance
• E.g. guest install, boot, migrate
• Not all tests applicable to a given target
• Most libvirt based tests just work on AArch64
• Tests can be external testsuites (kvm-unit-tests)
18. 18
Summary
• QEMU/KVM enterprise guests
have complicated setups
• Many useful tools have been
built on libvirt
• Automated virt stack
verification can target libvirt
• Automated virt stack
verification can benefit from
libvirt
libvirt provides common and
stable APIs
Most libvirt-based tools just
work when ported to
AArch64
avocado-vt
avocado-vt
19. 19
References
• Libvirt and virt-tools
• https://libvirt.org
• https://www.virt-tools.org
• avocado-vt and kvm-unit-tests:
• https://avocado-vt.readthedocs.io/en/latest/Introduction.html
• https://www.linux-kvm.org/page/KVM-unit-tests
21. 21
kvm-unit-tests
• Simple guest kernel as a unit test
• Currently has support and tests for KVM’s emulation of
• gicv2/v3
• PMU
• PSCI
• Exits for QEMU PCI emulation
• WIP: gicv3 ITS
• WIP: nested virt
• WIP: instruction emulation regression tests
• Gaining contributors
• Contribute now and get a free baseball cap (no, not really...)