From dacf074c8766cf655d05c4027c0f2f13d8956cb6 Mon Sep 17 00:00:00 2001 From: osy <50960678+osy@users.noreply.github.com> Date: Mon, 30 Oct 2023 20:02:20 -0700 Subject: [PATCH] vm(qemu): do not try to eject drives on non-disk interfaces Fixes #5845 --- Services/UTMQemuVirtualMachine.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Services/UTMQemuVirtualMachine.swift b/Services/UTMQemuVirtualMachine.swift index 2826ca278..c162e6a76 100644 --- a/Services/UTMQemuVirtualMachine.swift +++ b/Services/UTMQemuVirtualMachine.swift @@ -748,7 +748,7 @@ extension UTMQemuVirtualMachine { // an image bookmark was saved while QEMU was NOT running let url = try URL(resolvingPersistentBookmarkData: localBookmark) try await changeMedium(drive, to: url, isAccessOnly: !isMounting) - } else if isMounting { + } else if isMounting && (drive.imageType == .cd || drive.imageType == .disk) { // a placeholder image might have been mounted try await eject(drive) }