I am running on Sonoma 14.X and I need to download and install VM of older OS (Ventura).
Whatever the value I change in deployment target it downloads VM of Sonoma OS. I am from QA and need older OS to test app compatibility.
https://developer.apple.com/documentation/virtualization/running_macos_in_a_virtual_machine_on_apple_silicon_macs
Virtualization
RSS for tagCreate hardware-accelerated virtual machines to run macOS and Linux-based operating systems.
Posts under Virtualization tag
59 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I've tried to implement the steps suggested for configuring code signing https://docs.github.com/en/actions/deployment/deploying-xcode-applications/installing-an-apple-certificate-on-macos-runners-for-xcode-development on runners
However, I could not sign my app build when I was using Virtual Runner.
Is it a limitation coming from the Apple virtualization framework restriction (for signing in with Apple ID), or did I miss some configuration for Xcode?
I was trying both manual and automatic signing but never succeeded (
I used to run VirtualBox on macOS to run Windows guests for some reasons.
Recently I bought a new Mac mini M1, now I have a problem - VB does not have a stable release for arm (yet).
What other options do I have?
BTW, I came across this doc article (https://developer.apple.com/documentation/virtualization/running_macos_in_a_virtual_machine_on_apple_silicon). I read thru it, but could not conclude if it offers the same functionalities as a full-blown VM suite; and more specifically I want to run Windows guests.
With Apple Virtualization Framework, we can create virtual machines and run macOS and Linux-based operating systems and pass thru USB devices like mice and keyboards. Are there any plans to be able to pass thru bluetooth or bluetooth devices to the Virtual Machine so that the VM OS could connect to bluetooth devices?
Related docs: https://developer.apple.com/documentation/virtualization
I'm trying to use the host camera from inside a virtual machine created using the Virtualization framework in Swift. I can't seem to figure out how to achieve this though, and unlike audio devices, keyboards, displays etc there doesn't seem to be a corresponding class and docs page for cameras or generic usb devices.
Is there any way to connect a built in Apple camera to a mac virtual machine created with the Virtualization framework?
When I call either of
VZVirtualMachineConfiguration.validateSaveRestoreSupport(..)
VZVirtualMachine.saveMachineStateTo(URL)
I get the error:
NSLocalizedFailure=Invalid virtual machine configuration.
NSLocalizedFailureReason=Unsupported graphics device in configuration
For Linux there seems to be only vanilla size configuration (at least 1 scanout is required):
let graphicsDevice = VZVirtioGraphicsDeviceConfiguration()
graphicsDevice.scanouts = [
VZVirtioGraphicsScanoutConfiguration(widthInPixels: 1920, heightInPixels: 1080)
]
I've tried valid sizes and aspect ratios.
I've otherwise removed console and audio devices provoking similar errors, but I can't find an acceptable graphics configuration.
I believe it should work because my code is substantially similar to the open-source tart application that supports suspend.
I'm running Sonoma 14.2.1 on an M1 Studio with an HP24mh external monitor via a third-party HDMI/USB-C adapter.
I see nothing in the Console (except some ...wakeups_resource.diag common to other applications).
So I'm looking for help with
How to get more information for this failure
How to configure suspendable/resumable devices: graphics for sure, but also console, audio, keyboard, etc.
Thanks!
GUI Linux guest: https://developer.apple.com/documentation/virtualization/running_gui_linux_in_a_virtual_machine_on_a_mac
macos guest: https://developer.apple.com/documentation/virtualization/running_macos_in_a_virtual_machine_on_apple_silicon
wwdc-2022: https://developer.apple.com/videos/play/wwdc2022/10002/
wwdc-2023: https://developer.apple.com/videos/play/wwdc2023/10007/
Hi, everyone!
I want to know whether I can check my app is running on a virtual machine or not. If so, how can I do that in C++ or Objective-C? The code needs to support both Intel processors and Apple Silicon. Thanks!
Leo
I am following the Running Linux in a Virtual Machine guide on MacOS 14 w/ ARM. Fedora kernel and RAM disk images were acquired for aarch64.
I opened LinuxVirtualMachine.xcodeproj from the example; selecting 'LinuxVirtualMachine' under 'Targets', and navigating to 'Signing and Capabilities', I linked my Personal Team (needed to connect my Apple ID) under 'Signing->Team'. Clicking 'run' outputs the following:
Usage: /Users/shea/Library/Developer/Xcode/DerivedData/LinuxVirtualMachine-baalsbzvoxxbspgicozzllxbyqmh/Build/Products/Debug/LinuxVirtualMachine <kernel-path> <initial-ramdisk-path>
Program ended with exit code: 64
So I execute the following in Terminal from a directory containing the two images from Fedora:
% /Users/shea/Library/Developer/Xcode/DerivedData/LinuxVirtualMachine-baalsbzvoxxbspgicozzllxbyqmh/Build/Products/Debug/LinuxVirtualMachine ./vmlinuz ./initrd.img
And receive the output:
Failed to start the virtual machine. Error Domain=VZErrorDomain Code=1 "The virtual machine failed to start." UserInfo={NSLocalizedFailure=Internal Virtualization error., NSLocalizedFailureReason=The virtual machine failed to start.}
An old thread seems to imply this may be because the kernel image used to be compressed but is no longer? Another commenter suggests it is because vmlinuzis a gz file and to extract it, but file vmlinuzoutputs vmlinuz: PE32+ executable (EFI application) Aarch64 (stripped to external PDB), for MS Windows and gzip won't work even with the .gz extension. Did I miss a step?
Hello!
I am watching this video: https://developer.apple.com/videos/play/wwdc2022/10002/
and I wonder if there is a repo where i can find full code for the project?
Please let me know.
Thank you!
Vicki
My environment is a router with OpenWRT, a laptop connected to the router via patch cable and an untagged VLAN with VID 5 configured on that port in the router, and a MacBook M1 Pro connected via Wi-Fi to the router.
On the macbook, I created a VLAN interface by specifying en0 (AirPort) as the parent interface, then created a VM using QEMU with hvf accelerator or lima/UTM with VZ and I observe a strange situation: using arping, packets from the laptop sometimes reach the VM connected to the VLAN interface on the macbook, but arping running on the VM only sends requests but does not receive replies from the laptop. If I assign an IP address to the VLAN interface in macOS, packets are transmitted over either protocol without any problems. The problem is delivering packets to the virtual machine.
With tcpdump on the laptop I can see that it reply to arp requests, I can also see on the router that replies to arp requests passed through the Wi-Fi interface, but I don't see them in tcpdump on en0 on the macbook, which is also strange. But as I wrote before, if I assign an address from the same network on the macbook's VLAN interface, any packets are delivered between the laptop and macbook.
Laptop: 192.168.24.50
MacBook: 192.168.24.20 (vlan5 interface).
VM: 192.168.24.10
With lima-vm I use socket_vmnet in bridge mode. With QEMU I use vmnet-bridged.
➜ ~ ifconfig vlan5
vlan5: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1496
options=6063<RXCSUM,TXCSUM,TSO4,TSO6,PARTIAL_CSUM,ZEROINVERT_CSUM>
ether f0:2f:4b:xx:xx:xx
inet 192.168.24.20 netmask 0xffffff00 broadcast 192.168.24.255
vlan: 5 parent interface: en0
media: autoselect
status: active
➜ ~ ping 192.168.24.50 -c2
PING 192.168.24.50 (192.168.24.50): 56 data bytes
64 bytes from 192.168.24.50: icmp_seq=0 ttl=64 time=5.241 ms
64 bytes from 192.168.24.50: icmp_seq=1 ttl=64 time=5.429 ms
--- 192.168.24.50 ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 5.241/5.335/5.429/0.094 ms
➜ ~ sudo arping -c 5 -i vlan5 192.168.24.50
ARPING 192.168.24.50
60 bytes from 10:e7:c6:xx:xx:xx (192.168.24.50): index=0 time=6.061 msec
60 bytes from 10:e7:c6:xx:xx:xx (192.168.24.50): index=1 time=6.084 msec
60 bytes from 10:e7:c6:xx:xx:xx (192.168.24.50): index=2 time=5.945 msec
60 bytes from 10:e7:c6:xx:xx:xx (192.168.24.50): index=3 time=3.092 msec
60 bytes from 10:e7:c6:xx:xx:xx (192.168.24.50): index=4 time=3.848 msec
--- 192.168.24.50 statistics ---
5 packets transmitted, 5 packets received, 0% unanswered (0 extra)
rtt min/avg/max/std-dev = 3.092/5.006/6.084/1.278 ms
➜ ~ ifconfig bridge100
bridge100: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1496
options=3<RXCSUM,TXCSUM>
ether f2:2f:4b:xx:xx:xx
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x0
member: vlan5 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 22 priority 0 path cost 0
member: vmenet0 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 23 priority 0 path cost 0
Address cache:
10:e7:c6:xx:xx:xx Vlan1 vlan5 326 flags=0<>
52:55:55:ae:36:b4 Vlan1 vmenet0 1172 flags=0<>
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
[root@VM1 ~]# arping 192.168.24.50 -c5
ARPING 192.168.24.50 from 192.168.24.10 lima0
Sent 5 probes (5 broadcast(s))
Received 0 response(s)
[root@VM1 ~]#
[root@laptop ~]# arping 192.168.24.10 -c5
ARPING 192.168.24.15 from 192.168.24.10 lima0
Unicast reply from 192.168.24.10 [52:55:55:AE:36:B4] 2.492ms
Unicast reply from 192.168.24.10 [52:55:55:AE:36:B4] 1.791ms
Unicast reply from 192.168.24.10 [52:55:55:AE:36:B4] 3.059ms
Sent 5 probes (1 broadcast(s))
Received 3 response(s)
[root@laptop ~]#
What could be the reason for this behavior?
The Running Linux in a Virtual Machine sample code demonstrates starting a Linux Virtual Machine.
But the example only boots to the RAM disk, leaving you in an emergency shell. It does not show how to boot to a disk containing the Linux filesystem.
With the sample code unaltered, I can use the Ubuntu RAM disk and kernel files from https://cloud-images.ubuntu.com/releases/23.10/release/unpacked/ to boot Linux like this:
./LinuxVirtualMachine /Users/username/Downloads/ubuntu-23.10-server-cloudimg-arm64-vmlinuz-generic /Users/username/Downloads/ubuntu-23.10-server-cloudimg-arm64-initrd-generic
But this fails to fully boot Ubuntu because no root is specified in the bootloader:
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... [ 2.013998] Btrfs loaded, zoned=yes, fsverity=yes
Scanning for Btrfs filesystems
done.
No root device specified. Boot arguments must include a root= parameter.
And so Ubuntu drops you to the emergency BusyBox shell.
If I mount the root disk image from the release page at https://cloud-images.ubuntu.com/releases/23.10/release/ and specify the root in the bootloader, we get a little further, but Linux can not see the mounted disk:
diff --git a/LinuxVirtualMachine/main.swift b/LinuxVirtualMachine/main.swift
index bf32924..0977b9e 100644
--- a/LinuxVirtualMachine/main.swift
+++ b/LinuxVirtualMachine/main.swift
@@ -10,7 +10,7 @@ import Virtualization
// MARK: Parse the Command Line
-guard CommandLine.argc == 3 else {
+guard CommandLine.argc == 4 else {
printUsageAndExit()
}
@@ -25,6 +25,11 @@ configuration.memorySize = 2 * 1024 * 1024 * 1024 // 2 GiB
configuration.serialPorts = [ createConsoleConfiguration() ]
configuration.bootLoader = createBootLoader(kernelURL: kernelURL, initialRamdiskURL: initialRamdiskURL)
+let diskImageURL = URL(fileURLWithPath: CommandLine.arguments[3], isDirectory: false)
+let diskImageAttachment = try VZDiskImageStorageDeviceAttachment(url: diskImageURL, readOnly: false)
+let storageDeviceConfiguration = VZVirtioBlockDeviceConfiguration(attachment: diskImageAttachment)
+configuration.storageDevices = [storageDeviceConfiguration]
+
do {
try configuration.validate()
} catch {
@@ -71,7 +76,11 @@ func createBootLoader(kernelURL: URL, initialRamdiskURL: URL) -> VZBootLoader {
// Use the first virtio console device as system console.
"console=hvc0",
// Stop in the initial ramdisk before attempting to transition to the root file system.
- "rd.break=initqueue"
+ "rd.break=initqueue",
+ // Give time for the boot image to be available.
+ "rootdelay=5",
+ // Specify the boot image.
+ "root=/dev/vda"
]
bootLoader.commandLine = kernelCommandLineArguments.joined(separator: " ")
@@ -104,6 +113,6 @@ func createConsoleConfiguration() -> VZSerialPortConfiguration {
}
func printUsageAndExit() -> Never {
- print("Usage: \(CommandLine.arguments[0]) <kernel-path> <initial-ramdisk-path>")
+ print("Usage: \(CommandLine.arguments[0]) <kernel-path> <initial-ramdisk-path> <bootable-filesystem-image-path>")
exit(EX_USAGE)
}
Output:
./LinuxVirtualMachine /Users/username/Downloads/ubuntu-23.10-server-cloudimg-arm64-vmlinuz-generic /Users/username/Downloads/ubuntu-23.10-server-cloudimg-arm64-initrd-generic /Users/username/Downloads/ubuntu-23.10-server-cloudimg-arm64.img
...snip...
Gave up waiting for root file system device. Common problems:
- Boot args (cat /proc/cmdline)
- Check rootdelay= (did the system wait long enough?)
- Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/vda does not exist. Dropping to a shell!
If I instead create a RAW disk image formatted as APFS with the contents of the root drive from the Ubuntu releases page, the mount works but Linux can not read the disk (presumably due to the APFS formatting?):
./LinuxVirtualMachine /Users/username/Downloads/ubuntu-23.10-server-cloudimg-arm64-vmlinuz-generic /Users/username/Downloads/ubuntu-23.10-server-cloudimg-arm64-initrd-generic /Users/username/Desktop/ubuntu-23.10-server.dmg
...snip...
Warning: Type of root file system is unknown, so skipping check.
mount: mounting /dev/vda on /root failed: Invalid argument
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... mount: mounting /dev on /root/dev failed: No such file or directory
mount: mounting /dev on /root/dev failed: No such file or directory
done.
mount: mounting /run on /root/run failed: No such file or directory
To make that disk image, I did:
hdiutil create -size 2g -fs "HFS+" -volname "EmptyImage" ubuntu-23.10-server
hdiutil attach ubuntu-23.10-server.dmg
diskutil eraseDisk APFS UbuntuFS disk4 // where disk4 is the mounted drive number from the previous step
sudo cp -R /path/to/extracted-ubuntu-root-filesystem/* /Volumes/UbuntuFS/
hdiutil detach disk4
What am I missing in order to transition from booting from the RAM disk to booting from the root filesystem?
I have an M3 MacBook Pro, running macOS Sonoma 14.1.1. A tester of our app is running Monterrey, and is experiencing something we can't reproduce, so I need to set up a Monterrey environment.
I searched for information here about VMs, and found an article about using VM Frameworks and Xcode, but I am not a programmer in any way.
I used to use VMware years ago to host Windows and Linux machines on my Mac, but Google searching leads me to a 2 year old post about Parallels
https://www.reddit.com/r/MacOS/comments/tuxfzq/how_can_i_run_macos_monterrey_in_a_virtual/
Can I get a suggestion for how to create and use VMs on Apple Silicon to test older OSs?
Thank you.
I created a macOS 14 VM using https://github.com/s-u/macosvm which uses the Virtualization Framework. I want to check if I can use paravirtualized graphics for tensorflow workloads.
I followed the steps from https://developer.apple.com/metal/tensorflow-plugin/ but when I run the script from step 4. Verify, I get a segmentation fault (see below).
Did anyone try to get this kind of GPU compute in a VM and succeed?
/Users/teuf/venv-metal/lib/python3.9/site-packages/urllib3/__init__.py:34: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
warnings.warn(
2023-11-20 07:41:11.723578: I metal_plugin/src/device/metal_device.cc:1154] Metal device set to: Apple Paravirtual device
2023-11-20 07:41:11.723620: I metal_plugin/src/device/metal_device.cc:296] systemMemory: 10.00 GB
2023-11-20 07:41:11.723626: I metal_plugin/src/device/metal_device.cc:313] maxCacheSize: 0.50 GB
2023-11-20 07:41:11.723700: I tensorflow/core/common_runtime/pluggable_device/pluggable_device_factory.cc:306] Could not identify NUMA node of platform GPU ID 0, defaulting to 0. Your kernel may not have been built with NUMA support.
2023-11-20 07:41:11.723968: I tensorflow/core/common_runtime/pluggable_device/pluggable_device_factory.cc:272] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 0 MB memory) -> physical PluggableDevice (device: 0, name: METAL, pci bus id: <undefined>)
zsh: segmentation fault python3 ./tensorflow-test.py
Thread 0 Crashed:: Dispatch queue: metal gpu stream
0 MPSCore 0x1999598f8 MPSDevice::GetMPSLibrary_DoNotUse(MPSLibraryInfo const*) + 92
1 MPSCore 0x19995c544 0x199927000 + 218436
2 MPSCore 0x19995c908 0x199927000 + 219400
3 MetalPerformanceShadersGraph 0x1fb696a58 0x1fb583000 + 1129048
4 MetalPerformanceShadersGraph 0x1fb6f0cc8 0x1fb583000 + 1498312
5 MetalPerformanceShadersGraph 0x1fb6ef2dc 0x1fb583000 + 1491676
6 MetalPerformanceShadersGraph 0x1fb717ea0 0x1fb583000 + 1658528
7 MetalPerformanceShadersGraph 0x1fb717ce4 0x1fb583000 + 1658084
8 MetalPerformanceShadersGraph 0x1fb6edaac 0x1fb583000 + 1485484
9 MetalPerformanceShadersGraph 0x1fb7a85e0 0x1fb583000 + 2250208
10 MetalPerformanceShadersGraph 0x1fb7a79f0 0x1fb583000 + 2247152
11 MetalPerformanceShadersGraph 0x1fb6602b4 0x1fb583000 + 905908
12 MetalPerformanceShadersGraph 0x1fb65f7b0 0x1fb583000 + 903088
13 libmetal_plugin.dylib 0x1156dfdcc invocation function for block in metal_plugin::runMPSGraph(MetalStream*, MPSGraph*, NSDictionary*, NSDictionary*) + 164
14 libdispatch.dylib 0x18e79b910 _dispatch_client_callout + 20
15 libdispatch.dylib 0x18e7aacc4 _dispatch_lane_barrier_sync_invoke_and_complete + 56
16 libmetal_plugin.dylib 0x1156dfd14 metal_plugin::runMPSGraph(MetalStream*, MPSGraph*, NSDictionary*, NSDictionary*) + 108
17 libmetal_plugin.dylib 0x115606634 metal_plugin::MPSStatelessRandomUniformOp<float>::ProduceOutput(metal_plugin::OpKernelContext*, metal_plugin::Tensor*) + 876
18 libmetal_plugin.dylib 0x115607620 metal_plugin::MPSStatelessRandomOpBase::Compute(metal_plugin::OpKernelContext*) + 620
19 libmetal_plugin.dylib 0x1156061f8 void metal_plugin::ComputeOpKernel<metal_plugin::MPSStatelessRandomUniformOp<float>>(void*, TF_OpKernelContext*) + 44
20 libtensorflow_framework.2.dylib 0x10b807354 tensorflow::PluggableDevice::Compute(tensorflow::OpKernel*, tensorflow::OpKernelContext*) + 148
21 libtensorflow_framework.2.dylib 0x10b7413e0 tensorflow::(anonymous namespace)::SingleThreadedExecutorImpl::Run(tensorflow::Executor::Args const&) + 2100
22 libtensorflow_framework.2.dylib 0x10b70b820 tensorflow::FunctionLibraryRuntimeImpl::RunSync(tensorflow::FunctionLibraryRuntime::Options, unsigned long long, absl::lts_20230125::Span<tensorflow::Tensor const>, std::__1::vector<tensorflow::Tensor, std::__1::allocator<tensorflow::Tensor>>*) + 420
23 libtensorflow_framework.2.dylib 0x10b715668 tensorflow::ProcessFunctionLibraryRuntime::RunMultiDeviceSync(tensorflow::FunctionLibraryRuntime::Options const&, unsigned long long, std::__1::vector<std::__1::variant<tensorflow::Tensor, tensorflow::TensorShape>, std::__1::allocator<std::__1::variant<tensorflow::Tensor, tensorflow::TensorShape>>>*, std::__1::function<absl::lts_20230125::Status (tensorflow::ProcessFunctionLibraryRuntime::ComponentFunctionData const&, tensorflow::ProcessFunctionLibraryRuntime::InternalArgs*)>) const + 1336
24 libtensorflow_framework.2.dylib 0x10b71a8a4 tensorflow::ProcessFunctionLibraryRuntime::RunSync(tensorflow::FunctionLibraryRuntime::Options const&, unsigned long long, absl::lts_20230125::Span<tensorflow::Tensor const>, std::__1::vector<tensorflow::Tensor, std::__1::allocator<tensorflow::Tensor>>*) const + 848
25 libtensorflow_cc.2.dylib 0x2801b5008 tensorflow::KernelAndDeviceFunc::Run(tensorflow::ScopedStepContainer*, tensorflow::EagerKernelArgs const&, std::__1::vector<std::__1::variant<tensorflow::Tensor, tensorflow::TensorShape>, std::__1::allocator<std::__1::variant<tensorflow::Tensor, tensorflow::TensorShape>>>*, tsl::CancellationManager*, std::__1::optional<tensorflow::EagerFunctionParams> const&, std::__1::optional<tensorflow::ManagedStackTrace> const&, tsl::CoordinationServiceAgent*) + 572
26 libtensorflow_cc.2.dylib 0x28016613c tensorflow::EagerKernelExecute(tensorflow::EagerContext*, absl::lts_20230125::InlinedVector<tensorflow::TensorHandle*, 4ul, std::__1::allocator<tensorflow::TensorHandle*>> const&, std::__1::optional<tensorflow::EagerFunctionParams> const&, tsl::core::RefCountPtr<tensorflow::KernelAndDevice> const&, tensorflow::GraphCollector*, tsl::CancellationManager*, absl::lts_20230125::Span<tensorflow::TensorHandle*>, std::__1::optional<tensorflow::ManagedStackTrace> const&) + 452
27 libtensorflow_cc.2.dylib 0x2801708ec tensorflow::ExecuteNode::Run() + 396
28 libtensorflow_cc.2.dylib 0x2801b0118 tensorflow::EagerExecutor::SyncExecute(tensorflow::EagerNode*) + 244
29 libtensorflow_cc.2.dylib 0x280165ac8 tensorflow::(anonymous namespace)::EagerLocalExecute(tensorflow::EagerOperation*, tensorflow::TensorHandle**, int*) + 2580
30 libtensorflow_cc.2.dylib 0x2801637a8 tensorflow::DoEagerExecute(tensorflow::EagerOperation*, tensorflow::TensorHandle**, int*) + 416
31 libtensorflow_cc.2.dylib 0x2801631e8 tensorflow::EagerOperation::Execute(absl::lts_20230125::Span<tensorflow::AbstractTensorHandle*>, int*) + 132
Hello,
I am working with Virtualization framework in an Xcode swift project.
I have also installed Parallels Desktop on my mac (Apple Silicon).
I would like to convert a Parallels Desktop hard drive (hds file) to an image compatible with my Virtualization framework project.
My goal is to run my Parallels Desktop virtual machine in my Xcode project.
Is there a way to do that ?
Thanks
Hello
I have looked at Virtualization framework samples source code provided by Apple.
There is something strange: For a linux guest OS, i can see a variable store:
let variableStore = try VZEFIVariableStore(creatingVariableStoreAt: xxxx)
...
let bootloader = VZEFIBootLoader()
...
bootloader.variableStore = variableStore
It seems this variable store is linked with NVRAM.
For a macOS guest OS, there is no variable store. (The bootloader is created with VZMacOSBootLoader)
My question is why macOS guest doesn't need variable store ?
Thanks
Hello,
I am downloading macOS restore image with VZMacOSRestoreImage, in order to deploy virtual machines.
I have just upgraded my host mac to last Sonoma version.
So, macOS restore image has just been downloaded on my computer during upgrade procedure.
Is there a way to avoid a second download and ask VZMacOSRestoreImage to fetch my last local macOS image ? I think this image is still stored somewhere on my computer...
Thanks
For some reason when I try to archive an app, which is using saveMachineStateTo function, it fails with this error:
Value of type 'VZVirtualMachine' has no member 'saveMachineStateTo'
It works fine when running as debug from Xcode. Also fails if I change run destination to release.
I have project set to macOS 14. What can cause this?
Hello,
I am setting up a Linux virtual machine with Virtualization framework.
It works fine.
Here is how i am creating a network interface:
let network_device = VZVirtioNetworkDeviceConfiguration()
network_device.attachment = VZNATNetworkDeviceAttachment()
vm_config.networkDevices = [network_device]
As you can see, this is a NAT network. I would like to know the IP address assigned to this interface. macOS emulates a DHCP server and i would like to know the IP in my Xcode program.
How can i do that ?
Thanks
Good day ,
thank you very much for the #virtualization article
I have now managed to create a linux(#debian 12/bookworm) virtual machine
I now have the following questions.
How can i increase the size of the GUI Linus VM.bundle from 68.72G to 150G?
Unable to obtain an IP V4 address to a bridge (have intall brige-utils package) - can get IP v6 address without any problem.
my #bridge setup is
auto br0
iface br0 inet dhcp
bridge_ports enp0s1
bridge-stp on
bridge-fd 0
Unable to ping the host from the virtual machine , but able to ping vms from the host - no firewalls are running, how can i enable icmp from vm to host and host to other containers.
my target is to run lxd/incus containers to test few of my applications in apple silicon
I am now able to run lxd/incus without any problem. however i am not able to access the application that are running in the containers, provided I am logged into the linux vm which beats the purpose of publishing the my apps, few of the services are IBM informix REST API / Nginx .
My #requirement is
1, increase the size of the vm image.(#GUI Linux vm.bundle)
2. Obtain #ip address V4 for br0
3. Run #lxd / #incus containers
4. #icmp comms between host / vm / containers
Please let me know if there are possibilities to achieve my requirement.
Thank you
I'm aware signing in to an Apple ID on a macOS Virtual Machine is not supported, unfortunately. But is there a way to download Xcode from within the VM? I know the developer website used to have links where you could directly download Xcode outside the Mac App Store but I can't seem to find it?