quickemu icon indicating copy to clipboard operation
quickemu copied to clipboard

Non-zero return value

Open sgon00 opened this issue 1 year ago • 4 comments

I am not really using quickemu and just trying it. I am trying to run a simplest linux. The VM can be ran successfully, but the command returns 1 with error instead of 0. I have no ideas what's going on because there is no erorr message at all.

Expected behaviour

quickemu --vm alpine-3.15.conf returns 0 to indicate the command is returned successfully OR if it fails, it should print out proper error message to tell user what the error is.

Actual behaviour

quickemu --vm alpine-3.15.conf returns 1 instead. It means the command failed to execute, but the guest OS is actually working.

Steps to reproduce the behaviour

quickemu --vm alpine-3.15.conf

Quickemu output

$ quickemu --vm alpine-3.15.conf 
Quickemu 4.0 using /usr/bin/qemu-system-x86_64 v6.2.0
 - Host:     Debian GNU/Linux 11 (bullseye) running Linux 5.17 (host1)
 - CPU:      AMD Ryzen 7 4800U with Radeon Graphics
 - CPU VM:   1 Socket(s), 4 Core(s), 2 Thread(s), 4G RAM
 - BOOT:     EFI (Linux), OVMF (/usr/share/OVMF/OVMF_CODE_4M.fd), SecureBoot (off).
 - Disk:     alpine-3.15/disk.qcow2 (16G)
             Looks unused, booting from alpine-3.15/alpine-virt-3.15.4-x86_64.iso
 - Boot ISO: alpine-3.15/alpine-virt-3.15.4-x86_64.iso
 - Display:  SDL, virtio-vga, GL (on), VirGL (on)
 - ssh:      On host:  ssh user@localhost -p 22220
 - SPICE:    On host:  spicy --title "alpine-3.15" --port 5930 --spice-shared-dir /home/myuser/Public
 - WebDAV:   On guest: dav://localhost:9843/
 - 9P:       On guest: sudo mount -t 9p -o trans=virtio,version=9p2000.L,msize=104857600 Public-myuser ~/Public
 - smbd:     On guest: smb://10.0.2.4/qemu
 - Monitor:  On host:  nc -U "alpine-3.15/alpine-3.15-monitor.socket"
             or     :  socat -,echo=0,icanon=0 unix-connect:alpine-3.15/alpine-3.15-monitor.socket
 - Serial:   On host:  nc -U "alpine-3.15/alpine-3.15-serial.socket"
             or     :  socat -,echo=0,icanon=0 unix-connect:alpine-3.15/alpine-3.15-serial.socket
 - Process:  Starting alpine-3.15.conf as alpine-3.15 (102579)
---

(err)$ echo $?
1

Linux Distribution & Kernel

Run the following and paste the output.

$ lsb_release --all
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye

$ uname -a
Linux host1 5.17.0-3mx-amd64 #1 SMP PREEMPT Debian 5.17.11-1~mx21+1 (2022-06-14) x86_64 GNU/Linux

sgon00 avatar Aug 12 '22 08:08 sgon00

How strange.

Everywhere in quickemu where exit 1 is called has a clear error message preceding it. So, I do not think it is quickemu setting the return value to 1, but qemu itself. However, I do not know what would be causing qemu to successfully start the VM yet return an exit status of 1.

flexiondotorg avatar Aug 18 '22 10:08 flexiondotorg

@flexiondotorg thanks a lot for the reply. I am not sure how to debug qemu. I can see the popup screen shows the text Guest has not initialized the display (yet). for 1 second, then the OS starts. I am not sure if the error has anything to do with this message or not. Just FYI.

Some unrelated backgrounds: I am not really using quickemu, so I haven't paid too much attention on this issue. I tried to install MacOS with quickemu, but failed. That's why I installed quickemu at the beginning.

sgon00 avatar Aug 30 '22 09:08 sgon00

I have the same result. The VM still seems to start fine, and debugging show that the script execute up to the end (if it say something like ' - Process: Starting kolibrios-latest.conf as kolibrios-latest (56960)', it means it ran up to the end of setting up the VM. The next part is starting the viewer if necessary, which run with no problem too, and the script run up to the end (and KolibriOS indeed seems to work fine).

On the NixOS package in case that’s relevant

marius851000 avatar Apr 27 '23 17:04 marius851000

I am also having this issue. The vm starts fine but then quickemu stops with a exit code of 1

BCNelson avatar Aug 12 '23 20:08 BCNelson