qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Nitin Saxena <nitin.lnx@gmail.com>
To: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [AARCH64]How to provide ssh key to QEMU
Date: Wed, 31 Jan 2018 23:09:57 +0530	[thread overview]
Message-ID: <CAB995MuXpvBiiZHHNaBSHxPr1HiqFKmLfnaL2NedF69DtgfaQA@mail.gmail.com> (raw)

Hi,

I am able to successfully launch xenial-server-cloudimg-arm64-uefi1.img
(cloud image) using following command

================
qemu-system-aarch64 \
    -smp 2 \
    -m 1024 \
    -M virt \
    -cpu cortex-a57 \
    -bios QEMU_EFI.fd \
    -nographic \
    -device virtio-blk-device,drive=image \
    -drive
if=none,id=image,file=ubuntu-16.04-server-cloudimg-arm64-uefi1.img \
    -device virtio-blk-device,drive=cloud \
    -drive if=none,id=cloud,file=cloud.img \
    -device virtio-net-device,netdev=user0 \
    -netdev user,id=user0 \
    -redir tcp:2222::22
====================


I want to use combination of -kernel argument (instead of -bios and UEFI
image). I did this with ext4 xenial image provided by ubuntu.

=================
qemu-system-aarch64 -enable-kvm -m 512 -smp 4 -cpu host \
    -M virt,gic_version=3 -nographic \
    -kernel boot/vmlinuz-4.4.0-112-generic --append "console=ttyAMA0
root=/dev/vda rw"  \
    -drive file=xenial-server-cloudimg-arm64.img,if=virtio,aio=threads \
    -netdev user,id=user0 -device virtio-net,netdev=user0 \
    -redir tcp:2222::22
====================

Using above command VM launches successfully and login prompt comes. The
only problem is I haven't provided ssh key through -drive=cloud hence I am
not able to login above VM launch. So I tried with following qemu command

==================
qemu-system-aarch64 -enable-kvm -m 512 -smp 4 -cpu host \
    -M virt,gic_version=3 -nographic \
    -kernel boot/vmlinuz-4.4.0-112-generic --append "console=ttyAMA0
root=/dev/vda rw"  \
    -drive file=xenial-server-cloudimg-arm64.img,if=virtio,aio=threads \
    -device virtio-blk-device,drive=cloud \
    -drive if=none,id=cloud,file=cloud.img \
    -netdev user,id=user0 -device virtio-net,netdev=user0 \
    -redir tcp:2222::22
==================

Addition of highlighted command crashes VM. Can somebody help about what I
am doing wrong here? I find hard in searching internet who has tried
launching VM this way instead of using UEFI image.

Thanks,
Nitin

                 reply	other threads:[~2018-01-31 17:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAB995MuXpvBiiZHHNaBSHxPr1HiqFKmLfnaL2NedF69DtgfaQA@mail.gmail.com \
    --to=nitin.lnx@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).