UTM icon indicating copy to clipboard operation
UTM copied to clipboard

VM goes to black screen, won't boot back to gui

Open m-c-g opened this issue 2 years ago • 5 comments

Describe the issue Running Debian XFCE, full screen. After the screen blanker engages, VM comes back up with a black screen. After stopping VM and trying to reboot, the reboot is very slow and does not bring up GUI, but allows booting to console.

Configuration

  • UTM Version: 3.1.5 (53)
  • OS Version: Monterey
  • Intel or Apple Silicon? Macbook Air M1 Crash log None found

Debug log I will include this if I can reproduce the problem

Pasting the plist Upload VM

ConfigurationVersion 2 Debug DebugLog Display ConsoleBackgroundColor #000000 ConsoleFont Menlo-Regular ConsoleFontSize 12 ConsoleTextColor #ffffff ConsoleTheme Default DisplayCard virtio-ramfb DisplayDownscaler linear DisplayFitScreen DisplayUpscaler linear Drives DriveName drive0 ImagePath debian.qcow2 ImageType disk InterfaceType virtio DriveName drive1 ImageType cd InterfaceType usb Removable DriveName drive65D97745-8EB3-4EAB-91A2-9F5E2E9C2AA6 ImagePath efi_vars.fd ImageType none InterfaceType Info Icon debian IconCustom Notes Default user/pass: debian/debian Root user/pass: root/password Input InputLegacy Networking NetworkCard rtl8139 NetworkCardMAC 5A:1F:39:02:1C:01 NetworkMode emulated Printing Sharing ClipboardSharing DirectoryName DirectorySharing Usb3Support UsbRedirectMax 3 Sound SoundCard intel-hda SoundEnabled System Architecture aarch64 BootDevice BootUefi CPU default CPUCount 0 ForceMulticore ForcePS2Controller JITCacheSize 0 MachineProperties highmem=off Memory 1024 RTCUseLocalTime RngEnabled SystemUUID 8169C503-2646-4317-BE65-7F931B70884F Target virt UseHypervisor

m-c-g avatar Mar 31 '22 21:03 m-c-g

When force-closing the VM, the hard disk file may have become corrupted. As far as I know this can be seen by ending up with filesystem errors shown when booting in console mode. Can you see such errors?

conath avatar Apr 05 '22 22:04 conath

Is there any reasonable safeguards that could be added to UTM to prevent the corruption of the disk file?

E.g. perhaps UTM could send the ACPI shutdown signal to the guest, so that the guest can shutdown gracefully?

cpach avatar Apr 06 '22 04:04 cpach

@cpach I like that idea! Is there a QEMU Monitor command for that?

It seems like #3842 is a similar if not the same issue.

conath avatar Apr 06 '22 08:04 conath

I like that idea! Is there a QEMU Monitor command for that?

I think so, but I’m not 100% sure.

In the QEMU documentation there is a reference to something called system_powerdown.

Maybe that is what we’re looking for?

cpach avatar Apr 19 '22 13:04 cpach

@cpach indeed, found an example in Canonical Multipass https://github.com/canonical/multipass/blob/9c51de654ea4ff4ca668a3b9852f5e2f89821130/src/platform/backends/qemu/qemu_virtual_machine.cpp

@osy I think we should offer choice of graceful or forced shutdown (using above QMP API) to fix this issue. It remains to be seen if this works for all guest systems.

conath avatar May 02 '22 12:05 conath

Closing this as the ACPI shutdown option was added and the corruption issue unfortunately cannot be fixed.

osy avatar Nov 26 '22 08:11 osy