Contents

VZMacHardwareModel

A specification for the hardware elements and configurations present in a particular Mac hardware model.

Declaration

class VZMacHardwareModel

Mentioned in

Overview

The Mac hardware model abstracts a set of virtualized hardware elements and configurations.

A version of macOS may only run on certain hardware models. Additionally, the host may also only provide certain hardware models based on the version of macOS and the underlying hardware.

The isSupported property allows you to discover if the current host supports a particular hardware model.

Choosing the hardware model starts from a restore image with VZMacOSRestoreImage. A restore image describes its supported configuration requirements through its mostFeaturefulSupportedConfiguration property.

A configuration requirements object has a corresponding hardware model that you can use to configure a VM that meets the requirements. After obtaining the hardware model, use the platform configuration’s hardwareModel to configure the Mac platform object and use init(creatingStorageAt:hardwareModel:options:) to create its auxiliary storage.

After creating the VM, use VZMacOSInstaller to install macOS on it.

If you serialize the VM on disk, preserve the hardware model used for installation for subsequent boots. The dataRepresentation property provides a unique binary representation that you serialize to the file system. You can recreate the hardware model from the serialized binary representation with init(dataRepresentation:).

Topics

Creating the hardware model

Configuring the hardware model

See Also

Related Documentation

Platform components