Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apple backend disk images can be accidentally removed when reordering them #4105

Closed
kFYatek opened this issue Jun 8, 2022 · 1 comment
Closed
Labels
bug Something isn't working macOS macOS issues
Milestone

Comments

@kFYatek
Copy link

kFYatek commented Jun 8, 2022

Describe the issue
This is a very nasty bug in the UI for the Apple backend on Apple Silicon. I actually nuked a couple of my VMs (thankfully, unimportant ones) by performing the following steps:

  1. Create an Apple backend VM, either for macOS or Linux

  2. Install the guest OS for more drama ;) - the bug will still happen without it, though

  3. Open the VM settings dialog

  4. Click "New Drive" and create a new drive

  5. Without closing the VM settings dialog, reorder the disk images so that the newly created drive ends up in the topmost position (either by dragging or using the Move Up / Move Down buttons)

    Note: if you close the VM settings dialog after creating the drive, then reopen it and do the reordering maneuver, everything will work fine. The bug only happens if you create and reorder the drive in the same go.

  6. Observe how the new drive has been saved as disk0.img within the VM bundle, overwriting the existing root drive. Moreover, config.plist will now refer to the same image twice, making the VM configuration invalid. Now you can't start the VM, it'll fail with the "Invalid virtual machine configuration. A storage device configuration is invalid." message if you try. You can't even remove the invalid drives from the UI. And the data from your original root drive is gone.

This is especially annoying as this disk reordering maneuver is part of the hack to boot into macOS recovery. See also #3526.

Configuration

  • UTM Version: 3.2.4 (58)
  • OS Version: macOS 12.4
  • Apple Silicon
@osy osy added this to the v3.3 milestone Jun 8, 2022
@osy osy added the bug Something isn't working label Jun 8, 2022
@conath conath added the macOS macOS issues label Jun 12, 2022
@osy
Copy link
Contributor

osy commented Aug 5, 2022

This should be fixed in v4.0 as part of the configuration backend rewrite.

@osy osy closed this as completed Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macOS macOS issues
Projects
None yet
Development

No branches or pull requests

3 participants