UTM icon indicating copy to clipboard operation
UTM copied to clipboard

[FEATURE REQUEST] Boot secondary, physically installed OS as a VM

Open Rastafabisch opened this issue 2 years ago • 6 comments

It would be a great addition if UTM could boot other, physically on the Mac installed OS. This could be other versions of macOS as well as Windows or Linux. Parallels Desktop as well as VMWare provide this functionality, at least for Bootcamp.

This would be a great feature on Intel Mac and a stand out feature on apple silicon (for Asahi based installs).

Rastafabisch avatar Feb 23 '23 12:02 Rastafabisch

Unfortunately because UTM is a sandboxed app, it can't access physical partitions.

You can use nbd (via qemu-nbd) to serve the partition as a block device to a Linux VM, and/or you might be able to host a network boot server to be able to boot from that partition, but I've never tried this.

Hmm @osy is the utmctl command also sandboxed, and if not, could functionality to host a network boot server be implemented eventually?

ktprograms avatar Feb 25 '23 03:02 ktprograms

Yes, utmctl is still sandboxed

osy avatar Feb 26 '23 03:02 osy

Huh, that's unfortunate. Thanks for confirming

ktprograms avatar Feb 26 '23 04:02 ktprograms

Oh what a bummer. Sometimes native performance is needed on a VM, for instance BOOTCAMP when gaming. Having the option to boot or virtualize from the same partition is the absolute killer feature of Parallels. I'd love to see UTM going in that direction.

@ktprograms Could a Helper Tool with higher privileges not bridge a real partition to UTM? Something like this:

image

Which would only be necessary to mount partitions into a VM and would stay optional for the general user who just wants to use VMs the normal way.

martin-braun avatar Mar 21 '23 16:03 martin-braun

@martin-braun serving a block device doesn't need higher privileges AFAIK, just that it needs to be unsandboxed, which UTM can't do as it is on the App Store.

You can already do this with qemu-nbd currently, so I don't see a need for a custom UTM helper if it can't be bundled in the main UTM.app anyway.

ktprograms avatar Mar 23 '23 02:03 ktprograms

I would gladly have an un-sandboxed UTM app for this purpose.

XavierBestelSonos avatar Sep 28 '24 14:09 XavierBestelSonos

@martin-braun serving a block device doesn't need higher privileges AFAIK, just that it needs to be unsandboxed, which UTM can't do as it is on the App Store.

You can already do this with qemu-nbd currently, so I don't see a need for a custom UTM helper if it can't be bundled in the main UTM.app anyway.

How would I do this exactly?

EDIT: figured it out On the host sudo qemu-nbd --format=raw --persist /dev/disk4

In the guest sudo nbd-client 192.168.64.1 /dev/nbd0

flanter21 avatar Mar 24 '25 21:03 flanter21