TechnologiesLow-level, Kernel & Legacy

Virtualization

iOSmacOStvOSwatchOSvisionOS

Virtualization lets you create and run virtual machines on Apple silicon and Intel Macs. You assemble a machine from configuration objects, choosing a boot loader such as VZEFIBootLoader and assembling storage, network, audio, console, graphics, and other devices through types like VZDiskImageStorageDeviceAttachment, VZBridgedNetworkDeviceAttachment, VZAudioDeviceConfiguration, VZConsoleDeviceConfiguration, and VZGraphicsDeviceConfiguration. The framework also supports directory sharing, entropy devices, and custom Virtio devices via VZDirectorySharingDevice, VZEntropyDeviceConfiguration, and VZCustomVirtioDevice, with errors surfaced through VZError. It runs on macOS.

Virtual Machines 7

Configure, instantiate, run, and observe a virtual machine and present its display.

  • Cl
    VZVirtualMachinemacOS 11.0+
    @abstract VZVirtualMachine represents the entire state of a single virtual machine.
  • Cl
    VZVirtualMachineConfigurationmacOS 11.0+
    @abstract Virtual machine configuration.
  • Pr
    VZVirtualMachineDelegatemacOS 11.0+
    @abstract A class conforming to the VZVirtualMachineDelegate protocol can provide methods for tracking the virtual machine state.
  • Cl
    VZVirtualMachineStartOptionsmacOS 13.0+
    @abstract Base class for virtual machine start options.
  • Cl
    VZMacOSVirtualMachineStartOptionsmacOS 13.0+
    Options that control startup behavior of a virtual machine using the macOS boot loader.
  • Cl
    VZVirtualMachineViewmacOS 12.0+
    @abstract A view that allows user interaction with a virtual machine.
  • St
    VZVirtualMachineViewAdaptormacOS 27.0+
    A sendable wrapper that connects a ``VZVirtualMachineView`` to a virtual machine.

Boot Loaders 8

Choose how the guest operating system boots, from EFI firmware to a Linux kernel or macOS.

  • Cl
    VZBootLoadermacOS 11.0+
    @abstract Base class of boot loader configuration.
  • Cl
    VZEFIBootLoadermacOS 13.0+
    @abstract Boot loader configuration for booting guest operating systems expecting an EFI ROM.
  • Cl
    VZLinuxBootLoadermacOS 11.0+
    @abstract Boot loader configuration for a Linux kernel.
  • Cl
    VZMacOSBootLoadermacOS 12.0+
    @abstract Boot loader configuration for booting macOS on Apple Silicon.
  • Cl
    VZEFIVariableStoremacOS 13.0+
    The Extensible Firmware Interface (EFI) variable store.
  • Cl
    VZEFISignatureDatabaseConfigurationmacOS 27.0+
    A container for Unified Extensible Firmware Interface (UEFI) Secure Boot signature lists.
  • Cl
    VZEFISignatureListmacOS 27.0+
    A class that represents a Unified Extensible Firmware Interface (UEFI) signature list.
  • En
    VZEFISignaturemacOS 27.0+
    Constants that identify EFI signature types used in secure boot.

Platform Configuration 7

Define the hardware platform and identity of the virtual machine for generic guests and macOS guests.

  • Cl
    VZPlatformConfigurationmacOS 12.0+
    @abstract Base class for a platform configuration.
  • Cl
    VZGenericPlatformConfigurationmacOS 12.0+
    @abstract The platform configuration for a generic Intel or ARM virtual machine.
  • Cl
    VZGenericMachineIdentifiermacOS 13.0+
    @abstract An identifier to make a virtual machine unique.
  • Cl
    VZMacPlatformConfigurationmacOS 12.0+
    @abstract The platform configuration for booting macOS on Apple Silicon.
  • Cl
    VZMacMachineIdentifiermacOS 12.0+
    @abstract An identifier to make a virtual machine unique.
  • Cl
    VZMacHardwareModelmacOS 12.0+
    @abstract Describes a specific virtual Mac hardware model.
  • Cl
    VZMacAuxiliaryStoragemacOS 12.0+
    @abstract Mac auxiliary storage.

macOS Installation and Provisioning 5

Restore, install, and provision a macOS guest on Apple silicon.

  • Cl
    VZMacOSRestoreImagemacOS 12.0+
    @abstract VZMacOSRestoreImage describes a version of macOS to be installed to a virtual machine.
  • Cl
    VZMacOSInstallermacOS 12.0+
    @abstract VZMacOSInstaller is used to install macOS on the specified virtual machine.
  • Cl
    VZMacOSConfigurationRequirementsmacOS 12.0+
    @abstract VZMacOSConfigurationRequirements describes the parameter constraints required by a specific configuration of macOS.
  • Cl
    VZGuestProvisioningOptionsmacOS 27.0+
    The base class for guest provisioning options.
  • Cl
    VZMacGuestProvisioningOptionsmacOS 27.0+
    The configuration for guest setup during macOS virtual machine startup.

Storage Devices 14

Attach disk images, block devices, and USB mass storage to the virtual machine.

  • Cl
    VZStorageDevicemacOS 15.0+
    @abstract Class representing a storage device in a virtual machine.
  • Cl
    VZStorageDeviceConfigurationmacOS 11.0+
    @abstract Base class for a storage device configuration.
  • Cl
    VZStorageDeviceAttachmentmacOS 11.0+
    @abstract Base class for a storage device attachment.
  • Cl
    VZDiskImageStorageDeviceAttachmentmacOS 11.0+
    @abstract Storage device attachment using a disk image to implement the storage.
  • Cl
    VZDiskBlockDeviceStorageDeviceAttachmentmacOS 14.0+
    @abstract Storage device attachment using a disk block device to store data.
  • Cl
    VZNetworkBlockDeviceStorageDeviceAttachmentmacOS 14.0+
    @abstract Storage device attachment backed by a Network Block Device (NBD) client.
  • Pr
    VZNetworkBlockDeviceStorageDeviceAttachmentDelegatemacOS 14.0+
    @abstract A class conforming to VZNetworkBlockDeviceStorageDeviceAttachmentDelegate can provide
  • Cl
    VZVirtioBlockDeviceConfigurationmacOS 11.0+
    @abstract Configuration of a paravirtualized storage device of type Virtio Block Device.
  • Cl
    VZNVMExpressControllerDeviceConfigurationmacOS 14.0+
    @abstract Configuration of an NVM Express Controller storage device.
  • Cl
    VZUSBMassStorageDevicemacOS 15.0+
    @abstract Class representing a hot-pluggable USB Mass Storage device.
  • Cl
    VZUSBMassStorageDeviceConfigurationmacOS 13.0+
    @abstract Configuration of a USB Mass Storage storage device.
  • En
    VZDiskImageCachingModemacOS 12.0+
    @enum VZDiskImageCachingMode
  • En
    VZDiskImageSynchronizationModemacOS 12.0+
    Constants that specify how disk image writes are synchronized to storage.
  • En
    VZDiskSynchronizationModemacOS 14.0+
    Constants that specify how disk writes are synchronized to the backing store.

Network Devices 10

Add network interfaces and connect them to the host through NAT, bridged, vmnet, or file-handle attachments.

  • Cl
    VZNetworkDevicemacOS 12.0+
    @abstract Class representing a network device in a virtual machine.
  • Cl
    VZNetworkDeviceConfigurationmacOS 11.0+
    @abstract Base class for a network adapter configuration.
  • Cl
    VZNetworkDeviceAttachmentmacOS 11.0+
    @abstract Base class for a network device attachment.
  • Cl
    VZVirtioNetworkDeviceConfigurationmacOS 11.0+
    @abstract Configuration of a paravirtualized network device of type Virtio Network Device.
  • Cl
    VZNATNetworkDeviceAttachmentmacOS 11.0+
    @abstract Network device attachment using network address translation (NAT) with outside networks.
  • Cl
    VZBridgedNetworkDeviceAttachmentmacOS 11.0+
    @abstract Network device attachment bridging a host physical interface with a virtual network device.
  • Cl
    VZBridgedNetworkInterfacemacOS 11.0+
    @abstract Define a network interface that bridges a physical interface with a virtual machine.
  • Cl
    VZVmnetNetworkDeviceAttachmentmacOS 26.0+
    @abstract Network device attachment that allows custom network topology.
  • Cl
    VZFileHandleNetworkDeviceAttachmentmacOS 11.0+
    @abstract Network device attachment sending raw network packets over a file handle.
  • Cl
    VZMACAddressmacOS 11.0+
    @abstract VZMACAddress represents a media access control address (MAC address), the 48-bit ethernet address.

Graphics and Display 13

Configure graphics devices and displays for both Virtio and Mac graphics stacks.

  • Cl
    VZGraphicsDevicemacOS 14.0+
    @abstract Class representing a graphics device in a virtual machine.
  • Cl
    VZGraphicsDeviceConfigurationmacOS 12.0+
    An abstract base class that configures a graphics device for a virtual machine.
  • Cl
    VZGraphicsDisplaymacOS 14.0+
    @abstract Class representing a graphics display in a virtual machine.
  • Cl
    VZGraphicsDisplayConfigurationmacOS 14.0+
    @abstract Base class for a graphics display configuration.
  • Pr
    VZGraphicsDisplayObservermacOS 14.0+
    @abstract VZGraphicsDisplayObserver observes a VZGraphicsDisplay for state changes.
  • Cl
    VZVirtioGraphicsDevicemacOS 14.0+
    @abstract A Virtio graphics device.
  • Cl
    VZVirtioGraphicsDeviceConfigurationmacOS 13.0+
    @abstract Configuration for a Virtio graphics device.
  • Cl
    VZVirtioGraphicsScanoutmacOS 14.0+
    @abstract Class representing a Virtio graphics device scanout.
  • Cl
    VZVirtioGraphicsScanoutConfigurationmacOS 13.0+
    @abstract Configuration for a scanout attached to a Virtio graphics device.
  • Cl
    VZMacGraphicsDevicemacOS 14.0+
    @abstract A Mac graphics device.
  • Cl
    VZMacGraphicsDeviceConfigurationmacOS 12.0+
    @abstract Configuration for a Mac graphics device.
  • Cl
    VZMacGraphicsDisplaymacOS 14.0+
    @abstract Class representing a virtual Mac graphics display.
  • Cl
    VZMacGraphicsDisplayConfigurationmacOS 12.0+
    @abstract Configuration for a display attached to a Mac graphics device.

Input Devices 6

Add keyboard, pointing, and trackpad input devices for the virtual machine.

  • Cl
    VZKeyboardConfigurationmacOS 12.0+
    @abstract Base class for a keyboard configuration.
  • Cl
    VZUSBKeyboardConfigurationmacOS 12.0+
    @abstract Configuration for a USB keyboard.
  • Cl
    VZMacKeyboardConfigurationmacOS 14.0+
    @abstract Configuration for a Mac keyboard.
  • Cl
    VZPointingDeviceConfigurationmacOS 12.0+
    @abstract Base class for a pointing device configuration.
  • Cl
    VZUSBScreenCoordinatePointingDeviceConfigurationmacOS 12.0+
    @abstract Configuration for a USB pointing device that reports absolute coordinates.
  • Cl
    VZMacTrackpadConfigurationmacOS 13.0+
    @abstract Configuration for a Mac trackpad.

Audio Devices 9

Configure sound devices with host-backed input and output stream sources and sinks.

  • Cl
    VZAudioDeviceConfigurationmacOS 12.0+
    @abstract Base class for an audio device configuration.
  • Cl
    VZVirtioSoundDeviceConfigurationmacOS 12.0+
    @abstract Virtio Sound Device Configuration.
  • Cl
    VZVirtioSoundDeviceStreamConfigurationmacOS 12.0+
    @abstract Virtio Sound Device Stream Configuration.
  • Cl
    VZVirtioSoundDeviceInputStreamConfigurationmacOS 12.0+
    @abstract Virtio Sound Device Input Stream Configuration.
  • Cl
    VZVirtioSoundDeviceOutputStreamConfigurationmacOS 12.0+
    @abstract Virtio Sound Device Output Stream Configuration.
  • Cl
    VZAudioInputStreamSourcemacOS 12.0+
    @abstract Base class for an audio input stream source.
  • Cl
    VZAudioOutputStreamSinkmacOS 12.0+
    @abstract Base class for an audio output stream sink.
  • Cl
    VZHostAudioInputStreamSourcemacOS 12.0+
    @abstract Host audio input stream source provides audio from the host system's default input device.
  • Cl
    VZHostAudioOutputStreamSinkmacOS 12.0+
    @abstract Host audio output stream sink plays audio to the host system's default output device.

Console and Serial Ports 16

Attach console and serial port devices backed by files, file handles, or the SPICE agent.

  • Cl
    VZConsoleDevicemacOS 13.0+
    @abstract Class representing a console device in a virtual machine.
  • Cl
    VZConsoleDeviceConfigurationmacOS 13.0+
    @abstract Base class for a console device configuration.
  • Cl
    VZConsolePortConfigurationmacOS 13.0+
    @abstract Base class for a console port configuration.
  • Cl
    VZVirtioConsoleDevicemacOS 13.0+
    @abstract Class representing a Virtio console device in a virtual machine.
  • Cl
    VZVirtioConsoleDeviceConfigurationmacOS 13.0+
    @abstract Virtio Console Device
  • Pr
    VZVirtioConsoleDeviceDelegatemacOS 13.0+
    @abstract Delegate object for VZVirtioConsoleDevice.
  • Cl
    VZVirtioConsoleDeviceSerialPortConfigurationmacOS 11.0+
    @abstract Virtio Console Serial Port Device
  • Cl
    VZVirtioConsolePortmacOS 13.0+
    @abstract Class representing a Virtio console port in a virtual machine.
  • Cl
    VZVirtioConsolePortArraymacOS 13.0+
    @abstract Virtio Console Port Array
  • Cl
    VZVirtioConsolePortConfigurationmacOS 13.0+
    @abstract Virtio Console Port
  • Cl
    VZVirtioConsolePortConfigurationArraymacOS 13.0+
    @abstract Virtio Console Port Configuration Array
  • Cl
    VZSerialPortConfigurationmacOS 11.0+
    @abstract Base class for a serial port configuration.
  • Cl
    VZSerialPortAttachmentmacOS 11.0+
    @abstract Base class for a serial port attachment.
  • Cl
    VZFileSerialPortAttachmentmacOS 11.0+
    @abstract File serial port attachment.
  • Cl
    VZFileHandleSerialPortAttachmentmacOS 11.0+
    @abstract File handle serial port attachment.
  • Cl
    VZSpiceAgentPortAttachmentmacOS 13.0+
    A console port attachment that connects to the SPICE agent for clipboard and other integration.

Directory Sharing 10

Share host directories with the guest through Virtio file system devices, including Rosetta support.

  • Cl
    VZDirectorySharingDevicemacOS 12.0+
    @abstract Base class representing a directory sharing device in a virtual machine.
  • Cl
    VZDirectorySharingDeviceConfigurationmacOS 12.0+
    @abstract Base class for a directory sharing device configuration.
  • Cl
    VZVirtioFileSystemDevicemacOS 12.0+
    @abstract Virtio File System Device
  • Cl
    VZVirtioFileSystemDeviceConfigurationmacOS 12.0+
    @abstract Configuration of a Virtio file system device.
  • Cl
    VZDirectorySharemacOS 12.0+
    @abstract Base class for a directory share.
  • Cl
    VZSingleDirectorySharemacOS 12.0+
    @abstract Directory share for a single directory.
  • Cl
    VZMultipleDirectorySharemacOS 12.0+
    @abstract Directory share for multiple directories.
  • Cl
    VZSharedDirectorymacOS 12.0+
    @abstract A directory on the host that can be exposed to a guest.
  • Cl
    VZLinuxRosettaDirectorySharemacOS 13.0+
    @abstract Directory share to enable Rosetta support for Linux binaries.
  • En
    VZLinuxRosettaAvailabilitymacOS 13.0+
    @abstract Availability of Rosetta support for Linux binaries.

USB Controllers and Devices 8

Configure USB controllers and attach or pass through USB devices.

  • Cl
    VZUSBControllermacOS 15.0+
    @abstract Class representing a USB controller in a virtual machine.
  • Cl
    VZUSBControllerConfigurationmacOS 15.0+
    @abstract Base class for a USB Controller configuration.
  • Cl
    VZXHCIControllermacOS 15.0+
    @abstract Class representing a USB XHCI controller in a virtual machine.
  • Cl
    VZXHCIControllerConfigurationmacOS 15.0+
    @abstract Configuration for the USB XHCI controller.
  • Pr
    VZUSBDevicemacOS 15.0+
    @abstract Protocol representing a USB Device in a virtual machine.
  • Pr
    VZUSBDeviceConfigurationmacOS 15.0+
    @abstract Protocol for USB Device configuration.
  • Cl
    VZUSBPassthroughDevicemacOS 27.0+
    @abstract Class representing a USB passthrough device.
  • Cl
    VZUSBPassthroughDeviceConfigurationmacOS 27.0+
    @abstract Configuration of a VZUSBPassthroughDevice.

Memory, Sockets, and Entropy 14

Add memory balloon, Virtio socket, and entropy devices for guest resource management and communication.

  • Cl
    VZMemoryBalloonDevicemacOS 11.0+
    @abstract Base class representing a memory balloon device in a virtual machine.
  • Cl
    VZMemoryBalloonDeviceConfigurationmacOS 11.0+
    @abstract Base class for a memory balloon device configuration.
  • Cl
    VZVirtioTraditionalMemoryBalloonDevicemacOS 11.0+
    @abstract Virtio Traditional Memory Balloon Device
  • Cl
    VZVirtioTraditionalMemoryBalloonDeviceConfigurationmacOS 11.0+
    @abstract Configuration of the Virtio traditional memory balloon device.
  • Cl
    VZGuestMemoryMappingmacOS 27.0+
    An object that represents a chunk of the guest operating system's dynamic random access memory (DRAM).
  • Cl
    VZSocketDevicemacOS 11.0+
    @abstract Base class representing a socket device in a virtual machine.
  • Cl
    VZSocketDeviceConfigurationmacOS 11.0+
    @abstract Base class for a socket device configuration.
  • Cl
    VZVirtioSocketDevicemacOS 11.0+
    @abstract Virtio Socket Device
  • Cl
    VZVirtioSocketDeviceConfigurationmacOS 11.0+
    @abstract Configuration of the Virtio socket device.
  • Cl
    VZVirtioSocketConnectionmacOS 11.0+
    @abstract The VZVirtioSocketConnection object represents a Virtio socket device's connection.
  • Cl
    VZVirtioSocketListenermacOS 11.0+
    @abstract The VZVirtioSocketListener object represents a listener for the Virtio socket device.
  • Pr
    VZVirtioSocketListenerDelegatemacOS 11.0+
    @abstract Delegate object for VZVirtioSocketListener.
  • Cl
    VZEntropyDeviceConfigurationmacOS 11.0+
    @abstract Base class for an entropy device configuration.
  • Cl
    VZVirtioEntropyDeviceConfigurationmacOS 11.0+
    @abstract Virtio Entropy Device

Custom Virtio Devices 13

Implement and provide custom Virtio devices with their queues, features, and shared memory regions.

  • Cl
    VZCustomVirtioDevicemacOS 27.0+
    An interface that represents a custom Virtio device that you provide the implementation for.
  • Cl
    VZCustomVirtioDeviceConfigurationmacOS 27.0+
    An object that defines a custom Virtio Device configuration.
  • Cl
    VZCustomVirtioDeviceProvidermacOS 27.0+
    A base class that describes the provider of a custom Virtio device.
  • Cl
    VZCustomVirtioDeviceDelegateProvidermacOS 27.0+
    A custom Virtio Device provider for devices that implement a custom Virtio device configuration delegate.
  • Pr
    VZCustomVirtioDeviceConfigurationDelegatemacOS 27.0+
    A class that conforms to the custom Virtio device configuration delegate protocol that can provide methods
  • Pr
    VZCustomVirtioDeviceDelegatemacOS 27.0+
    A delegate protocol that defines the methods you implement to respond to the life cycle events of a custom Virtio device.
  • Cl
    VZVirtioDeviceSpecificConfigurationmacOS 27.0+
    The device-specific configuration for a Virtio device
  • Cl
    VZVirtioQueuemacOS 27.0+
    A Virtio queue.
  • Cl
    VZVirtioQueueElementmacOS 27.0+
    A unit of work on a Virtio queue, also known as a descriptor chain.
  • Cl
    VZVirtioFeatureSetmacOS 27.0+
    Values that represent a set of Virtio feature bits.
  • Cl
    VZNegotiatedVirtioFeatureSetmacOS 27.0+
    Values that represent a set of negotiated Virtio feature bits.
  • Cl
    VZVirtioSharedMemoryRegionmacOS 27.0+
    A class that represents a Virtio shared memory region for a custom Virtio device in a virtual machine.
  • Cl
    VZVirtioSharedMemoryRegionConfigurationmacOS 27.0+
    The configuration of a Virtio shared memory region.

Errors 1

Errors reported by the Virtualization framework.

  • St
    VZErrormacOS 11.0+
    An error reported by the Virtualization framework.
← Low-level, Kernel & Legacy