I derived a solution from
https://github.com/insidegui/VirtualBuddy/blob/main/VirtualUI/Source/Session/Components/SwiftUIVMView.swift
The solution is to create an NSViewController that controls the VZVIrtualMachineView and then wrap it with a Representable.
It would be great to have the Apple Virtualization sample apps use SwiftUI 5.0, as now it is not just an alternative, but what shall be used to develop Apps. Providing XIB samples will just make the transition to best architecture (@Observable, flagged onAppear rather than viewDidLoad...)
Topic:
App & System Services
SubTopic:
Core OS
Tags: