0

I've followed the blog post and create an aarch64 vm with alpine 3.14 (virt) (with minor changes as the post is for linux and i'm on mac):

qemu-img create -f raw asvm-arm64-hd.img 2G
qemu-system-aarch64 -nographic -machine virt -m 512M -cpu cortex-a57 -smp 4 -drive file=asvm-arm64-hd.img,if=none,id=drive0,cache=writeback,format=raw -device virtio-blk,drive=drive0,bootindex=0 -drive file=~/Downloads/alpine-virt-3.14.2-aarch64.iso,if=none,id=drive1,cache=writeback,format=raw -device virtio-blk,drive=drive1,bootindex=1 -drive file=flash0.img,format=raw,if=pflash -drive file=flash1.img,format=raw,if=pflash -device vmxnet3,netdev=net0 -netdev user,id=net0,hostfwd=tcp::2222-:22
(reboot)
qemu-img convert -f raw -O qcow2 asvm-arm64-hd.img asvm-arm64-hd.qcow2
qemu-system-aarch64 -nographic -machine virt -m 512M -cpu cortex-a57 -smp 4 -drive file=asvm-arm64-hd.qcow2,if=none,id=drive0,cache=writeback,format=qcow2 -device virtio-blk,drive=drive0,bootindex=0 -drive file=flash0.img,format=raw,if=pflash -drive file=flash1.img,format=raw,if=pflash -device vmxnet3,netdev=net0 -netdev user,id=net0,hostfwd=tcp::2222-:22,hostfwd=tcp::50051-:50051 -monitor tcp::5555,telnet,server,nowait

It works as expected on my dev machine (mac).

However when installed in android-vshell i'm getting "combined size of system firmware exceeds 8388608 bytes" error message.

Here is the android cmd (used in runtime):

processArgs = Arrays.asList(
      "vShell",
      "-L", runtimeDataPath,
      "-m", "512", // 512Mb RAM
      "-accel", "tcg,tb-size=64",
      "-nographic",
      "-parallel", "none",
      "-chardev", "stdio,id=serial0,mux=off,signal=off",
      "-serial", "chardev:serial0",
      "-boot", "c,menu=on",
      "-nodefaults",
      "-cpu", "max",

      // network
      "-nic", "user",

      "-netdev", "user,id=vmnic0,hostfwd=tcp::2222-:22",
      "-device", "virtio-net-pci,netdev=vmnic0,id=virtio-net-pci0",

      // disk

      // shared dirs:
      // ...

      "-monitor", "tcp::" + monitorPort + ",telnet,server,nowait"

      , "-drive", "file=" + runtimeDataPath + "/disk-0.qcow2,if=none,id=drive0,cache=writeback,format=qcow2"
      , "-device", "virtio-blk,drive=drive0,bootindex=0"
      , "-drive", "file=" + runtimeDataPath + "/flash0.img,format=raw,if=pflash"
      , "-drive", "file=" + runtimeDataPath + "/flash1.img,format=raw,if=pflash"
  );

Obviously the asvm-arm64-hd.qcow2 is renamed to disk-0.qcow2, the paths are ok.

flash0.img and flash1.img are indeed larger than 8Mb (they are exactly 64Mb).

Is it android-vshell (qemu) issue or smth wrong with my vm?

I can see some patches applied in android-vshell, is anything missing (that could help to fix the issue)?

PS. I was able to run "x86-64" vm with android-vshell, so i guess it's working in general, but smth is wrong in "aarch64" case.

PPS. It seems that somehow qemu thinks it's not aarch64 vm but probably i386 (with smaller max_fw_size)

4ntoine
  • 19,816
  • 21
  • 96
  • 220

1 Answers1

0

The author of android-vshell was really fast to react (kudos)! android-vshell's qemu is indeed compiled for x86-64 only, requires recompilation (for according target arch)

4ntoine
  • 19,816
  • 21
  • 96
  • 220