qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [AARCH64]How to provide ssh key to QEMU


From: Nitin Saxena
Subject: [Qemu-devel] [AARCH64]How to provide ssh key to QEMU
Date: Wed, 31 Jan 2018 23:09:57 +0530

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 via email to

[Prev in Thread] Current Thread [Next in Thread]