Using tcg, qemu virtual machine opens in qemu mode. And the boot command doesn't respond to it

This is what it looks like:

Now those commands are typed in manually while the hcl script is running.

This is not what I’m used to with KVM.
I need to use TCG, because the distro type I want to use has become ARM-only.

I’m at a loss on what to do.

Hey there,

Qemu has several ways to interact with it, you’re looking at the monitor, which is a way to interact with the emulator directly, not with the guest OS.

You can disable that through the -monitor none argument to qemu. In Packer there isn’t a specific setting for this, but you can specify it in the qemuargs settings, like so (in HCL2):

qemuargs = [
  ["-monitor", "none"],
]

Alternatively, you can select which output you’re viewing in the qemu interface, one of those will let you see the installation process.

Hopefully this’ll help!

1 Like

Not really, now it’s just an empty shell.

But I’ve also found that starting the creating the VM with TCG aarch64 virt manually throws me into the UEFI shell:

Hi there @safenetwork-CMTY,

Judging by your latest screencap, looks like your VM boots with KVM, not TCG?
Is your host on a ARM CPU, or is it possible that this screencap shows a virtualised x86_64 guest?

As for the empty shell, I’m not sure I can help you, I know I’ve been in this situation before, and I did fix it by double-checking the output I’m currently on, it’s very possible you’re looking at the VGA or Monitor output, and the installation might happen on the Serial port.

IIRC that’s something you can choose at runtime, I guess that would be in the View menu? There’s a radiobutton in there for choosing which output to look at.

Also, depending on the context, there might be some error/warning messages output in the shell by qemu, which is not always visible while running packer, so I’d advise testing the command with the environment variable PACKER_LOG set to 1. That way you’ll see some more diags when trying to run the template.

I have no idea why it says QEMU/KVM on the top bar.
I think that’s a minor display bug, because in properties, it clearly states that I’m using QEMU TCG.

I think the bigger issue is that I’ve been able to mount both partitions of the image and neither contain vmlinuz or initrd.img.

Instead I have Image, initramfs-linux.img, extlinux/extlinux.conf and a dtbs folder full of dtb files for the boot partition.

[edit]

I’m giving up. This is getting too complicated for me.
I think I’ll quit going the ARM route for now and choose Manjaro-Sway in the mean time if I’m gonna go minimal.