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

Moving, Deleting and Cloning a VM doesn't work correctly #5147

Closed
Korne127 opened this issue Mar 26, 2023 · 8 comments
Closed

Moving, Deleting and Cloning a VM doesn't work correctly #5147

Korne127 opened this issue Mar 26, 2023 · 8 comments
Milestone

Comments

@Korne127
Copy link

Korne127 commented Mar 26, 2023

Describe the issue
When you right click on a VM and select "Move" to move the VM, a confirmation screen appears as expected. If you confirm to move, a file manager window should open to select where to move the VM to.
But instead, the confirmation screen opens a second time. If you confirm again, it closes and nothing happens. Only if you then click to run the VM, the file manager window opens and you can select where to move the VM to.
The moving works if you do this, but this window should just open directly after confirming to move the VM.

Here is a video showing the bug:

UTM.Move.VM.Bug.mp4

Configuration

  • UTM Version: 4.1.6 (75)
  • macOS Version: 11.5.2
  • Mac Chip: Apple Silicon (M1)

No crash log or debug log since the app didn't crash and the issue isn't related to running a VM.

@osy
Copy link
Contributor

osy commented Apr 15, 2023

Can you try the latest v4.2.x beta? The move functionality has been re-worked.

@Korne127
Copy link
Author

Thanks for the answer! I tried the new beta version (4.2.2), and it was actually a bit weird.
The first time I tried it, it actually worked; I clicked Move and the popup opened correctly. I wanted to record this to show it and I noticed that Move wasn't an option for the VM I already moved; it only appears for the VMs you haven't moved before, which is strange.
Because of that, I created a new VM with the same name and wanted to record it. But then (still with version 4.2.2) the same old bug happened that the confirmation screen opened two times and nothing happens when confirming in each, but just after you click the Run button.
I don't really know what caused this behaviour to change. Maybe because I've named the second VM the same name as the first VM (or used the same image)? I'm not sure if I ran the first VM before trying to move it (and I didn't do this with the second one), but otherwise, I don't really know differences.
I tried to reproduce the first behaviour, but I couldn't, even after restarting UTM it now was always the same as it has been before. Since I tried it a lot of times, and the behaviour stayed the same in every test, I'd consider it to have not changed in the beta version.
This is how it now looked:

Moving.VM.in.UTM.4.2.2.mp4

Furthermore, I have tried the other options in the same right-click menu and I've noticed that the same bug seems to be implemented in other options as well (the behaviours I'll describe now are identical in the stable version 4.1.6 and beta version 4.2.2).
When using the Clone function, the confirmation screens opens twice as well, each cloning the VM:

Cloning.VM.in.UTM.4.2.2.mp4

(You can see a different graphical bug in this video that the lower elements aren't displayed correctly after cloning; sometimes the same also happened with the last element when creating a new VM, but this isn't related to this issue and only happened in the 4.2.2 beta version and not in the 4.1.6 version.)

And also when using the Delete function, the confirmation screens opens twice, each trying to delete it (after I pressed confirm the second time, an error message, saying that the VM couldn't be deleted (since it doesn't exist anymore), opens):

Deleting.VM.in.UTM.4.2.2.mp4

(I also noticed that the Delete button is weirdly the only German element in the menu while everything else is in English, and depending on whether it has been moved it even has two different translations: Löschen for non-moved and Entfernen for moved VMs.)

Since it seems to be the same underlying bug implemented in these different options, should I rename my issue to also explicitly include those?

Every other function works correctly though and doesn't open two screens. Funny enough, that includes the Share function (although it also opens a file system window):

Sharing.VM.in.UTM.4.2.2.mp4

@Korne127 Korne127 changed the title Moving a VM doesn't work correctly Moving, Deleting and Cloning a VM doesn't work correctly Jul 14, 2023
@KillzTheSpy2
Copy link

KillzTheSpy2 commented Jul 19, 2023

i have this issue too, but when moving it, it just has a loading icon infinitely, and when i do restart it, it cloned the vm into the directory it was supposed to move it to, and when trying to start it, i get an error:
QEMU exited from an error: qemu-aarch64-softmmu: -drive if=pflash,unit=1,file=/Volumes/externaldrive/asdfghjkl/Kali Linux.utm/Data/efi_vars.fd: Could not open '/Volumes/externaldrive/asdfghjkl/Kali Linux.utm/Data/efi_vars.fd': No such file or directory and i don't know what to do

@osy
Copy link
Contributor

osy commented Jul 19, 2023

@KillzTheSpy2 did you try on 4.3.2 beta?

@KillzTheSpy2
Copy link

im downloading it rn

@KillzTheSpy2
Copy link

@KillzTheSpy2 did you try on 4.3.2 beta?

i just did, same issue

@KillzTheSpy2
Copy link

when i go to move it, it becomes unresponsive and i have to force quit it

@osy osy added this to the v4.3 milestone Jul 19, 2023
@osy
Copy link
Contributor

osy commented Jul 31, 2023

There's a number of issues with SwiftUI on macOS 11 which has been fixed in macOS 12. We have workarounds for many such issues but certain things like double confirmation popups cannot really be fixed without significant rework. I believe the functionality still works but only if you accept one of the two confirmation (I can't remember which one). Can you see if that works for you? I think I am going to leave this as "won't fix" because it falls in the bucket of macOS 11 issues that would add complexity to the codebase in order to address. In the next major update to UTM, we're probably going to drop support for macOS 11.

@osy osy closed this as completed in c5bbf2e Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants