[Bug 989462] New: Virt-Manager Unable to Create VM
http://bugzilla.suse.com/show_bug.cgi?id=989462 Bug ID: 989462 Summary: Virt-Manager Unable to Create VM Classification: openSUSE Product: openSUSE Distribution Version: Leap 42.1 Hardware: aarch64 OS: openSUSE 42.1 Status: NEW Severity: Normal Priority: P5 - None Component: Virtualization:Tools Assignee: virt-bugs@suse.de Reporter: alan@softiron.co.uk QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- I've had some trouble creating VM's with virt-manager and have identified what I think is the problem. I am able to work around it, but it requires editing the VM xml description manually with "virsh edit". The basic problem is that if you create a VM with virt-manager, it will not get the firmware line correct. What I think it's trying to generate (because I can't really verify it, because it fails) is: <os> <type arch='aarch64' machine='virt'>hvm</type> <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> ... <boot dev='hd'/> </os> Note the use of "pflash" as the type. Indeed this is what the libvirt documentation says to do: https://libvirt.org/formatdomain.html#elementsOSBIOS "For instance, if the loader path points to an UEFI image, type should be pflash." However, if pflash is used here, starting the VM will fail with: "virt-manager Initialization of device cfi.pflash01 failed: failed to read the initial flash content" If the type is changed to "rom" (manually), the VM boots up as expected. Steps to reproduce: # Install prerequisites: zypper install virsh virt-install vm-install ca-certificates libvirt-daemon-driver-qemu qemu qemu-tools # Download the firmware Image: wget http://snapshots.linaro.org/components/kernel/leg-virt-tianocore-edk2-upstre... # Install the firmware image and space for the variables: mkdir /usr/share/AAVMF cp QEMU_EFI.fd /usr/share/AAVMF/AAVMF_CODE.fd dd if=/dev/zero of=/usr/share/AAVMF/AAVMF_VARS.fd bs=16M count=1 # Download the OS Image wget http://download.opensuse.org/ports/aarch64/distribution/leap/42.1/appliances... # Convert the OS Image to qcow2 format for VM use: unxz openSUSE-Leap42.1*.xz qemu-img convert -f raw -O qcow2 openSUSE-Leap42.1*.raw leap.qcow2 qemu-img resize leap.qcow2 40G # Inspect the qcow2 image (see 40G) qemu-img info leap.qcow2 # Install qcow image: cp leap.qcow2 /var/lib/libvirt/images/ # Create and start the VM with virt-manager GUI: virt-manager File->New "Create new Virtual Machine" - Step 1 of 4 Select "Import Existing Disk Image" Archetecture Options: aarch64 virt Click "Forward" "Provide the existing Storage Path:" Click "Browse" Select leap.qcow2 Click "Select Volume" Choose OS Type: "Linux" "SUSE Enterprise 12 SP1" Click "Forward" "Choose Memory and CPU settings" RAM: 2048 (less than this will fail to load initrd!) CPU: 1 Click "Forward" "Ready to begin the Installation" Enter "sles12" as the name Click Finish "Begin Installation" Window click "Begin Installation" This will fail to create a VM, complaining about inability to find pflash, as described above. Click OK which will take you back to the "Begin Installation" Window. Click "Overview" on the left Change "Firmware" to "none" Click "Apply" Click "Begin Installation" This will Create and start a VM. It will not boot. To fix this, from the VM window Select: Virtual Machine -> Shutdown -> Force Off
From the Shell: virsh edit sles12 # sles12 is the name you entered above. Under the <os> tag, add the lines: <loader readonly='yes' type='rom'>/usr/share/AAVMF/AAVMF_CODE.fd</loader> <nvram template='/usr/share/AAVMF/AAVMF_VARS.fd'>/tmp/sles12VARS.fd</nvram> Close the editor (esc :wq) From virt-manager: Select the VM Press "Open" Virtual Machine -> Run Observe the VM boot SUSE and run.
Thanks for having a look at this and sorry about the verbosity, but I think it's all necessary to describe and characterize the problem. Alan. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=989462
Matthias Brugger
http://bugzilla.suse.com/show_bug.cgi?id=989462
http://bugzilla.suse.com/show_bug.cgi?id=989462#c1
--- Comment #1 from Dirk Mueller
http://bugzilla.suse.com/show_bug.cgi?id=989462
Dirk Mueller
http://bugzilla.suse.com/show_bug.cgi?id=989462
http://bugzilla.suse.com/show_bug.cgi?id=989462#c2
Andreas Stieger
http://bugzilla.suse.com/show_bug.cgi?id=989462
http://bugzilla.suse.com/show_bug.cgi?id=989462#c3
--- Comment #3 from Alan Ott
http://bugzilla.suse.com/show_bug.cgi?id=989462
Charles Arnold
http://bugzilla.suse.com/show_bug.cgi?id=989462
http://bugzilla.suse.com/show_bug.cgi?id=989462#c4
James Fehlig
My bug is that it _can_ find the firmware (because it shows in the virt-manager GUI) but it uses the wrong
in the generated XML file. It's trying to use " ", but the only thing that seems to work is " ".
But as you already noted, the type _should_ be pflash. Perhaps there is a
problem with qemu, or the firmware blob.
FYI, you can get debug info from ovmf by adding the following to your guest XML
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
...
qemu:commandline
http://bugzilla.suse.com/show_bug.cgi?id=989462
http://bugzilla.suse.com/show_bug.cgi?id=989462#c5
--- Comment #5 from Alan Ott
-drive file=/usr/share/AAVMF/AAVMF_CODE.fd,if=pflash,format=raw,unit=0,readonly=on
While type='rom' will generate:
-bios /usr/share/AAVMF/AAVMF_CODE.fd
If you look at Linaro's UEFI for QEMU page[1], it says to use -bios on ARM, at least for the images they generate and post on their site. I feel like the libvirt documentation that says to use 'pflash' for UEFI and 'rom' for BIOS images might be x86-centric. Alan. [1]https://wiki.linaro.org/LEG/UEFIforQEMU -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=989462
http://bugzilla.suse.com/show_bug.cgi?id=989462#c6
James Fehlig
If you look at Linaro's UEFI for QEMU page[1], it says to use -bios on ARM, at least for the images they generate and post on their site.
Have you tried the images SUSE makes available? qemu-uefi-aarch64-*.noarch.rpm contains the firmwares for ARM. The repo for 42.1 can be found at http://download.opensuse.org/repositories/Virtualization/openSUSE_Leap_42.1/ -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=989462
http://bugzilla.suse.com/show_bug.cgi?id=989462#c7
--- Comment #7 from Alan Ott
Have you tried the images SUSE makes available? qemu-uefi-aarch64-*.noarch.rpm
Just tried, same result: works with 'rom', doesn't work with 'pflash'. I verified that it's using the proper firmware binary by inspecting the log. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=989462
http://bugzilla.suse.com/show_bug.cgi?id=989462#c8
James Fehlig
http://bugzilla.suse.com/show_bug.cgi?id=989462
http://bugzilla.suse.com/show_bug.cgi?id=989462#c9
Dirk Mueller
http://bugzilla.suse.com/show_bug.cgi?id=989462
http://bugzilla.suse.com/show_bug.cgi?id=989462#c11
--- Comment #11 from Gary Ching-Pang Lin
http://bugzilla.suse.com/show_bug.cgi?id=989462
http://bugzilla.suse.com/show_bug.cgi?id=989462#c12
Charles Arnold
I tested on Tumbleweed, and this command works for me:
qemu-system-aarch64 -m 1024 \ -cpu cortex-a57 \ -M virt \ -serial stdio \ -drive if=pflash,format=raw,readonly,file=/usr/share/qemu/aavmf-aarch64-code.bin \ -drive if=pflash,format=raw,file=aavmf-aarch64-vars.bin
Just submitted the newer OVMF to Leap 42.1.
Closing as fixed. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com