utmapp / UTM

Virtual machines for iOS and macOS
https://getutm.app
Apache License 2.0
26.62k stars 1.33k forks source link

Failed to save VM snapshot if VM has VirGL graphics or NVMe drives #3819

Open alexs279 opened 2 years ago

alexs279 commented 2 years ago

Describe the issue Using Mac m1 and I have the latest UTM version and have a VM of Ubuntu and VM of Windows11 On Both I cannot save VM state.

Configuration

Crash log

Debug log

I have 2 VM (Ubuntu and Windows 11) and same problems On Ubuntu Screen Shot 2022-03-25 at 1 28 08 PM

On Windows Screen Shot 2022-03-25 at 1 28 41 PM

adespoton commented 2 years ago

It looks like the issue is that you're using virtual devices that don't support save states. For the first, you'll need to change your display from VirGL to VGA or similar, so that the device can be properly paused and its state snapshotted. VirGL is a passthrough virtual device, so it can't be paused to snapshot the contents.

Similarly, for the second, you're using a virtual NVME drive, and QEMU's snapshotting system doesn't appear to currently support that device type: switch from NVME to IDE/ATA device, and snapshots should work.

Should UTM be disabling the snapshot feature in the UI when virtual devices that don't support snapshotting are enabled? Should there be a warning when you enable a device that doesn't support snapshotting?

Personally, I'd like to see a per-VM setting for switching between snapshotting and a simple pause/resume function. Then it would be as simple as putting up an alert when you attempt to enable snapshotting that your current configuration doesn't support snapshotting, and leaving it disabled.

Some other devices that don't support snapshots are the entirety of the Apple virtualizer (for 12.x+ on 12.x+ -- hopefully this will be rectified after this year's WWDC) the Screamer audio device on PPC and the ROM device on m68k (this last one will hopefully change by QEMU v8).

coolbikerdad commented 2 years ago

I see this issue too, with Debian Linux 10.3. While I can install on to emulated SCSI disks, none of the non-virtual display options (VGA, ati-vga, standalone ram framebuffer, etc) the VM to start or at leats get to the UTM logo. So, stuck for suspend functionality, which is a shame.

alexs279 commented 2 years ago

It looks like the issue is that you're using virtual devices that don't support save states. For the first, you'll need to change your display from VirGL to VGA or similar, so that the device can be properly paused and its state snapshotted. VirGL is a passthrough virtual device, so it can't be paused to snapshot the contents.

Similarly, for the second, you're using a virtual NVME drive, and QEMU's snapshotting system doesn't appear to currently support that device type: switch from NVME to IDE/ATA device, and snapshots should work.

Should UTM be disabling the snapshot feature in the UI when virtual devices that don't support snapshotting are enabled? Should there be a warning when you enable a device that doesn't support snapshotting?

Personally, I'd like to see a per-VM setting for switching between snapshotting and a simple pause/resume function. Then it would be as simple as putting up an alert when you attempt to enable snapshotting that your current configuration doesn't support snapshotting, and leaving it disabled.

Some other devices that don't support snapshots are the entirety of the Apple virtualizer (for 12.x+ on 12.x+ -- hopefully this will be rectified after this year's WWDC) the Screamer audio device on PPC and the ROM device on m68k (this last one will hopefully change by QEMU v8).

Thanks for feedback.

1st one (ubuntu) I tried VGA and the screen is blank.. Cannot see anything but when trying to save state I still get error " image

2nd one (Windows) wont start with IDE/ATA image

Licanueto commented 10 months ago

Did anyone find a solution for this issue?

initstring commented 3 days ago

This is an old issue, but if anyone else ends up here after a search - this is what worked for me to have working suspend for both Linux and Windows VMs running on Apple Silicon:

Debian 12:

Windows 11:

UTM Details:

For Windows machines, it's important to edit the hardware settings before installing Windows to choose the drive interface - otherwise, the boot device won't be found if you change it after installing.