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

"The file couldn't be opened" when attempting to change VM settings #6639

Open
emberdex opened this issue Aug 29, 2024 · 51 comments
Open

"The file couldn't be opened" when attempting to change VM settings #6639

emberdex opened this issue Aug 29, 2024 · 51 comments

Comments

@emberdex
Copy link

Describe the issue

I noticed a few issues which might all be related:

  • When creating new VMs, I get the "file couldn't be opened" error message, and the newly-created VM doesn't show up in the list until the app is restarted.
  • When changing settings of any VM, the "file couldn't be opened" message appears when I click Save, and the settings do not take effect.
  • Clicking the Install Windows Guest Tools menu option on a running VM does nothing.

I have tried granting UTM full disk access in macOS to see if this resolves the issue, to no avail.

CleanShot 2024-08-29 at 21 09 50@2x

Configuration

  • UTM Version: 4.5.4
  • macOS Version: macOS Sequoia Developer Beta 8 (build 24A5331b)
  • Mac Chip (Intel, M1, ...): M1 (8-core GPU) - 8GB RAM

Crash log

N/A (app isn't crashing)

Debug log

N/A (I can't enable it due to the aforementioned issue)

Upload VM

N/A (applies to all VMs)

@naveenrajm7
Copy link

Hello
Can you consistently reproduce the "The file couldn't be opened" issue? if so, can you please share the steps?

I had a slightly similar issue #6398 , which was fixed in the 4.5.4 release.
(Also please check if you are using Version 4.5.4 (100) )

@emberdex
Copy link
Author

emberdex commented Aug 30, 2024

Can you consistently reproduce the "The file couldn't be opened" issue? if so, can you please share the steps?

I can consistently reproduce it:

  • Freshly install UTM (I did it both via Homebrew Cask using brew install --cask utm, and by manually dragging the .app file into /Applications, neither of which seemed to make a difference)
  • Try to create a virtual machine
  • Note that the error message appears when saving the VM, and does not appear in the list until UTM is restarted
  • Note that when trying to change the settings of the newly-created VM, whether it's running or not (e.g. trying to enable debug logging or mount an ISO to the virtual disc drive), the error appears

I had a slightly similar issue #6398, which was fixed in the 4.5.4 release.

I did see this issue, however I'm still having the problem. I didn't want to comment on a closed issue just in case it got missed by UTM maintainers.

I should note that this is the first time I've installed UTM on this particular Mac, so there should be no leftover support files from previous versions.

(Also please check if you are using Version 4.5.4 (100) )

I am indeed.

@Tangtangchannel
Copy link

Tangtangchannel commented Sep 4, 2024

I encountered the same issue. I’m using macOS Sequoia (24A5331b). Maybe UTM should be optimized and adapted for macOS Sequoia

@Tangtangchannel
Copy link

Tangtangchannel commented Sep 4, 2024

I encountered the same issue. I’m using macOS Sequoia (24A5331b). Maybe UTM should be optimized and adapted for macOS Sequoia

I hardly encountered any similar issues with UTM before updating Sequoia (upgrading from an older Beta version to a newer Beta version), but I started experiencing this problem after upgrading to a higher Sequoia Beta version

Sorry, I may have said a lot of unnecessary things, but these issues might only occur on Sequoia Beta

(UTC+8 9.5 12:56)It seems that by cleaning the ~/Library/Containers/com.utmapp.UTM.* folder, I was able to get the program running normally.

 ~/Library/Containers/com.utmapp.UTM/Data/ ls Desktop Downloads Movies Pictures tmp Documents Library Music SystemData  ~/Library/Containers/com.utmapp.UTM/Data/ ..  ~/Library/Containers/com.utmapp.UTM/ ..  ~/Library/Containers/ rm -rf com.utmapp.UTM  ~/Library/Containers/ rm -rf com.utmapp.QEMUHelper  ~/Library/Containers/

@lassestilvang
Copy link

I have the same issue on macOS Sequoia RC (24A335).

Installed UTM for the first time (with Homebrew), created a couple of macOS and Ubuntu VM's and everything was working flawlessly. Then all of a sudden I started getting the "The file couldn't be opened" when creating a new VM and even editing an existing. Not sure what triggered it.

It seems that by cleaning the ~/Library/Containers/com.utmapp.UTM.* folder, I was able to get the program running normally.

Unfortunately this didn't work for me.

I also tried uninstalling (brew uninstall --cask utm --zap) and installing again but still getting the error...

@mbert
Copy link

mbert commented Sep 18, 2024

Same issue here. Cannot assign a boot ISO image for installing an OS. Installed Sequoia yesterday and running UTM 4.5.4 (100). When trying to open an ISO from the VM's overview rather than the settings, no error message appears, but the selection is immediately reset (emptied) after having confirmed the selection.

@ddv12138
Copy link

Same issue here.

@dciancu
Copy link

dciancu commented Sep 20, 2024

Same issue macOS Sequoia 15.0 (24A335).

@marcmento
Copy link

marcmento commented Sep 23, 2024

Also getting the same issue, macOS 15.0 (24A335). Can't edit VM without getting "file couldn't be opened" message. Basically can't use my VM as I need to edit its settings to make it run

@frostydev99
Copy link

Has anyone solved this?

@robifaustmann
Copy link

I have the same issue on macOS Sequoia 15.0 and UTM 4.4.5. I keep getting the error message but the changes seem to be saved. Changing the network settings on the VM gives an error message but the changes are still saved. The error message is not affecting the function and the bug seems to be only cosmetical.

Neither updating to UTM 4.5.4 nor buying the app from the App Store helps. The update 4.5.4 doesn't remove the error message.

@dcvr2469
Copy link

Same issue with macOS Sequoia 15.0 and UTM 4.5.4. Uninstalling/reinstalling UTM = no change. Clearing the mentioned folder(s), ~/Library/Containers/com.utmapp.UTM = no change. Another problem, if it hasn't already been mentioned, immediately following the creation of a new VM, the VM does not show until closing and reopening UTM.

@scramlo
Copy link

scramlo commented Sep 30, 2024

Same issue here.

@cusspvz
Copy link

cusspvz commented Oct 1, 2024

Same, related with the disk/iso path. You can also replicate by adding an ISO removable drive. Happens on both QEMU and Apple Virtualization.

image image

@rbgarga
Copy link

rbgarga commented Oct 2, 2024

Same issue here using sequoia

@G4G4N
Copy link

G4G4N commented Oct 2, 2024

Same issue here, from when I updated to Sequoia

@ITmaze
Copy link

ITmaze commented Oct 3, 2024

It appears that #6709 is another symptom.

I wonder if the issue is a permissions one caused by Sequoia. I note errors in launchd.log which might be related:

./com.apple.xpc.launchd/launchd.log:2024-10-03 13:26:33.882914 (pid/66653 [UTM]) <Warning>: failed activation: name = com.utmapp.UTM.apple-extension-service, flags = 0x0, requestor = com.apple.appki[71850], error = 1: Operation not permitted
./com.apple.xpc.launchd/launchd.log:2024-10-03 13:38:46.837092 (pid/72135 [UTM]) <Warning>: failed activation: name = com.utmapp.UTM.apple-extension-service, flags = 0x0, requestor = com.apple.appki[72139], error = 1: Operation not permitted
./com.apple.xpc.launchd/launchd.log:2024-10-03 13:40:09.131939 (pid/72158 [UTM]) <Warning>: failed activation: name = com.utmapp.UTM.apple-extension-service, flags = 0x0, requestor = com.apple.appki[72163], error = 1: Operation not permitted
./com.apple.xpc.launchd/launchd.log:2024-10-03 13:54:19.242187 (pid/73688 [UTM]) <Warning>: failed activation: name = com.utmapp.UTM.apple-extension-service, flags = 0x0, requestor = com.apple.appki[73701], error = 1: Operation not permitted
./com.apple.xpc.launchd/launchd.log:2024-10-03 13:56:19.552343 (pid/73734 [UTM]) <Warning>: failed activation: name = com.utmapp.UTM.apple-extension-service, flags = 0x0, requestor = com.apple.appki[73740], error = 1: Operation not permitted
./com.apple.xpc.launchd/launchd.log:2024-10-03 13:57:38.779096 (pid/73756 [UTM]) <Warning>: failed activation: name = com.utmapp.UTM.apple-extension-service, flags = 0x0, requestor = com.apple.appki[73765], error = 1: Operation not permitted

I note that I attempted to move machines around and the result was that the "moved" machine became unusable.

I also created two machines with the same name, neither opened the preferences pane when I ticked the box during creation.

I was unable to point at a .ISO file in my home directory and I was unable to set the shared directory to /Users/Shared which is what I'd been using before upgrading to Sequoia.

I was unable to locate any UTM specific logging and I'm fairly sure that the issue occurs outside qemu, as-in, this is a UTM issue. Existing machines that have not been edited appear to work normally.

I also note that for a period after upgrading to Sequoia I was able to use UTM normally. It wasn't until today that it all broke. I have only rebooted after the upgrade, six days ago.

I am unable to determine if there is a "helper" process that is running asynchronously that might be causing this.

Installed via homebrew:

$ brew info utm 
==> utm: 4.5.4
https://mac.getutm.app/
Installed
/opt/homebrew/Caskroom/utm/4.5.4 (940.9MB)
  Installed using the formulae.brew.sh API on 2024-09-16 at 15:13:42
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/u/utm.rb
==> Name
UTM
==> Description
Virtual machines UI using QEMU
==> Artifacts
UTM.app (App)
/Applications/UTM.app/Contents/MacOS/utmctl (Binary)
==> Analytics
install: 3,389 (30 days), 9,243 (90 days), 35,596 (365 days)

@ITmaze
Copy link

ITmaze commented Oct 3, 2024

Also #6707

@ITmaze
Copy link

ITmaze commented Oct 3, 2024

Also #6699

@ITmaze
Copy link

ITmaze commented Oct 3, 2024

Also #6692

@ITmaze
Copy link

ITmaze commented Oct 4, 2024

I have just installed the MacOS Sequoia update to 15.0.1. This comes with a reboot.

I don't know if the reboot or the upgrade fixed this issue, but so far I can edit the preferences of a VM.

@osy
Copy link
Contributor

osy commented Oct 4, 2024

Can someone who is experiencing this issue generate a sysdiagnose as soon as they experience the error (so it can be the last event that is captured)? Note that this will contain identifiers from your machine including username, location, etc so only share it if you feel comfortable. You can email dev (at) getutm (dot) app with the dump.

@osy osy pinned this issue Oct 4, 2024
@chunfengyao
Copy link

Same issue, fixed after upgrading the system to 15.0.1 (24A348). It might caused by macOS itself.
also #6699

@chunfengyao
Copy link

QQ_1728027107872
QQ_1728027254879

@osy
Copy link
Contributor

osy commented Oct 4, 2024

Can others in this thread confirm if 15.0.1 fixes it?

@benmontycomputer
Copy link

15.0.1 fixed it for me.

@rbgarga
Copy link

rbgarga commented Oct 4, 2024

Same here, 15.0.1 fixed it

@rmatinata
Copy link

rmatinata commented Oct 4, 2024

I will advise a bit of caution here... There are multiple symptoms captured across different bugs that seem to be related to the tightened Sequoia security.

I've experienced all of those:

  • All my VMs not in the Container folder are suddenly grayed out
  • Can't import VMs
  • Issues trying to create new VMs

What I did (and thought to be the solution) was:

  • Run tccutil reset All com.utmapp.UTM
  • Reset

But then, a week later, all problems are back. So an update to 15.0.1 might give you the illusion is fixed (since it entails a reboot)

@freebrowser1
Copy link

Weird.
In my Macbook M1 Pro the Sequoia upgrade didn't affect UTM adversely. It runs Win11(x64) and Ubuntu(arm and x64) VM's without issue.

@ITmaze
Copy link

ITmaze commented Oct 5, 2024 via email

@osy
Copy link
Contributor

osy commented Oct 5, 2024

Reminder: #6639 (comment) if people are still experiencing the issue

@MandiYang
Copy link

I don't have any problems with UTM on Macos 15.0.1 so far

@dcvr2469
Copy link

dcvr2469 commented Oct 6, 2024

Same issue with macOS Sequoia 15.0 and UTM 4.5.4. Uninstalling/reinstalling UTM = no change. Clearing the mentioned folder(s), ~/Library/Containers/com.utmapp.UTM = no change. Another problem, if it hasn't already been mentioned, immediately following the creation of a new VM, the VM does not show until closing and reopening UTM.

Upgrade to 15.0.1 seems to have resolved the issue for me

@ITmaze
Copy link

ITmaze commented Oct 8, 2024

I'm sorry to report that the issue has now reoccurred after upgrading to macOS Sequoia 15.0.1. I have created a sysdiagnose. I actually created two. I saw the error. Quit UTM, created a sysdiagnose, launched UTM, generated the error, then created another sysdiagnose.

I am unable to determine which data in the 1,591 files that process generated contains personal and private information, so I'm uncomfortable with sending the entire archive.

Which files would you like to look at @osy ?

@osy
Copy link
Contributor

osy commented Oct 8, 2024

To start with system_logs.logarchive is good

@ITmaze
Copy link

ITmaze commented Oct 8, 2024

That directory alone is 373 MB and contains 717 files. Care to narrow it down a tad?

@osy
Copy link
Contributor

osy commented Oct 8, 2024

You can grep for UTM (case sensitive) and only export lines containing that

@ITmaze
Copy link

ITmaze commented Oct 8, 2024

Only three of the matching files are text files. This is the list of files that contain the string UTM. In total, compressed, they are 52M.

476K    ./Signpost/00000000000000f2.tracev3
4.0K    ./57/1EFCB0E9E53ED2A5ACCDD477CB16DE
4.0K    ./ED/C6578BAD13354383FA9725A19826CC
320K    ./7B/E6485FBD5B3702B50D63F6EFCB7E10
1.2M    ./2A/D9786F321D3C18A44E31BE04695BD7
 10M    ./logdata.LiveData.tracev3
1.4M    ./Special/00000000000004d9.tracev3
5.0M    ./Extra/logdata.statistics.1.jsonl
2.1M    ./Extra/logdata.statistics.0.jsonl
1.0M    ./Extra/logdata.statistics.1.txt
 10M    ./Persist/0000000000000629.tracev3
9.6M    ./Persist/0000000000000632.tracev3
121M    ./dsc/A02DCFBA3BDA3CA68A4212F00A4D75D3

@osy
Copy link
Contributor

osy commented Oct 8, 2024

I guess they are compressed. Open the logarchive and it should open up Console. Type in UTM as the filter and see if you can export the resulting entries.

@ITmaze
Copy link

ITmaze commented Oct 8, 2024

To create this I did the following:

  • sudo sysdiagnose -f ~/Desktop/
  • cd ~/Desktop/sysdiagnose_2024.10.08_10-42-38+0800_macOS_Mac15-12_24A348
  • open system_logs.logarchive
  • Wait for Console to launch
  • Click "All Messages"
  • Type UTM in the Search box and hit Enter.
  • Select All
  • Copy
  • Open TextEdit
  • Format -> Make Plain Text
  • Paste
  • Save As utm.log

utm.log

@osy
Copy link
Contributor

osy commented Oct 8, 2024

To be clear, you've gotten the error when trying to save VM settings? I don't see any references to config.plist in the logs. Maybe you can search for that in the logarchive?

@ITmaze
Copy link

ITmaze commented Oct 8, 2024

error	2024-10-08 10:42:01.003515 +0800	kernel	System Policy: sysdiagnosed(13980) deny(1) file-read-xattr /Users/onno/Library/Group Containers/group.com.apple.PegasusConfiguration/config.plist
error	2024-10-08 10:42:01.003997 +0800	kernel	System Policy: sysdiagnosed(13980) deny(1) file-read-data /Users/onno/Library/Group Containers/group.com.apple.PegasusConfiguration/config.plist
error	2024-10-08 10:44:16.716873 +0800	kernel	System Policy: sysdiagnosed(13980) deny(1) file-read-xattr /Users/onno/Library/Group Containers/group.com.apple.PegasusConfiguration/config.plist
error	2024-10-08 10:44:16.717206 +0800	kernel	System Policy: sysdiagnosed(13980) deny(1) file-read-data /Users/onno/Library/Group Containers/group.com.apple.PegasusConfiguration/config.plist

@ITmaze
Copy link

ITmaze commented Oct 8, 2024

In answer to your question, yes, I was trying to save a VM preference.

@ITmaze
Copy link

ITmaze commented Oct 8, 2024

Also, since you're likely to ask, this is the output from ls -l:

-rw-r--r--@ 1 onno  staff  51424  8 Oct 13:53 /Users/onno/Library/Group Containers/group.com.apple.PegasusConfiguration/config.plist

And this is what stat says:

16777234 4123923 -rw-r--r-- 1 onno staff 0 51424 "Oct  8 13:58:05 2024" "Oct  8 13:53:40 2024" "Oct  8 13:53:40 2024" "Oct  8 13:53:40 2024" 4096 104 0 /Users/onno/Library/Group Containers/group.com.apple.PegasusConfiguration/config.plist

@osy
Copy link
Contributor

osy commented Oct 8, 2024

Okay but that's unrelated to UTM. It should be an error accessing some file in your .utm bundle.

@ITmaze
Copy link

ITmaze commented Oct 8, 2024

What is the name of the file that the preferences save uses?

@osy
Copy link
Contributor

osy commented Oct 8, 2024

Example: /Users/osy/Library/Containers/com.utmapp.UTM/Data/Documents/Linux.utm/config.plist

@ITmaze
Copy link

ITmaze commented Oct 8, 2024

I've just created a VM from scratch, quit UTM, since you cannot click on the machine, relaunched, attempted to update the preferences (by turning off UEFI) and clicking "Save".

I then created a new sysdiagnose, extracted the logs, opened it in Console, searched for a different config.plist, it's not there, just the one I already showed you.

@JoshHrach
Copy link

I'm on 15.0.1 and am seeing this error when trying to save changes to my Shared Folder (well, it seems to have forgotten my shared folder, and now I can't save it, so no sharing is possible... argh!)

I'll send out a sysdiagnose later today.

@rbgarga
Copy link

rbgarga commented Oct 21, 2024

Same here, 15.0.1 fixed it

Today, without upgrading neither macOS or UTM, the problem is back

@rbgarga
Copy link

rbgarga commented Oct 21, 2024

Here you can find logs from sysdiagnose UTM.log

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