[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] qemu-system-arm command line question
From: |
Gabriel L. Somlo |
Subject: |
[Qemu-devel] qemu-system-arm command line question |
Date: |
Fri, 2 Oct 2015 14:15:20 -0400 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hi Rich,
On Tue, Jul 14, 2015 at 07:48:30PM +0100, Richard W.M. Jones wrote:
> On Tue, Jul 14, 2015 at 02:23:14PM -0400, Gabriel L. Somlo wrote:
> > On Tue, Jul 14, 2015 at 10:43:46AM +0100, Richard W.M. Jones wrote:
> > > On Mon, Jul 13, 2015 at 04:09:37PM -0400, Gabriel L. Somlo wrote:
> > > > 3. I'm currently only handling x86 and I/O ports. I could drop the
> > > > fw_cfg_dmi_whitelist and just check the signature, using mmio where
> > > > appropriate, but I don't have a handy-dandy set of VMs for those
> > > > architectures on which I could test. Wondering if that's something
> > > > we should have before I officially try to submit this to the kernel,
> > > > or whether it could wait for a second iteration.
> > >
> > > $ virt-builder --arch armv7l fedora-22
> > > or:
> > > $ virt-builder --arch aarch64 fedora-22
> > > then:
> > > $ virt-builder --get-kernel fedora-22.img
> > >
> > > and then boot is using the right qemu command, probably something
> > > like:
> > >
> > > $ qemu-system-arm \
> > > -M virt,accel=tcg \
> > > -cpu cortex-a15 \
> > > -kernel vmlinuz-4.0.4-301.fc22.armv7hl+lpae \
> > > -initrd initramfs-4.0.4-301.fc22.armv7hl+lpae.img \
> > > -append "console=ttyAMA0 root=/dev/vda3 ro" \
> > > -drive file=fedora-22.img,if=none,id=hd \
> > > -device virtio-blk-device,drive=hd \
> > > -serial stdio
> > >
> > > The root password is printed in virt-builder output.
> >
> > Thanks, that should help (once I figure out how to *really* start it,
> > right now it hangs at "reached target basic system", and spews garbage
> > if I hit 'escape', probably in an attempt to paint the text-mode
> > progress bar... Then it throws me into a dracut prompt, complaining
> > that it can't find /dev/vda3...
> >
> > But I'm sure I'll sort it out eventually :)
>
> That error, as I guess you know, indicates that the disk image is not
> being presented as virtio-blk to the guest. I know for sure (because
> I tested the command line above earlier) that the armv7l guest can see
> virtio-blk. I didn't test the aarch64 guest.
Eventually, I got 32-bit arm working like this:
bin/qemu-system-arm -M virt,accel=tcg -m 1024 -cpu cortex-a15 \
-kernel ./vmlinuz-4.0.4-301.fc22.armv7hl+lpae \
-initrd ./initramfs-4.0.4-301.fc22.armv7hl+lpae.img \
-append "console=ttyAMA0 root=/dev/vda3 ro" \
-device virtio-blk-device,drive=hd0 \
-drive id=hd0,if=none,snapshot=on,file=./fedora-22.armv7hl+lpae.img \
-device virtio-net-device,netdev=usernet \
-netdev user,id=usernet \
-monitor stdio
But now I need to tinker with aarch64, so I went back to your original
instructions and did the following:
LIBGUESTFS_BACKEND=direct virt-builder --arch aarch64 fedora-22
LIBGUESTFS_BACKEND=direct virt-builder --get-kernel fedora-22.img
mv fedora-22.img fedora-22.aarch64.img
Trying to adapt the command line used with 32-bit arm, I ran:
bin/qemu-system-aarch64 -M virt,accel=tcg -m 2048 -cpu cortex-a57 \
-kernel ./vmlinuz-4.0.4-301.fc22.aarch64 \
-initrd ./initramfs-4.0.4-301.fc22.aarch64.img \
-append "console=ttyAMA0 root=/dev/vda3 ro" \
-device virtio-blk-device,drive=hd0 \
-drive id=hd0,if=none,snapshot=on,file=./fedora-22.aarch64.img \
-device virtio-net-device,netdev=usernet \
-netdev user,id=usernet \
-monitor stdio
and now I'm back to the guest dumping me into a dracut prompt after
complaining about "/dev/vda3 does not exist".
I tried guestfish at Laszlo's suggestion, and
guestfish --ro -i -a ./fedora-22.aarch64.img
gives me the following:
/dev/sda4 mounted on /
/dev/sda2 mounted on /boot
/dev/sda1 mounted on /boot/efi
I then tried to modify the command line above to use:
--append "console=ttyAMA0 root=/dev/vda4 ro"
--append "console=ttyAMA0 root=/dev/sda4 ro"
with no luck whatsoever.
Your original advice seemed to hint at the possibility of an issue
with using "virtio-blk-device" on aarch64, so I'm wondering what
else I could try, and, more interestingly, what the process of
determining that might be, starting with just being handed a
"fedora-22.img" file by virt-builder...
Digging through /etc/grub2-efi.cfg with guestfish, I found the menu
entry for Fedora, and it looks like this:
...
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2
--hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2
578e2ae7-957d-449a-930f-94478154137f
else
search --no-floppy --fs-uuid --set=root
578e2ae7-957d-449a-930f-94478154137f
fi
linux /vmlinuz-4.0.4-301.fc22.aarch64
root=UUID=629b6e0b-aaea-475a-b383-4beca36425c4 ro no_timer_check
earlyprintk=pl011,0x9000000 ignore_loglevel rd_NO_PLYMOUTH console=ttyAMA0
printk.time=1 LANG=en_US.UTF-8
...
So I tried
-append "console=ttyAMA0 root=/dev/sda4 ro"
-device ahci,id=ide \
-device ide-drive,bus=ide.0,drive=hd0 \
-drive id=hd0,if=none,snapshot=on,file=./fedora-22.aarch64.img \
and still nothing, same "/dev/sda4 does not exist"...
There are no /dev/vda* or /dev/sda* devices (ls /dev/ from the dracut
prompt), and cat /proc/partitions comes up empty as well...
At this point I'm totally out of clue, please help :)
Thanks a ton,
--Gabriel
- [Qemu-devel] qemu-system-arm command line question,
Gabriel L. Somlo <=