Contents

VZLinuxRosettaDirectoryShare

The Linux directory share for Rosetta.

Declaration

class VZLinuxRosettaDirectoryShare

Overview

This directory share exposes the Rosetta directory from the host file system to the guest. The example below shows the process of creating a VZVirtualMachineConfiguration, and then associating the Rosetta directory share with the VM configuration.

let tag = "EXAMPLE_TAG"  
let configuration = VZVirtualMachineConfiguration()
do {
    try let validationError = VZVirtioFileSystemDeviceConfiguration.validateTag(tag)
    let rosettaDirectoryShare = try VZLinuxRosettaDirectoryShare()
    let fileSystemDevice = VZVirtioFileSystemDeviceConfiguration(tag: tag)
    fileSystemDevice.share = rosettaDirectoryShare

    configuration.directorySharingDevices = [ fileSystemDevice ]
} catch VZError.invalidVirtualMachineConfiguration {
    // Rosetta is unavailable.
}

For complete instructions on installing Rosetta see Running Intel Binaries in Linux VMs with Rosetta, which includes additional information about checking for Rosetta availability, mounting the directory share, and registering the Rosetta runtime binary to run Intel binaries in a guest VM.

For information on using a custom kernel to enhance Rosetta performance, see Accelerating the performance of Rosetta.

Topics

Creating a Rosetta directory share

Checking Rosetta availability

Installing Rosetta

Setting the ahead of time (AOT) caching options

Initializers

See Also

Related Documentation

Runtime