Documentation
¶
Overview ¶
Package virtualization provides Go bindings for the Virtualization framework.
Create virtual machines and run macOS and Linux-based operating systems.
The Virtualization framework provides high-level APIs for creating and managing virtual machines (VM) on Apple silicon and Intel-based Mac computers. Use this framework to boot and run macOS or Linux-based operating systems in custom environments that you define. The framework supports the [Virtual I/O Device (VIRTIO)](<https://docs.oasis-open.org/virtio/virtio/v1.1/csprd01/virtio-v1.1-csprd01.html>) specification, which defines standard interfaces for many device types, including network, socket, serial port, storage, entropy, and memory-balloon devices.
Essentials ¶
- Adding the Virtualization Entitlement to Your Project: Configure your project to use the Virtualization framework.
- com.apple.security.virtualization: A Boolean value that indicates whether your app can use the Virtualization framework.
- Using iCloud with macOS virtual machines: Access iCloud from macOS guest virtual machines.
Virtual machine setup ¶
- Running macOS in a virtual machine on Apple silicon: Install and run macOS in a virtual machine using the Virtualization framework.
- Running Linux in a Virtual Machine: Run a Linux operating system on your Mac using the Virtualization framework.
- Running GUI Linux in a virtual machine on a Mac: Install and run GUI Linux in a virtual machine using the Virtualization framework.
- Installing macOS on a Virtual Machine: Download a macOS restore image and install it in a new VM.
- Creating and Running a Linux Virtual Machine: Design and run custom Linux guests on Apple silicon or Intel-based Mac Computers.
- Virtualize macOS on a Mac: Configure and run macOS guests on Apple silicon. (VZVirtualMachineConfiguration, VZMacOSVirtualMachineStartOptions, VZMacPlatformConfiguration, VZPlatformConfiguration, VZMacHardwareModel)
- Virtualize Linux on a Mac: Configure and run Linux guests on Apple silicon and Intel-based Mac computers. (VZVirtualMachineConfiguration, VZVirtualMachineStartOptions, VZGenericPlatformConfiguration, VZPlatformConfiguration, VZBootLoader)
- Running Intel Binaries in Linux VMs with Rosetta: Run x86_64 Linux binaries under ARM Linux on Apple silicon.
- Accelerating the performance of Rosetta: Improve Rosetta performance by adding support for the total store ordering (TSO) memory model to your Linux kernel.
Runtime ¶
- VZVirtualMachine: An object that manages the overall state and configuration of your VM. (VZVirtualMachineDelegate, VZVirtualMachineStartOptions)
- VZVirtualMachineView: A view that allows user interaction with a VM.
- VZLinuxRosettaDirectoryShare: The Linux directory share for Rosetta. (VZLinuxRosettaAvailability)
Devices ¶
- Audio: Configure audio devices that enable the guest operating system to perform audio playback and capture through the host’s audio devices. (VZVirtioSoundDeviceConfiguration, VZVirtioSoundDeviceOutputStreamConfiguration, VZVirtioSoundDeviceInputStreamConfiguration, VZAudioDeviceConfiguration, VZVirtioSoundDeviceStreamConfiguration)
- Graphics: Configure a device for a guest to display its UI. (VZGraphicsDisplayConfiguration, VZMacGraphicsDeviceConfiguration, VZMacGraphicsDisplayConfiguration, VZGraphicsDeviceConfiguration, VZVirtioGraphicsDeviceConfiguration)
- Keyboards and pointing devices: Configure devices that connect a mouse and keyboard to the guest system. (VZKeyboardConfiguration, VZMacKeyboardConfiguration, VZUSBKeyboardConfiguration, VZMacTrackpadConfiguration, VZUSBScreenCoordinatePointingDeviceConfiguration)
- Memory: Configure a memory balloon device to change the allocated memory for the guest system. (VZVirtioTraditionalMemoryBalloonDeviceConfiguration, VZMemoryBalloonDeviceConfiguration, VZVirtioTraditionalMemoryBalloonDevice, VZMemoryBalloonDevice)
- Network: Configure the devices that connect the guest system to the network. (VZVirtioNetworkDeviceConfiguration, VZNetworkDeviceConfiguration, VZMACAddress, VZBridgedNetworkDeviceAttachment, VZFileHandleNetworkDeviceAttachment)
- Randomization: Configure a device for the guest system to use to generate random numbers. (VZVirtioEntropyDeviceConfiguration, VZEntropyDeviceConfiguration)
- Serial ports: Configure the serial devices that you use to communicate with the guest system. (VZVirtioConsoleDeviceSerialPortConfiguration, VZSerialPortConfiguration, VZFileHandleSerialPortAttachment, VZFileSerialPortAttachment, VZSerialPortAttachment)
- Shared directories: Configure devices that share directories from the host into the guest system. (VZVirtioFileSystemDeviceConfiguration, VZDirectorySharingDeviceConfiguration, VZLinuxRosettaDirectoryShare, VZVirtioFileSystemDevice, VZDirectorySharingDevice)
- Sockets: Configure a device that manages port-based communication with the guest system. (VZVirtioSocketDeviceConfiguration, VZSocketDeviceConfiguration, VZVirtioSocketDevice, VZSocketDevice, VZVirtioSocketListener)
- Storage: Configure the block-storage devices that represent the disks of the guest system. (VZVirtioBlockDeviceConfiguration, VZStorageDeviceConfiguration, VZUSBMassStorageDeviceConfiguration, VZDiskImageCachingMode, VZDiskImageSynchronizationMode)
- Consoles: Configure a device that manages multiport console communication with the guest system. (VZConsoleDeviceConfiguration, VZConsolePortConfiguration, VZVirtioConsoleDeviceConfiguration, VZVirtioConsolePortConfiguration, VZVirtioConsolePortConfigurationArray)
- Clipboard sharing: Share the pasteboard between the host and guest system. (VZSpiceAgentPortAttachment)
- USB Devices (VZUSBMassStorageDevice, VZUSBControllerConfiguration, VZXHCIControllerConfiguration, VZUSBController, VZXHCIController)
Enumerations ¶
- Virtualization enumerations: Control the caching modes, disk synchronization, and macOS auxiliary storage options of VMs. (VZDiskImageCachingMode, VZDiskImageSynchronizationMode, VZDiskSynchronizationMode, VZLinuxRosettaAvailability)
Errors ¶
- VZErrorDomain: The error domain for the Virtualization framework.
- VZError: Errors that you might encounter when configuring or using a VM.
Key Types ¶
- VZVirtualMachine - An object that manages the overall state and configuration of your VM.
- VZVirtualMachineConfiguration - The environment attributes and list of devices to use during the configuration of macOS or Linux VMs.
- VZMACAddress - The media access control (MAC) address for a network interface in your virtual machine.
- VZMacOSRestoreImage - An object that describes a version of macOS to install on to a virtual machine.
- VZNetworkBlockDeviceStorageDeviceAttachment - A storage device attachment backed by a Network Block Device (NBD) client.
- VZMacAuxiliaryStorage - An object that contains information the boot loader needs for booting macOS as a guest operating system.
- VZDiskImageStorageDeviceAttachment - A device that stores content in a disk image.
- VZGenericMachineIdentifier - An object that represents a unique identifier for a virtual machine.
- VZGraphicsDisplay - A class that represents a graphics display in a VM.
- VZUSBMassStorageDevice - A class that represents a hot-pluggable USB mass storage device.
Code generated from Apple documentation. DO NOT EDIT.
Index ¶
- Variables
- func NewErrorBlock(handler ErrorHandler) (objc.ID, func())
- func NewMacOSRestoreImageErrorBlock(handler MacOSRestoreImageErrorHandler) (objc.ID, func())
- func NewVirtioSocketConnectionErrorBlock(handler VirtioSocketConnectionErrorHandler) (objc.ID, func())
- type ErrorHandler
- type IVZAudioDeviceConfiguration
- type IVZAudioInputStreamSource
- type IVZAudioOutputStreamSink
- type IVZBootLoader
- type IVZBridgedNetworkDeviceAttachment
- type IVZBridgedNetworkInterface
- type IVZConsoleDevice
- type IVZConsoleDeviceConfiguration
- type IVZConsolePortConfiguration
- type IVZDirectoryShare
- type IVZDirectorySharingDevice
- type IVZDirectorySharingDeviceConfiguration
- type IVZDiskBlockDeviceStorageDeviceAttachment
- type IVZDiskImageStorageDeviceAttachment
- type IVZEFIBootLoader
- type IVZEFIVariableStore
- type IVZEntropyDeviceConfiguration
- type IVZFileHandleNetworkDeviceAttachment
- type IVZFileHandleSerialPortAttachment
- type IVZFileSerialPortAttachment
- type IVZGenericMachineIdentifier
- type IVZGenericPlatformConfiguration
- type IVZGraphicsDevice
- type IVZGraphicsDeviceConfiguration
- type IVZGraphicsDisplay
- type IVZGraphicsDisplayConfiguration
- type IVZHostAudioInputStreamSource
- type IVZHostAudioOutputStreamSink
- type IVZKeyboardConfiguration
- type IVZLinuxBootLoader
- type IVZLinuxRosettaAbstractSocketCachingOptions
- type IVZLinuxRosettaCachingOptions
- type IVZLinuxRosettaDirectoryShare
- type IVZLinuxRosettaUnixSocketCachingOptions
- type IVZMACAddress
- type IVZMacAuxiliaryStorage
- type IVZMacGraphicsDevice
- type IVZMacGraphicsDeviceConfiguration
- type IVZMacGraphicsDisplay
- type IVZMacGraphicsDisplayConfiguration
- type IVZMacHardwareModel
- type IVZMacKeyboardConfiguration
- type IVZMacMachineIdentifier
- type IVZMacOSBootLoader
- type IVZMacOSConfigurationRequirements
- type IVZMacOSInstaller
- type IVZMacOSRestoreImage
- type IVZMacOSVirtualMachineStartOptions
- type IVZMacPlatformConfiguration
- type IVZMacTrackpadConfiguration
- type IVZMemoryBalloonDevice
- type IVZMemoryBalloonDeviceConfiguration
- type IVZMultipleDirectoryShare
- type IVZNATNetworkDeviceAttachment
- type IVZNVMExpressControllerDeviceConfiguration
- type IVZNetworkBlockDeviceStorageDeviceAttachment
- type IVZNetworkDevice
- type IVZNetworkDeviceAttachment
- type IVZNetworkDeviceConfiguration
- type IVZPlatformConfiguration
- type IVZPointingDeviceConfiguration
- type IVZSerialPortAttachment
- type IVZSerialPortConfiguration
- type IVZSharedDirectory
- type IVZSingleDirectoryShare
- type IVZSocketDevice
- type IVZSocketDeviceConfiguration
- type IVZSpiceAgentPortAttachment
- type IVZStorageDevice
- type IVZStorageDeviceAttachment
- type IVZStorageDeviceConfiguration
- type IVZUSBController
- type IVZUSBControllerConfiguration
- type IVZUSBKeyboardConfiguration
- type IVZUSBMassStorageDevice
- type IVZUSBMassStorageDeviceConfiguration
- type IVZUSBScreenCoordinatePointingDeviceConfiguration
- type IVZVirtioBlockDeviceConfiguration
- type IVZVirtioConsoleDevice
- type IVZVirtioConsoleDeviceConfiguration
- type IVZVirtioConsoleDeviceSerialPortConfiguration
- type IVZVirtioConsolePort
- type IVZVirtioConsolePortArray
- type IVZVirtioConsolePortConfiguration
- type IVZVirtioConsolePortConfigurationArray
- type IVZVirtioEntropyDeviceConfiguration
- type IVZVirtioFileSystemDevice
- type IVZVirtioFileSystemDeviceConfiguration
- type IVZVirtioGraphicsDevice
- type IVZVirtioGraphicsDeviceConfiguration
- type IVZVirtioGraphicsScanout
- type IVZVirtioGraphicsScanoutConfiguration
- type IVZVirtioNetworkDeviceConfiguration
- type IVZVirtioSocketConnection
- type IVZVirtioSocketDevice
- type IVZVirtioSocketDeviceConfiguration
- type IVZVirtioSocketListener
- type IVZVirtioSoundDeviceConfiguration
- type IVZVirtioSoundDeviceInputStreamConfiguration
- type IVZVirtioSoundDeviceOutputStreamConfiguration
- type IVZVirtioSoundDeviceStreamConfiguration
- type IVZVirtioTraditionalMemoryBalloonDevice
- type IVZVirtioTraditionalMemoryBalloonDeviceConfiguration
- type IVZVirtualMachine
- type IVZVirtualMachineConfiguration
- type IVZVirtualMachineStartOptions
- type IVZVirtualMachineView
- type IVZVmnetNetworkDeviceAttachment
- type IVZXHCIController
- type IVZXHCIControllerConfiguration
- type MacOSRestoreImageErrorHandler
- type VZAudioDeviceConfiguration
- type VZAudioDeviceConfigurationClass
- type VZAudioInputStreamSource
- type VZAudioInputStreamSourceClass
- type VZAudioOutputStreamSink
- type VZAudioOutputStreamSinkClass
- type VZBootLoader
- type VZBootLoaderClass
- type VZBridgedNetworkDeviceAttachment
- func (b VZBridgedNetworkDeviceAttachment) Attachment() IVZNetworkDeviceAttachment
- func (b VZBridgedNetworkDeviceAttachment) Autorelease() VZBridgedNetworkDeviceAttachment
- func (b VZBridgedNetworkDeviceAttachment) Init() VZBridgedNetworkDeviceAttachment
- func (b VZBridgedNetworkDeviceAttachment) InitWithInterface(interface_ IVZBridgedNetworkInterface) VZBridgedNetworkDeviceAttachment
- func (b VZBridgedNetworkDeviceAttachment) Interface() IVZBridgedNetworkInterface
- func (b VZBridgedNetworkDeviceAttachment) NetworkDevices() IVZNetworkDeviceConfiguration
- func (b VZBridgedNetworkDeviceAttachment) SetAttachment(value IVZNetworkDeviceAttachment)
- func (b VZBridgedNetworkDeviceAttachment) SetNetworkDevices(value IVZNetworkDeviceConfiguration)
- type VZBridgedNetworkDeviceAttachmentClass
- func (vc VZBridgedNetworkDeviceAttachmentClass) Alloc() VZBridgedNetworkDeviceAttachment
- func (_VZBridgedNetworkDeviceAttachmentClass VZBridgedNetworkDeviceAttachmentClass) NetworkInterfaces() VZBridgedNetworkInterface
- func (_VZBridgedNetworkDeviceAttachmentClass VZBridgedNetworkDeviceAttachmentClass) SetNetworkInterfaces(value VZBridgedNetworkInterface)
- type VZBridgedNetworkInterface
- type VZBridgedNetworkInterfaceClass
- type VZConsoleDevice
- type VZConsoleDeviceClass
- type VZConsoleDeviceConfiguration
- type VZConsoleDeviceConfigurationClass
- type VZConsolePortConfiguration
- func (c VZConsolePortConfiguration) Attachment() IVZSerialPortAttachment
- func (c VZConsolePortConfiguration) Autorelease() VZConsolePortConfiguration
- func (c VZConsolePortConfiguration) Init() VZConsolePortConfiguration
- func (c VZConsolePortConfiguration) SetAttachment(value IVZSerialPortAttachment)
- type VZConsolePortConfigurationClass
- type VZDirectoryShare
- type VZDirectoryShareClass
- type VZDirectorySharingDevice
- type VZDirectorySharingDeviceClass
- type VZDirectorySharingDeviceConfiguration
- type VZDirectorySharingDeviceConfigurationClass
- type VZDiskBlockDeviceStorageDeviceAttachment
- func NewDiskBlockDeviceStorageDeviceAttachmentWithFileHandleReadOnlySynchronizationModeError(fileHandle foundation.NSFileHandle, readOnly bool, ...) (VZDiskBlockDeviceStorageDeviceAttachment, error)
- func NewVZDiskBlockDeviceStorageDeviceAttachment() VZDiskBlockDeviceStorageDeviceAttachment
- func VZDiskBlockDeviceStorageDeviceAttachmentFromID(id objc.ID) VZDiskBlockDeviceStorageDeviceAttachment
- func (d VZDiskBlockDeviceStorageDeviceAttachment) Autorelease() VZDiskBlockDeviceStorageDeviceAttachment
- func (d VZDiskBlockDeviceStorageDeviceAttachment) FileHandle() foundation.NSFileHandle
- func (d VZDiskBlockDeviceStorageDeviceAttachment) Init() VZDiskBlockDeviceStorageDeviceAttachment
- func (d VZDiskBlockDeviceStorageDeviceAttachment) InitWithFileHandleReadOnlySynchronizationModeError(fileHandle foundation.NSFileHandle, readOnly bool, ...) (VZDiskBlockDeviceStorageDeviceAttachment, error)
- func (d VZDiskBlockDeviceStorageDeviceAttachment) ReadOnly() bool
- func (d VZDiskBlockDeviceStorageDeviceAttachment) SynchronizationMode() VZDiskSynchronizationMode
- type VZDiskBlockDeviceStorageDeviceAttachmentClass
- type VZDiskImageCachingMode
- type VZDiskImageStorageDeviceAttachment
- func NewDiskImageStorageDeviceAttachmentWithURLReadOnlyCachingModeSynchronizationModeError(url foundation.INSURL, readOnly bool, cachingMode VZDiskImageCachingMode, ...) (VZDiskImageStorageDeviceAttachment, error)
- func NewDiskImageStorageDeviceAttachmentWithURLReadOnlyError(url foundation.INSURL, readOnly bool) (VZDiskImageStorageDeviceAttachment, error)
- func NewVZDiskImageStorageDeviceAttachment() VZDiskImageStorageDeviceAttachment
- func VZDiskImageStorageDeviceAttachmentFromID(id objc.ID) VZDiskImageStorageDeviceAttachment
- func (d VZDiskImageStorageDeviceAttachment) Autorelease() VZDiskImageStorageDeviceAttachment
- func (d VZDiskImageStorageDeviceAttachment) CachingMode() VZDiskImageCachingMode
- func (d VZDiskImageStorageDeviceAttachment) Init() VZDiskImageStorageDeviceAttachment
- func (d VZDiskImageStorageDeviceAttachment) InitWithURLReadOnlyCachingModeSynchronizationModeError(url foundation.INSURL, readOnly bool, cachingMode VZDiskImageCachingMode, ...) (VZDiskImageStorageDeviceAttachment, error)
- func (d VZDiskImageStorageDeviceAttachment) InitWithURLReadOnlyError(url foundation.INSURL, readOnly bool) (VZDiskImageStorageDeviceAttachment, error)
- func (d VZDiskImageStorageDeviceAttachment) ReadOnly() bool
- func (d VZDiskImageStorageDeviceAttachment) SynchronizationMode() VZDiskImageSynchronizationMode
- func (d VZDiskImageStorageDeviceAttachment) URL() foundation.INSURL
- type VZDiskImageStorageDeviceAttachmentClass
- type VZDiskImageSynchronizationMode
- type VZDiskSynchronizationMode
- type VZEFIBootLoader
- type VZEFIBootLoaderClass
- type VZEFIVariableStore
- func NewEFIVariableStoreCreatingVariableStoreAtURLOptionsError(URL foundation.INSURL, options VZEFIVariableStoreInitializationOptions) (VZEFIVariableStore, error)
- func NewEFIVariableStoreWithURL(URL foundation.INSURL) VZEFIVariableStore
- func NewVZEFIVariableStore() VZEFIVariableStore
- func VZEFIVariableStoreFromID(id objc.ID) VZEFIVariableStore
- func (e VZEFIVariableStore) Autorelease() VZEFIVariableStore
- func (e VZEFIVariableStore) Init() VZEFIVariableStore
- func (e VZEFIVariableStore) InitCreatingVariableStoreAtURLOptionsError(URL foundation.INSURL, options VZEFIVariableStoreInitializationOptions) (VZEFIVariableStore, error)
- func (e VZEFIVariableStore) InitWithURL(URL foundation.INSURL) VZEFIVariableStore
- func (e VZEFIVariableStore) URL() foundation.INSURL
- type VZEFIVariableStoreClass
- type VZEFIVariableStoreInitializationOptions
- type VZEntropyDeviceConfiguration
- type VZEntropyDeviceConfigurationClass
- type VZErrorCode
- type VZFileHandleNetworkDeviceAttachment
- func NewFileHandleNetworkDeviceAttachmentWithFileHandle(fileHandle foundation.NSFileHandle) VZFileHandleNetworkDeviceAttachment
- func NewVZFileHandleNetworkDeviceAttachment() VZFileHandleNetworkDeviceAttachment
- func VZFileHandleNetworkDeviceAttachmentFromID(id objc.ID) VZFileHandleNetworkDeviceAttachment
- func (f VZFileHandleNetworkDeviceAttachment) Attachment() IVZNetworkDeviceAttachment
- func (f VZFileHandleNetworkDeviceAttachment) Autorelease() VZFileHandleNetworkDeviceAttachment
- func (f VZFileHandleNetworkDeviceAttachment) FileHandle() foundation.NSFileHandle
- func (f VZFileHandleNetworkDeviceAttachment) Init() VZFileHandleNetworkDeviceAttachment
- func (f VZFileHandleNetworkDeviceAttachment) InitWithFileHandle(fileHandle foundation.NSFileHandle) VZFileHandleNetworkDeviceAttachment
- func (f VZFileHandleNetworkDeviceAttachment) MaximumTransmissionUnit() int
- func (f VZFileHandleNetworkDeviceAttachment) NetworkDevices() IVZNetworkDeviceConfiguration
- func (f VZFileHandleNetworkDeviceAttachment) SetAttachment(value IVZNetworkDeviceAttachment)
- func (f VZFileHandleNetworkDeviceAttachment) SetMaximumTransmissionUnit(value int)
- func (f VZFileHandleNetworkDeviceAttachment) SetNetworkDevices(value IVZNetworkDeviceConfiguration)
- type VZFileHandleNetworkDeviceAttachmentClass
- type VZFileHandleSerialPortAttachment
- func NewFileHandleSerialPortAttachmentWithFileHandleForReadingFileHandleForWriting(fileHandleForReading foundation.NSFileHandle, ...) VZFileHandleSerialPortAttachment
- func NewVZFileHandleSerialPortAttachment() VZFileHandleSerialPortAttachment
- func VZFileHandleSerialPortAttachmentFromID(id objc.ID) VZFileHandleSerialPortAttachment
- func (f VZFileHandleSerialPortAttachment) Autorelease() VZFileHandleSerialPortAttachment
- func (f VZFileHandleSerialPortAttachment) FileHandleForReading() foundation.NSFileHandle
- func (f VZFileHandleSerialPortAttachment) FileHandleForWriting() foundation.NSFileHandle
- func (f VZFileHandleSerialPortAttachment) Init() VZFileHandleSerialPortAttachment
- func (f VZFileHandleSerialPortAttachment) InitWithFileHandleForReadingFileHandleForWriting(fileHandleForReading foundation.NSFileHandle, ...) VZFileHandleSerialPortAttachment
- type VZFileHandleSerialPortAttachmentClass
- type VZFileSerialPortAttachment
- func (f VZFileSerialPortAttachment) Append() bool
- func (f VZFileSerialPortAttachment) Autorelease() VZFileSerialPortAttachment
- func (f VZFileSerialPortAttachment) Init() VZFileSerialPortAttachment
- func (f VZFileSerialPortAttachment) InitWithURLAppendError(url foundation.INSURL, shouldAppend bool) (VZFileSerialPortAttachment, error)
- func (f VZFileSerialPortAttachment) URL() foundation.INSURL
- type VZFileSerialPortAttachmentClass
- type VZGenericMachineIdentifier
- func (g VZGenericMachineIdentifier) Autorelease() VZGenericMachineIdentifier
- func (g VZGenericMachineIdentifier) DataRepresentation() foundation.INSData
- func (g VZGenericMachineIdentifier) Init() VZGenericMachineIdentifier
- func (g VZGenericMachineIdentifier) InitWithDataRepresentation(dataRepresentation foundation.INSData) VZGenericMachineIdentifier
- func (g VZGenericMachineIdentifier) IsNestedVirtualizationEnabled() bool
- func (g VZGenericMachineIdentifier) MachineIdentifier() IVZGenericMachineIdentifier
- func (g VZGenericMachineIdentifier) SetIsNestedVirtualizationEnabled(value bool)
- func (g VZGenericMachineIdentifier) SetMachineIdentifier(value IVZGenericMachineIdentifier)
- type VZGenericMachineIdentifierClass
- func (vc VZGenericMachineIdentifierClass) Alloc() VZGenericMachineIdentifier
- func (_VZGenericMachineIdentifierClass VZGenericMachineIdentifierClass) IsNestedVirtualizationSupported() bool
- func (_VZGenericMachineIdentifierClass VZGenericMachineIdentifierClass) SetIsNestedVirtualizationSupported(value bool)
- type VZGenericPlatformConfiguration
- func (g VZGenericPlatformConfiguration) Autorelease() VZGenericPlatformConfiguration
- func (g VZGenericPlatformConfiguration) Init() VZGenericPlatformConfiguration
- func (g VZGenericPlatformConfiguration) MachineIdentifier() IVZGenericMachineIdentifier
- func (g VZGenericPlatformConfiguration) NestedVirtualizationEnabled() bool
- func (g VZGenericPlatformConfiguration) SetMachineIdentifier(value IVZGenericMachineIdentifier)
- func (g VZGenericPlatformConfiguration) SetNestedVirtualizationEnabled(value bool)
- type VZGenericPlatformConfigurationClass
- type VZGraphicsDevice
- type VZGraphicsDeviceClass
- type VZGraphicsDeviceConfiguration
- type VZGraphicsDeviceConfigurationClass
- type VZGraphicsDisplay
- func (g VZGraphicsDisplay) AddObserver(observer VZGraphicsDisplayObserver)
- func (g VZGraphicsDisplay) Autorelease() VZGraphicsDisplay
- func (g VZGraphicsDisplay) Displays() IVZGraphicsDisplay
- func (g VZGraphicsDisplay) Init() VZGraphicsDisplay
- func (g VZGraphicsDisplay) ReconfigureWithConfigurationError(configuration IVZGraphicsDisplayConfiguration) (bool, error)
- func (g VZGraphicsDisplay) ReconfigureWithSizeInPixelsError(sizeInPixels corefoundation.CGSize) (bool, error)
- func (g VZGraphicsDisplay) RemoveObserver(observer VZGraphicsDisplayObserver)
- func (g VZGraphicsDisplay) SetDisplays(value IVZGraphicsDisplay)
- func (g VZGraphicsDisplay) SizeInPixels() corefoundation.CGSize
- type VZGraphicsDisplayClass
- type VZGraphicsDisplayConfiguration
- type VZGraphicsDisplayConfigurationClass
- type VZGraphicsDisplayObserver
- type VZGraphicsDisplayObserverObject
- type VZHostAudioInputStreamSource
- type VZHostAudioInputStreamSourceClass
- type VZHostAudioOutputStreamSink
- type VZHostAudioOutputStreamSinkClass
- type VZKeyboardConfiguration
- type VZKeyboardConfigurationClass
- type VZLinuxBootLoader
- func (l VZLinuxBootLoader) Autorelease() VZLinuxBootLoader
- func (l VZLinuxBootLoader) BootLoader() IVZBootLoader
- func (l VZLinuxBootLoader) CommandLine() string
- func (l VZLinuxBootLoader) Init() VZLinuxBootLoader
- func (l VZLinuxBootLoader) InitWithKernelURL(kernelURL foundation.INSURL) VZLinuxBootLoader
- func (l VZLinuxBootLoader) InitialRamdiskURL() foundation.INSURL
- func (l VZLinuxBootLoader) KernelURL() foundation.INSURL
- func (l VZLinuxBootLoader) SetBootLoader(value IVZBootLoader)
- func (l VZLinuxBootLoader) SetCommandLine(value string)
- func (l VZLinuxBootLoader) SetInitialRamdiskURL(value foundation.INSURL)
- func (l VZLinuxBootLoader) SetKernelURL(value foundation.INSURL)
- type VZLinuxBootLoaderClass
- type VZLinuxRosettaAbstractSocketCachingOptions
- func NewLinuxRosettaAbstractSocketCachingOptionsWithNameError(name string) (VZLinuxRosettaAbstractSocketCachingOptions, error)
- func NewVZLinuxRosettaAbstractSocketCachingOptions() VZLinuxRosettaAbstractSocketCachingOptions
- func VZLinuxRosettaAbstractSocketCachingOptionsFromID(id objc.ID) VZLinuxRosettaAbstractSocketCachingOptions
- func (l VZLinuxRosettaAbstractSocketCachingOptions) Autorelease() VZLinuxRosettaAbstractSocketCachingOptions
- func (l VZLinuxRosettaAbstractSocketCachingOptions) Init() VZLinuxRosettaAbstractSocketCachingOptions
- func (l VZLinuxRosettaAbstractSocketCachingOptions) InitWithNameError(name string) (VZLinuxRosettaAbstractSocketCachingOptions, error)
- func (l VZLinuxRosettaAbstractSocketCachingOptions) Name() string
- type VZLinuxRosettaAbstractSocketCachingOptionsClass
- type VZLinuxRosettaAvailability
- type VZLinuxRosettaCachingOptions
- type VZLinuxRosettaCachingOptionsClass
- type VZLinuxRosettaDirectoryShare
- func (l VZLinuxRosettaDirectoryShare) Autorelease() VZLinuxRosettaDirectoryShare
- func (l VZLinuxRosettaDirectoryShare) CachingOptions() uint
- func (l VZLinuxRosettaDirectoryShare) Init() VZLinuxRosettaDirectoryShare
- func (l VZLinuxRosettaDirectoryShare) InitWithError() (VZLinuxRosettaDirectoryShare, error)
- func (l VZLinuxRosettaDirectoryShare) Options() IVZLinuxRosettaCachingOptions
- func (l VZLinuxRosettaDirectoryShare) SetCachingOptions(value uint)
- func (l VZLinuxRosettaDirectoryShare) SetOptions(value IVZLinuxRosettaCachingOptions)
- type VZLinuxRosettaDirectoryShareClass
- func (vc VZLinuxRosettaDirectoryShareClass) Alloc() VZLinuxRosettaDirectoryShare
- func (_VZLinuxRosettaDirectoryShareClass VZLinuxRosettaDirectoryShareClass) Availability() VZLinuxRosettaAvailability
- func (lc VZLinuxRosettaDirectoryShareClass) InstallRosetta(ctx context.Context) error
- func (_VZLinuxRosettaDirectoryShareClass VZLinuxRosettaDirectoryShareClass) InstallRosettaWithCompletionHandler(completionHandler ErrorHandler)
- type VZLinuxRosettaUnixSocketCachingOptions
- func NewLinuxRosettaUnixSocketCachingOptionsWithPathError(path string) (VZLinuxRosettaUnixSocketCachingOptions, error)
- func NewVZLinuxRosettaUnixSocketCachingOptions() VZLinuxRosettaUnixSocketCachingOptions
- func VZLinuxRosettaUnixSocketCachingOptionsFromID(id objc.ID) VZLinuxRosettaUnixSocketCachingOptions
- func (l VZLinuxRosettaUnixSocketCachingOptions) Autorelease() VZLinuxRosettaUnixSocketCachingOptions
- func (l VZLinuxRosettaUnixSocketCachingOptions) Init() VZLinuxRosettaUnixSocketCachingOptions
- func (l VZLinuxRosettaUnixSocketCachingOptions) InitWithPathError(path string) (VZLinuxRosettaUnixSocketCachingOptions, error)
- func (l VZLinuxRosettaUnixSocketCachingOptions) Path() string
- type VZLinuxRosettaUnixSocketCachingOptionsClass
- type VZMACAddress
- func (m VZMACAddress) Autorelease() VZMACAddress
- func (m VZMACAddress) EthernetAddress() [6]byte
- func (m VZMACAddress) Init() VZMACAddress
- func (m VZMACAddress) InitWithEthernetAddress(ethernetAddress unsafe.Pointer) VZMACAddress
- func (m VZMACAddress) InitWithString(string_ string) VZMACAddress
- func (m VZMACAddress) IsBroadcastAddress() bool
- func (m VZMACAddress) IsLocallyAdministeredAddress() bool
- func (m VZMACAddress) IsMulticastAddress() bool
- func (m VZMACAddress) IsUnicastAddress() bool
- func (m VZMACAddress) IsUniversallyAdministeredAddress() bool
- func (m VZMACAddress) String() string
- type VZMACAddressClass
- type VZMacAuxiliaryStorage
- func NewMacAuxiliaryStorageCreatingStorageAtURLHardwareModelOptionsError(URL foundation.INSURL, hardwareModel IVZMacHardwareModel, ...) (VZMacAuxiliaryStorage, error)
- func NewMacAuxiliaryStorageWithContentsOfURL(URL foundation.INSURL) VZMacAuxiliaryStorage
- func NewMacAuxiliaryStorageWithURL(URL foundation.INSURL) VZMacAuxiliaryStorage
- func NewVZMacAuxiliaryStorage() VZMacAuxiliaryStorage
- func VZMacAuxiliaryStorageFromID(id objc.ID) VZMacAuxiliaryStorage
- func (m VZMacAuxiliaryStorage) Autorelease() VZMacAuxiliaryStorage
- func (m VZMacAuxiliaryStorage) AuxiliaryStorage() IVZMacAuxiliaryStorage
- func (m VZMacAuxiliaryStorage) HardwareModel() IVZMacHardwareModel
- func (m VZMacAuxiliaryStorage) Init() VZMacAuxiliaryStorage
- func (m VZMacAuxiliaryStorage) InitCreatingStorageAtURLHardwareModelOptionsError(URL foundation.INSURL, hardwareModel IVZMacHardwareModel, ...) (VZMacAuxiliaryStorage, error)
- func (m VZMacAuxiliaryStorage) InitWithURL(URL foundation.INSURL) VZMacAuxiliaryStorage
- func (m VZMacAuxiliaryStorage) MostFeaturefulSupportedConfiguration() IVZMacOSConfigurationRequirements
- func (m VZMacAuxiliaryStorage) SetAuxiliaryStorage(value IVZMacAuxiliaryStorage)
- func (m VZMacAuxiliaryStorage) SetHardwareModel(value IVZMacHardwareModel)
- func (m VZMacAuxiliaryStorage) SetMostFeaturefulSupportedConfiguration(value IVZMacOSConfigurationRequirements)
- func (m VZMacAuxiliaryStorage) URL() foundation.INSURL
- type VZMacAuxiliaryStorageClass
- type VZMacAuxiliaryStorageInitializationOptions
- type VZMacGraphicsDevice
- type VZMacGraphicsDeviceClass
- type VZMacGraphicsDeviceConfiguration
- func (m VZMacGraphicsDeviceConfiguration) Autorelease() VZMacGraphicsDeviceConfiguration
- func (m VZMacGraphicsDeviceConfiguration) Displays() []VZMacGraphicsDisplayConfiguration
- func (m VZMacGraphicsDeviceConfiguration) Init() VZMacGraphicsDeviceConfiguration
- func (m VZMacGraphicsDeviceConfiguration) SetDisplays(value []VZMacGraphicsDisplayConfiguration)
- type VZMacGraphicsDeviceConfigurationClass
- type VZMacGraphicsDisplay
- type VZMacGraphicsDisplayClass
- type VZMacGraphicsDisplayConfiguration
- func NewMacGraphicsDisplayConfigurationForScreenSizeInPoints(screen appkit.NSScreen, sizeInPoints corefoundation.CGSize) VZMacGraphicsDisplayConfiguration
- func NewMacGraphicsDisplayConfigurationWithWidthInPixelsHeightInPixelsPixelsPerInch(widthInPixels int, heightInPixels int, pixelsPerInch int) VZMacGraphicsDisplayConfiguration
- func NewVZMacGraphicsDisplayConfiguration() VZMacGraphicsDisplayConfiguration
- func VZMacGraphicsDisplayConfigurationFromID(id objc.ID) VZMacGraphicsDisplayConfiguration
- func (m VZMacGraphicsDisplayConfiguration) Autorelease() VZMacGraphicsDisplayConfiguration
- func (m VZMacGraphicsDisplayConfiguration) HeightInPixels() int
- func (m VZMacGraphicsDisplayConfiguration) Init() VZMacGraphicsDisplayConfiguration
- func (m VZMacGraphicsDisplayConfiguration) InitForScreenSizeInPoints(screen appkit.NSScreen, sizeInPoints corefoundation.CGSize) VZMacGraphicsDisplayConfiguration
- func (m VZMacGraphicsDisplayConfiguration) InitWithWidthInPixelsHeightInPixelsPixelsPerInch(widthInPixels int, heightInPixels int, pixelsPerInch int) VZMacGraphicsDisplayConfiguration
- func (m VZMacGraphicsDisplayConfiguration) PixelsPerInch() int
- func (m VZMacGraphicsDisplayConfiguration) SetHeightInPixels(value int)
- func (m VZMacGraphicsDisplayConfiguration) SetPixelsPerInch(value int)
- func (m VZMacGraphicsDisplayConfiguration) SetWidthInPixels(value int)
- func (m VZMacGraphicsDisplayConfiguration) WidthInPixels() int
- type VZMacGraphicsDisplayConfigurationClass
- type VZMacHardwareModel
- func (m VZMacHardwareModel) Autorelease() VZMacHardwareModel
- func (m VZMacHardwareModel) DataRepresentation() foundation.INSData
- func (m VZMacHardwareModel) HardwareModel() IVZMacHardwareModel
- func (m VZMacHardwareModel) Init() VZMacHardwareModel
- func (m VZMacHardwareModel) InitWithDataRepresentation(dataRepresentation foundation.INSData) VZMacHardwareModel
- func (m VZMacHardwareModel) MostFeaturefulSupportedConfiguration() IVZMacOSConfigurationRequirements
- func (m VZMacHardwareModel) SetHardwareModel(value IVZMacHardwareModel)
- func (m VZMacHardwareModel) SetMostFeaturefulSupportedConfiguration(value IVZMacOSConfigurationRequirements)
- func (m VZMacHardwareModel) Supported() bool
- type VZMacHardwareModelClass
- type VZMacKeyboardConfiguration
- type VZMacKeyboardConfigurationClass
- type VZMacMachineIdentifier
- func (m VZMacMachineIdentifier) Autorelease() VZMacMachineIdentifier
- func (m VZMacMachineIdentifier) DataRepresentation() foundation.INSData
- func (m VZMacMachineIdentifier) Init() VZMacMachineIdentifier
- func (m VZMacMachineIdentifier) InitWithDataRepresentation(dataRepresentation foundation.INSData) VZMacMachineIdentifier
- type VZMacMachineIdentifierClass
- type VZMacOSBootLoader
- type VZMacOSBootLoaderClass
- type VZMacOSConfigurationRequirements
- func (m VZMacOSConfigurationRequirements) Autorelease() VZMacOSConfigurationRequirements
- func (m VZMacOSConfigurationRequirements) HardwareModel() IVZMacHardwareModel
- func (m VZMacOSConfigurationRequirements) Init() VZMacOSConfigurationRequirements
- func (m VZMacOSConfigurationRequirements) MinimumSupportedCPUCount() uint
- func (m VZMacOSConfigurationRequirements) MinimumSupportedMemorySize() uint64
- type VZMacOSConfigurationRequirementsClass
- type VZMacOSInstaller
- func (m VZMacOSInstaller) Autorelease() VZMacOSInstaller
- func (m VZMacOSInstaller) Init() VZMacOSInstaller
- func (m VZMacOSInstaller) InitWithVirtualMachineRestoreImageURL(virtualMachine IVZVirtualMachine, restoreImageFileURL foundation.INSURL) VZMacOSInstaller
- func (m VZMacOSInstaller) Install(ctx context.Context) error
- func (m VZMacOSInstaller) InstallWithCompletionHandler(completionHandler ErrorHandler)
- func (m VZMacOSInstaller) Progress() foundation.NSProgress
- func (m VZMacOSInstaller) RestoreImageURL() foundation.INSURL
- func (m VZMacOSInstaller) VirtualMachine() IVZVirtualMachine
- type VZMacOSInstallerClass
- type VZMacOSRestoreImage
- func (m VZMacOSRestoreImage) Autorelease() VZMacOSRestoreImage
- func (m VZMacOSRestoreImage) BuildVersion() string
- func (m VZMacOSRestoreImage) HardwareModel() IVZMacHardwareModel
- func (m VZMacOSRestoreImage) Init() VZMacOSRestoreImage
- func (m VZMacOSRestoreImage) MostFeaturefulSupportedConfiguration() IVZMacOSConfigurationRequirements
- func (m VZMacOSRestoreImage) OperatingSystemVersion() foundation.NSOperatingSystemVersion
- func (m VZMacOSRestoreImage) SetHardwareModel(value IVZMacHardwareModel)
- func (m VZMacOSRestoreImage) Supported() bool
- func (m VZMacOSRestoreImage) URL() foundation.INSURL
- type VZMacOSRestoreImageClass
- func (vc VZMacOSRestoreImageClass) Alloc() VZMacOSRestoreImage
- func (mc VZMacOSRestoreImageClass) FetchLatestSupported(ctx context.Context) (*VZMacOSRestoreImage, error)
- func (_VZMacOSRestoreImageClass VZMacOSRestoreImageClass) FetchLatestSupportedWithCompletionHandler(completionHandler MacOSRestoreImageErrorHandler)
- func (_VZMacOSRestoreImageClass VZMacOSRestoreImageClass) LatestSupported() VZMacOSRestoreImage
- func (mc VZMacOSRestoreImageClass) LoadFileURL(ctx context.Context, fileURL foundation.INSURL) (*VZMacOSRestoreImage, error)
- func (_VZMacOSRestoreImageClass VZMacOSRestoreImageClass) LoadFileURLCompletionHandler(fileURL foundation.INSURL, completionHandler MacOSRestoreImageErrorHandler)
- func (_VZMacOSRestoreImageClass VZMacOSRestoreImageClass) SetLatestSupported(value VZMacOSRestoreImage)
- type VZMacOSVirtualMachineStartOptions
- func (m VZMacOSVirtualMachineStartOptions) Autorelease() VZMacOSVirtualMachineStartOptions
- func (m VZMacOSVirtualMachineStartOptions) Init() VZMacOSVirtualMachineStartOptions
- func (m VZMacOSVirtualMachineStartOptions) SetStartUpFromMacOSRecovery(value bool)
- func (m VZMacOSVirtualMachineStartOptions) StartUpFromMacOSRecovery() bool
- type VZMacOSVirtualMachineStartOptionsClass
- type VZMacPlatformConfiguration
- func (m VZMacPlatformConfiguration) Autorelease() VZMacPlatformConfiguration
- func (m VZMacPlatformConfiguration) AuxiliaryStorage() IVZMacAuxiliaryStorage
- func (m VZMacPlatformConfiguration) HardwareModel() IVZMacHardwareModel
- func (m VZMacPlatformConfiguration) Init() VZMacPlatformConfiguration
- func (m VZMacPlatformConfiguration) MachineIdentifier() IVZMacMachineIdentifier
- func (m VZMacPlatformConfiguration) MostFeaturefulSupportedConfiguration() IVZMacOSConfigurationRequirements
- func (m VZMacPlatformConfiguration) SetAuxiliaryStorage(value IVZMacAuxiliaryStorage)
- func (m VZMacPlatformConfiguration) SetHardwareModel(value IVZMacHardwareModel)
- func (m VZMacPlatformConfiguration) SetMachineIdentifier(value IVZMacMachineIdentifier)
- func (m VZMacPlatformConfiguration) SetMostFeaturefulSupportedConfiguration(value IVZMacOSConfigurationRequirements)
- type VZMacPlatformConfigurationClass
- type VZMacTrackpadConfiguration
- func (m VZMacTrackpadConfiguration) Autorelease() VZMacTrackpadConfiguration
- func (m VZMacTrackpadConfiguration) Init() VZMacTrackpadConfiguration
- func (m VZMacTrackpadConfiguration) PointingDevices() IVZPointingDeviceConfiguration
- func (m VZMacTrackpadConfiguration) SetPointingDevices(value IVZPointingDeviceConfiguration)
- type VZMacTrackpadConfigurationClass
- type VZMemoryBalloonDevice
- func (m VZMemoryBalloonDevice) Autorelease() VZMemoryBalloonDevice
- func (m VZMemoryBalloonDevice) Init() VZMemoryBalloonDevice
- func (m VZMemoryBalloonDevice) MemoryBalloonDevices() IVZMemoryBalloonDeviceConfiguration
- func (m VZMemoryBalloonDevice) SetMemoryBalloonDevices(value IVZMemoryBalloonDeviceConfiguration)
- type VZMemoryBalloonDeviceClass
- type VZMemoryBalloonDeviceConfiguration
- type VZMemoryBalloonDeviceConfigurationClass
- type VZMultipleDirectoryShare
- func (m VZMultipleDirectoryShare) Autorelease() VZMultipleDirectoryShare
- func (m VZMultipleDirectoryShare) Directories() foundation.INSDictionary
- func (m VZMultipleDirectoryShare) Init() VZMultipleDirectoryShare
- func (m VZMultipleDirectoryShare) InitWithDirectories(directories foundation.INSDictionary) VZMultipleDirectoryShare
- type VZMultipleDirectoryShareClass
- type VZNATNetworkDeviceAttachment
- func (n VZNATNetworkDeviceAttachment) Attachment() IVZNetworkDeviceAttachment
- func (n VZNATNetworkDeviceAttachment) Autorelease() VZNATNetworkDeviceAttachment
- func (n VZNATNetworkDeviceAttachment) Init() VZNATNetworkDeviceAttachment
- func (n VZNATNetworkDeviceAttachment) NetworkDevices() IVZNetworkDeviceConfiguration
- func (n VZNATNetworkDeviceAttachment) SetAttachment(value IVZNetworkDeviceAttachment)
- func (n VZNATNetworkDeviceAttachment) SetNetworkDevices(value IVZNetworkDeviceConfiguration)
- type VZNATNetworkDeviceAttachmentClass
- type VZNVMExpressControllerDeviceConfiguration
- func NewNVMExpressControllerDeviceConfigurationWithAttachment(attachment IVZStorageDeviceAttachment) VZNVMExpressControllerDeviceConfiguration
- func NewVZNVMExpressControllerDeviceConfiguration() VZNVMExpressControllerDeviceConfiguration
- func VZNVMExpressControllerDeviceConfigurationFromID(id objc.ID) VZNVMExpressControllerDeviceConfiguration
- func (n VZNVMExpressControllerDeviceConfiguration) Autorelease() VZNVMExpressControllerDeviceConfiguration
- func (n VZNVMExpressControllerDeviceConfiguration) Init() VZNVMExpressControllerDeviceConfiguration
- func (n VZNVMExpressControllerDeviceConfiguration) InitWithAttachment(attachment IVZStorageDeviceAttachment) VZNVMExpressControllerDeviceConfiguration
- type VZNVMExpressControllerDeviceConfigurationClass
- type VZNetworkBlockDeviceStorageDeviceAttachment
- func NewNetworkBlockDeviceStorageDeviceAttachmentWithURLError(URL foundation.INSURL) (VZNetworkBlockDeviceStorageDeviceAttachment, error)
- func NewNetworkBlockDeviceStorageDeviceAttachmentWithURLTimeoutForcedReadOnlySynchronizationModeError(URL foundation.INSURL, timeout float64, forcedReadOnly bool, ...) (VZNetworkBlockDeviceStorageDeviceAttachment, error)
- func NewVZNetworkBlockDeviceStorageDeviceAttachment() VZNetworkBlockDeviceStorageDeviceAttachment
- func VZNetworkBlockDeviceStorageDeviceAttachmentFromID(id objc.ID) VZNetworkBlockDeviceStorageDeviceAttachment
- func (n VZNetworkBlockDeviceStorageDeviceAttachment) Autorelease() VZNetworkBlockDeviceStorageDeviceAttachment
- func (n VZNetworkBlockDeviceStorageDeviceAttachment) Delegate() VZNetworkBlockDeviceStorageDeviceAttachmentDelegate
- func (n VZNetworkBlockDeviceStorageDeviceAttachment) ForcedReadOnly() bool
- func (n VZNetworkBlockDeviceStorageDeviceAttachment) Init() VZNetworkBlockDeviceStorageDeviceAttachment
- func (n VZNetworkBlockDeviceStorageDeviceAttachment) InitWithURLError(URL foundation.INSURL) (VZNetworkBlockDeviceStorageDeviceAttachment, error)
- func (n VZNetworkBlockDeviceStorageDeviceAttachment) InitWithURLTimeoutForcedReadOnlySynchronizationModeError(URL foundation.INSURL, timeout float64, forcedReadOnly bool, ...) (VZNetworkBlockDeviceStorageDeviceAttachment, error)
- func (n VZNetworkBlockDeviceStorageDeviceAttachment) SetDelegate(value VZNetworkBlockDeviceStorageDeviceAttachmentDelegate)
- func (n VZNetworkBlockDeviceStorageDeviceAttachment) SynchronizationMode() VZDiskSynchronizationMode
- func (n VZNetworkBlockDeviceStorageDeviceAttachment) Timeout() float64
- func (n VZNetworkBlockDeviceStorageDeviceAttachment) URL() foundation.INSURL
- type VZNetworkBlockDeviceStorageDeviceAttachmentClass
- type VZNetworkBlockDeviceStorageDeviceAttachmentDelegate
- type VZNetworkBlockDeviceStorageDeviceAttachmentDelegateConfig
- type VZNetworkBlockDeviceStorageDeviceAttachmentDelegateObject
- func NewVZNetworkBlockDeviceStorageDeviceAttachmentDelegate(config VZNetworkBlockDeviceStorageDeviceAttachmentDelegateConfig) VZNetworkBlockDeviceStorageDeviceAttachmentDelegateObject
- func VZNetworkBlockDeviceStorageDeviceAttachmentDelegateObjectFromID(id objc.ID) VZNetworkBlockDeviceStorageDeviceAttachmentDelegateObject
- func (o VZNetworkBlockDeviceStorageDeviceAttachmentDelegateObject) AttachmentDidEncounterError(attachment IVZNetworkBlockDeviceStorageDeviceAttachment, ...)
- func (o VZNetworkBlockDeviceStorageDeviceAttachmentDelegateObject) AttachmentWasConnected(attachment IVZNetworkBlockDeviceStorageDeviceAttachment)
- func (o VZNetworkBlockDeviceStorageDeviceAttachmentDelegateObject) BaseObject() objectivec.Object
- type VZNetworkDevice
- func (n VZNetworkDevice) Attachment() IVZNetworkDeviceAttachment
- func (n VZNetworkDevice) Autorelease() VZNetworkDevice
- func (n VZNetworkDevice) Init() VZNetworkDevice
- func (n VZNetworkDevice) NetworkDevices() IVZNetworkDevice
- func (n VZNetworkDevice) SetAttachment(value IVZNetworkDeviceAttachment)
- func (n VZNetworkDevice) SetNetworkDevices(value IVZNetworkDevice)
- type VZNetworkDeviceAttachment
- type VZNetworkDeviceAttachmentClass
- type VZNetworkDeviceClass
- type VZNetworkDeviceConfiguration
- func (n VZNetworkDeviceConfiguration) Attachment() IVZNetworkDeviceAttachment
- func (n VZNetworkDeviceConfiguration) Autorelease() VZNetworkDeviceConfiguration
- func (n VZNetworkDeviceConfiguration) Init() VZNetworkDeviceConfiguration
- func (n VZNetworkDeviceConfiguration) MACAddress() IVZMACAddress
- func (n VZNetworkDeviceConfiguration) SetAttachment(value IVZNetworkDeviceAttachment)
- func (n VZNetworkDeviceConfiguration) SetMACAddress(value IVZMACAddress)
- type VZNetworkDeviceConfigurationClass
- type VZPlatformConfiguration
- type VZPlatformConfigurationClass
- type VZPointingDeviceConfiguration
- type VZPointingDeviceConfigurationClass
- type VZSerialPortAttachment
- type VZSerialPortAttachmentClass
- type VZSerialPortConfiguration
- type VZSerialPortConfigurationClass
- type VZSharedDirectory
- func (s VZSharedDirectory) Autorelease() VZSharedDirectory
- func (s VZSharedDirectory) Init() VZSharedDirectory
- func (s VZSharedDirectory) InitWithURLReadOnly(url foundation.INSURL, readOnly bool) VZSharedDirectory
- func (s VZSharedDirectory) ReadOnly() bool
- func (s VZSharedDirectory) URL() foundation.INSURL
- type VZSharedDirectoryClass
- type VZSingleDirectoryShare
- type VZSingleDirectoryShareClass
- type VZSocketDevice
- type VZSocketDeviceClass
- type VZSocketDeviceConfiguration
- type VZSocketDeviceConfigurationClass
- type VZSpiceAgentPortAttachment
- type VZSpiceAgentPortAttachmentClass
- type VZStorageDevice
- type VZStorageDeviceAttachment
- type VZStorageDeviceAttachmentClass
- type VZStorageDeviceClass
- type VZStorageDeviceConfiguration
- type VZStorageDeviceConfigurationClass
- type VZUSBController
- func (u VZUSBController) AttachDevice(ctx context.Context, device VZUSBDevice) error
- func (u VZUSBController) AttachDeviceCompletionHandler(device VZUSBDevice, completionHandler ErrorHandler)
- func (u VZUSBController) Autorelease() VZUSBController
- func (u VZUSBController) DetachDevice(ctx context.Context, device VZUSBDevice) error
- func (u VZUSBController) DetachDeviceCompletionHandler(device VZUSBDevice, completionHandler ErrorHandler)
- func (u VZUSBController) Init() VZUSBController
- func (u VZUSBController) SetUsbControllers(value IVZUSBController)
- func (u VZUSBController) UsbControllers() IVZUSBController
- func (u VZUSBController) UsbDevices() []objectivec.IObject
- type VZUSBControllerClass
- type VZUSBControllerConfiguration
- func (u VZUSBControllerConfiguration) Autorelease() VZUSBControllerConfiguration
- func (u VZUSBControllerConfiguration) Init() VZUSBControllerConfiguration
- func (u VZUSBControllerConfiguration) SetUsbDevices(value []objectivec.IObject)
- func (u VZUSBControllerConfiguration) UsbDevices() []objectivec.IObject
- type VZUSBControllerConfigurationClass
- type VZUSBDevice
- type VZUSBDeviceConfiguration
- type VZUSBDeviceConfigurationObject
- type VZUSBDeviceObject
- type VZUSBKeyboardConfiguration
- type VZUSBKeyboardConfigurationClass
- type VZUSBMassStorageDevice
- func (u VZUSBMassStorageDevice) Autorelease() VZUSBMassStorageDevice
- func (u VZUSBMassStorageDevice) Init() VZUSBMassStorageDevice
- func (u VZUSBMassStorageDevice) InitWithConfiguration(configuration IVZUSBMassStorageDeviceConfiguration) VZUSBMassStorageDevice
- func (u VZUSBMassStorageDevice) SetUsbDevices(value VZUSBDevice)
- func (u VZUSBMassStorageDevice) UsbController() IVZUSBController
- func (u VZUSBMassStorageDevice) UsbDevices() VZUSBDevice
- func (u VZUSBMassStorageDevice) Uuid() foundation.NSUUID
- type VZUSBMassStorageDeviceClass
- type VZUSBMassStorageDeviceConfiguration
- func NewUSBMassStorageDeviceConfigurationWithAttachment(attachment IVZStorageDeviceAttachment) VZUSBMassStorageDeviceConfiguration
- func NewVZUSBMassStorageDeviceConfiguration() VZUSBMassStorageDeviceConfiguration
- func VZUSBMassStorageDeviceConfigurationFromID(id objc.ID) VZUSBMassStorageDeviceConfiguration
- func (u VZUSBMassStorageDeviceConfiguration) Autorelease() VZUSBMassStorageDeviceConfiguration
- func (u VZUSBMassStorageDeviceConfiguration) Init() VZUSBMassStorageDeviceConfiguration
- func (u VZUSBMassStorageDeviceConfiguration) InitWithAttachment(attachment IVZStorageDeviceAttachment) VZUSBMassStorageDeviceConfiguration
- func (u VZUSBMassStorageDeviceConfiguration) SetUuid(value foundation.NSUUID)
- func (u VZUSBMassStorageDeviceConfiguration) Uuid() foundation.NSUUID
- type VZUSBMassStorageDeviceConfigurationClass
- type VZUSBScreenCoordinatePointingDeviceConfiguration
- type VZUSBScreenCoordinatePointingDeviceConfigurationClass
- type VZVirtioBlockDeviceConfiguration
- func (v VZVirtioBlockDeviceConfiguration) Autorelease() VZVirtioBlockDeviceConfiguration
- func (v VZVirtioBlockDeviceConfiguration) BlockDeviceIdentifier() string
- func (v VZVirtioBlockDeviceConfiguration) Init() VZVirtioBlockDeviceConfiguration
- func (v VZVirtioBlockDeviceConfiguration) InitWithAttachment(attachment IVZStorageDeviceAttachment) VZVirtioBlockDeviceConfiguration
- func (v VZVirtioBlockDeviceConfiguration) SetBlockDeviceIdentifier(value string)
- func (v VZVirtioBlockDeviceConfiguration) SetStorageDevices(value IVZStorageDeviceConfiguration)
- func (v VZVirtioBlockDeviceConfiguration) StorageDevices() IVZStorageDeviceConfiguration
- type VZVirtioBlockDeviceConfigurationClass
- type VZVirtioConsoleDevice
- func (v VZVirtioConsoleDevice) Autorelease() VZVirtioConsoleDevice
- func (v VZVirtioConsoleDevice) Delegate() VZVirtioConsoleDeviceDelegate
- func (v VZVirtioConsoleDevice) Init() VZVirtioConsoleDevice
- func (v VZVirtioConsoleDevice) Ports() IVZVirtioConsolePortArray
- func (v VZVirtioConsoleDevice) SetDelegate(value VZVirtioConsoleDeviceDelegate)
- type VZVirtioConsoleDeviceClass
- type VZVirtioConsoleDeviceConfiguration
- func (v VZVirtioConsoleDeviceConfiguration) Autorelease() VZVirtioConsoleDeviceConfiguration
- func (v VZVirtioConsoleDeviceConfiguration) ConsoleDevices() IVZConsoleDeviceConfiguration
- func (v VZVirtioConsoleDeviceConfiguration) Init() VZVirtioConsoleDeviceConfiguration
- func (v VZVirtioConsoleDeviceConfiguration) Ports() IVZVirtioConsolePortConfigurationArray
- func (v VZVirtioConsoleDeviceConfiguration) SetConsoleDevices(value IVZConsoleDeviceConfiguration)
- type VZVirtioConsoleDeviceConfigurationClass
- type VZVirtioConsoleDeviceDelegate
- type VZVirtioConsoleDeviceDelegateConfig
- type VZVirtioConsoleDeviceDelegateObject
- func (o VZVirtioConsoleDeviceDelegateObject) BaseObject() objectivec.Object
- func (o VZVirtioConsoleDeviceDelegateObject) ConsoleDeviceDidClosePort(consoleDevice IVZVirtioConsoleDevice, consolePort IVZVirtioConsolePort)
- func (o VZVirtioConsoleDeviceDelegateObject) ConsoleDeviceDidOpenPort(consoleDevice IVZVirtioConsoleDevice, consolePort IVZVirtioConsolePort)
- type VZVirtioConsoleDeviceSerialPortConfiguration
- type VZVirtioConsoleDeviceSerialPortConfigurationClass
- type VZVirtioConsolePort
- func (v VZVirtioConsolePort) Attachment() IVZSerialPortAttachment
- func (v VZVirtioConsolePort) Autorelease() VZVirtioConsolePort
- func (v VZVirtioConsolePort) Init() VZVirtioConsolePort
- func (v VZVirtioConsolePort) Name() string
- func (v VZVirtioConsolePort) Ports() IVZVirtioConsolePortArray
- func (v VZVirtioConsolePort) SetAttachment(value IVZSerialPortAttachment)
- func (v VZVirtioConsolePort) SetPorts(value IVZVirtioConsolePortArray)
- type VZVirtioConsolePortArray
- type VZVirtioConsolePortArrayClass
- type VZVirtioConsolePortClass
- type VZVirtioConsolePortConfiguration
- func (v VZVirtioConsolePortConfiguration) Autorelease() VZVirtioConsolePortConfiguration
- func (v VZVirtioConsolePortConfiguration) ConsoleDevices() IVZConsoleDeviceConfiguration
- func (v VZVirtioConsolePortConfiguration) Init() VZVirtioConsolePortConfiguration
- func (v VZVirtioConsolePortConfiguration) IsConsole() bool
- func (v VZVirtioConsolePortConfiguration) Name() string
- func (v VZVirtioConsolePortConfiguration) SetConsoleDevices(value IVZConsoleDeviceConfiguration)
- func (v VZVirtioConsolePortConfiguration) SetIsConsole(value bool)
- func (v VZVirtioConsolePortConfiguration) SetName(value string)
- type VZVirtioConsolePortConfigurationArray
- func (v VZVirtioConsolePortConfigurationArray) Autorelease() VZVirtioConsolePortConfigurationArray
- func (v VZVirtioConsolePortConfigurationArray) Init() VZVirtioConsolePortConfigurationArray
- func (v VZVirtioConsolePortConfigurationArray) MaximumPortCount() uint32
- func (v VZVirtioConsolePortConfigurationArray) ObjectAtIndexedSubscript(portIndex uint) IVZVirtioConsolePortConfiguration
- func (v VZVirtioConsolePortConfigurationArray) SetMaximumPortCount(value uint32)
- func (v VZVirtioConsolePortConfigurationArray) SetObjectAtIndexedSubscript(configuration IVZVirtioConsolePortConfiguration, portIndex uint)
- type VZVirtioConsolePortConfigurationArrayClass
- type VZVirtioConsolePortConfigurationClass
- type VZVirtioEntropyDeviceConfiguration
- func (v VZVirtioEntropyDeviceConfiguration) Autorelease() VZVirtioEntropyDeviceConfiguration
- func (v VZVirtioEntropyDeviceConfiguration) EntropyDevices() IVZEntropyDeviceConfiguration
- func (v VZVirtioEntropyDeviceConfiguration) Init() VZVirtioEntropyDeviceConfiguration
- func (v VZVirtioEntropyDeviceConfiguration) SetEntropyDevices(value IVZEntropyDeviceConfiguration)
- type VZVirtioEntropyDeviceConfigurationClass
- type VZVirtioFileSystemDevice
- func (v VZVirtioFileSystemDevice) Autorelease() VZVirtioFileSystemDevice
- func (v VZVirtioFileSystemDevice) DirectorySharingDevices() IVZDirectorySharingDevice
- func (v VZVirtioFileSystemDevice) Init() VZVirtioFileSystemDevice
- func (v VZVirtioFileSystemDevice) SetDirectorySharingDevices(value IVZDirectorySharingDevice)
- func (v VZVirtioFileSystemDevice) SetShare(value IVZDirectoryShare)
- func (v VZVirtioFileSystemDevice) Share() IVZDirectoryShare
- func (v VZVirtioFileSystemDevice) Tag() string
- type VZVirtioFileSystemDeviceClass
- type VZVirtioFileSystemDeviceConfiguration
- func (v VZVirtioFileSystemDeviceConfiguration) Autorelease() VZVirtioFileSystemDeviceConfiguration
- func (v VZVirtioFileSystemDeviceConfiguration) Init() VZVirtioFileSystemDeviceConfiguration
- func (v VZVirtioFileSystemDeviceConfiguration) InitWithTag(tag string) VZVirtioFileSystemDeviceConfiguration
- func (v VZVirtioFileSystemDeviceConfiguration) SetShare(value IVZDirectoryShare)
- func (v VZVirtioFileSystemDeviceConfiguration) SetTag(value string)
- func (v VZVirtioFileSystemDeviceConfiguration) Share() IVZDirectoryShare
- func (v VZVirtioFileSystemDeviceConfiguration) Tag() string
- type VZVirtioFileSystemDeviceConfigurationClass
- func (vc VZVirtioFileSystemDeviceConfigurationClass) Alloc() VZVirtioFileSystemDeviceConfiguration
- func (_VZVirtioFileSystemDeviceConfigurationClass VZVirtioFileSystemDeviceConfigurationClass) MacOSGuestAutomountTag() string
- func (_VZVirtioFileSystemDeviceConfigurationClass VZVirtioFileSystemDeviceConfigurationClass) ValidateTagError(tag string) (bool, error)
- type VZVirtioGraphicsDevice
- type VZVirtioGraphicsDeviceClass
- type VZVirtioGraphicsDeviceConfiguration
- func (v VZVirtioGraphicsDeviceConfiguration) Autorelease() VZVirtioGraphicsDeviceConfiguration
- func (v VZVirtioGraphicsDeviceConfiguration) Init() VZVirtioGraphicsDeviceConfiguration
- func (v VZVirtioGraphicsDeviceConfiguration) Scanouts() []VZVirtioGraphicsScanoutConfiguration
- func (v VZVirtioGraphicsDeviceConfiguration) SetScanouts(value []VZVirtioGraphicsScanoutConfiguration)
- type VZVirtioGraphicsDeviceConfigurationClass
- type VZVirtioGraphicsScanout
- type VZVirtioGraphicsScanoutClass
- type VZVirtioGraphicsScanoutConfiguration
- func NewVZVirtioGraphicsScanoutConfiguration() VZVirtioGraphicsScanoutConfiguration
- func NewVirtioGraphicsScanoutConfigurationWithWidthInPixelsHeightInPixels(widthInPixels int, heightInPixels int) VZVirtioGraphicsScanoutConfiguration
- func VZVirtioGraphicsScanoutConfigurationFromID(id objc.ID) VZVirtioGraphicsScanoutConfiguration
- func (v VZVirtioGraphicsScanoutConfiguration) Autorelease() VZVirtioGraphicsScanoutConfiguration
- func (v VZVirtioGraphicsScanoutConfiguration) HeightInPixels() int
- func (v VZVirtioGraphicsScanoutConfiguration) Init() VZVirtioGraphicsScanoutConfiguration
- func (v VZVirtioGraphicsScanoutConfiguration) InitWithWidthInPixelsHeightInPixels(widthInPixels int, heightInPixels int) VZVirtioGraphicsScanoutConfiguration
- func (v VZVirtioGraphicsScanoutConfiguration) Scanouts() IVZVirtioGraphicsScanoutConfiguration
- func (v VZVirtioGraphicsScanoutConfiguration) SetHeightInPixels(value int)
- func (v VZVirtioGraphicsScanoutConfiguration) SetScanouts(value IVZVirtioGraphicsScanoutConfiguration)
- func (v VZVirtioGraphicsScanoutConfiguration) SetWidthInPixels(value int)
- func (v VZVirtioGraphicsScanoutConfiguration) WidthInPixels() int
- type VZVirtioGraphicsScanoutConfigurationClass
- type VZVirtioNetworkDeviceConfiguration
- func (v VZVirtioNetworkDeviceConfiguration) Autorelease() VZVirtioNetworkDeviceConfiguration
- func (v VZVirtioNetworkDeviceConfiguration) Init() VZVirtioNetworkDeviceConfiguration
- func (v VZVirtioNetworkDeviceConfiguration) NetworkDevices() IVZNetworkDeviceConfiguration
- func (v VZVirtioNetworkDeviceConfiguration) SetNetworkDevices(value IVZNetworkDeviceConfiguration)
- type VZVirtioNetworkDeviceConfigurationClass
- type VZVirtioSocketConnection
- func (v VZVirtioSocketConnection) Autorelease() VZVirtioSocketConnection
- func (v VZVirtioSocketConnection) Close()
- func (v VZVirtioSocketConnection) DestinationPort() uint32
- func (v VZVirtioSocketConnection) FileDescriptor() int
- func (v VZVirtioSocketConnection) Init() VZVirtioSocketConnection
- func (v VZVirtioSocketConnection) SourcePort() uint32
- type VZVirtioSocketConnectionClass
- type VZVirtioSocketDevice
- func (v VZVirtioSocketDevice) Autorelease() VZVirtioSocketDevice
- func (v VZVirtioSocketDevice) ConnectToPort(ctx context.Context, port uint32) (*VZVirtioSocketConnection, error)
- func (v VZVirtioSocketDevice) ConnectToPortCompletionHandler(port uint32, completionHandler VirtioSocketConnectionErrorHandler)
- func (v VZVirtioSocketDevice) Init() VZVirtioSocketDevice
- func (v VZVirtioSocketDevice) RemoveSocketListenerForPort(port uint32)
- func (v VZVirtioSocketDevice) SetSocketListenerForPort(listener IVZVirtioSocketListener, port uint32)
- type VZVirtioSocketDeviceClass
- type VZVirtioSocketDeviceConfiguration
- func (v VZVirtioSocketDeviceConfiguration) Autorelease() VZVirtioSocketDeviceConfiguration
- func (v VZVirtioSocketDeviceConfiguration) Init() VZVirtioSocketDeviceConfiguration
- func (v VZVirtioSocketDeviceConfiguration) SetSocketDevices(value IVZSocketDeviceConfiguration)
- func (v VZVirtioSocketDeviceConfiguration) SocketDevices() IVZSocketDeviceConfiguration
- type VZVirtioSocketDeviceConfigurationClass
- type VZVirtioSocketListener
- type VZVirtioSocketListenerClass
- type VZVirtioSocketListenerDelegate
- type VZVirtioSocketListenerDelegateConfig
- type VZVirtioSocketListenerDelegateObject
- type VZVirtioSoundDeviceConfiguration
- func (v VZVirtioSoundDeviceConfiguration) AudioDevices() IVZAudioDeviceConfiguration
- func (v VZVirtioSoundDeviceConfiguration) Autorelease() VZVirtioSoundDeviceConfiguration
- func (v VZVirtioSoundDeviceConfiguration) Init() VZVirtioSoundDeviceConfiguration
- func (v VZVirtioSoundDeviceConfiguration) SetAudioDevices(value IVZAudioDeviceConfiguration)
- func (v VZVirtioSoundDeviceConfiguration) SetStreams(value []VZVirtioSoundDeviceStreamConfiguration)
- func (v VZVirtioSoundDeviceConfiguration) Streams() []VZVirtioSoundDeviceStreamConfiguration
- type VZVirtioSoundDeviceConfigurationClass
- type VZVirtioSoundDeviceInputStreamConfiguration
- func (v VZVirtioSoundDeviceInputStreamConfiguration) Autorelease() VZVirtioSoundDeviceInputStreamConfiguration
- func (v VZVirtioSoundDeviceInputStreamConfiguration) Init() VZVirtioSoundDeviceInputStreamConfiguration
- func (v VZVirtioSoundDeviceInputStreamConfiguration) SetSource(value IVZAudioInputStreamSource)
- func (v VZVirtioSoundDeviceInputStreamConfiguration) Source() IVZAudioInputStreamSource
- type VZVirtioSoundDeviceInputStreamConfigurationClass
- type VZVirtioSoundDeviceOutputStreamConfiguration
- func (v VZVirtioSoundDeviceOutputStreamConfiguration) Autorelease() VZVirtioSoundDeviceOutputStreamConfiguration
- func (v VZVirtioSoundDeviceOutputStreamConfiguration) Init() VZVirtioSoundDeviceOutputStreamConfiguration
- func (v VZVirtioSoundDeviceOutputStreamConfiguration) SetSink(value IVZAudioOutputStreamSink)
- func (v VZVirtioSoundDeviceOutputStreamConfiguration) Sink() IVZAudioOutputStreamSink
- type VZVirtioSoundDeviceOutputStreamConfigurationClass
- type VZVirtioSoundDeviceStreamConfiguration
- type VZVirtioSoundDeviceStreamConfigurationClass
- type VZVirtioTraditionalMemoryBalloonDevice
- func (v VZVirtioTraditionalMemoryBalloonDevice) Autorelease() VZVirtioTraditionalMemoryBalloonDevice
- func (v VZVirtioTraditionalMemoryBalloonDevice) Init() VZVirtioTraditionalMemoryBalloonDevice
- func (v VZVirtioTraditionalMemoryBalloonDevice) SetTargetVirtualMachineMemorySize(value uint64)
- func (v VZVirtioTraditionalMemoryBalloonDevice) TargetVirtualMachineMemorySize() uint64
- type VZVirtioTraditionalMemoryBalloonDeviceClass
- type VZVirtioTraditionalMemoryBalloonDeviceConfiguration
- func (v VZVirtioTraditionalMemoryBalloonDeviceConfiguration) Autorelease() VZVirtioTraditionalMemoryBalloonDeviceConfiguration
- func (v VZVirtioTraditionalMemoryBalloonDeviceConfiguration) Init() VZVirtioTraditionalMemoryBalloonDeviceConfiguration
- func (v VZVirtioTraditionalMemoryBalloonDeviceConfiguration) MemoryBalloonDevices() IVZMemoryBalloonDevice
- func (v VZVirtioTraditionalMemoryBalloonDeviceConfiguration) SetMemoryBalloonDevices(value IVZMemoryBalloonDevice)
- type VZVirtioTraditionalMemoryBalloonDeviceConfigurationClass
- type VZVirtualMachine
- func NewVZVirtualMachine() VZVirtualMachine
- func NewVirtualMachineWithConfiguration(configuration IVZVirtualMachineConfiguration) VZVirtualMachine
- func NewVirtualMachineWithConfigurationQueue(configuration IVZVirtualMachineConfiguration, queue dispatch.Queue) VZVirtualMachine
- func VZVirtualMachineFromID(id objc.ID) VZVirtualMachine
- func (v VZVirtualMachine) Autorelease() VZVirtualMachine
- func (v VZVirtualMachine) CanPause() bool
- func (v VZVirtualMachine) CanRequestStop() bool
- func (v VZVirtualMachine) CanResume() bool
- func (v VZVirtualMachine) CanStart() bool
- func (v VZVirtualMachine) CanStop() bool
- func (v VZVirtualMachine) ConsoleDevices() []VZConsoleDevice
- func (v VZVirtualMachine) Delegate() VZVirtualMachineDelegate
- func (v VZVirtualMachine) DirectorySharingDevices() []VZDirectorySharingDevice
- func (v VZVirtualMachine) GraphicsDevices() []VZGraphicsDevice
- func (v VZVirtualMachine) Init() VZVirtualMachine
- func (v VZVirtualMachine) InitWithConfiguration(configuration IVZVirtualMachineConfiguration) VZVirtualMachine
- func (v VZVirtualMachine) InitWithConfigurationQueue(configuration IVZVirtualMachineConfiguration, queue dispatch.Queue) VZVirtualMachine
- func (v VZVirtualMachine) MemoryBalloonDevices() []VZMemoryBalloonDevice
- func (v VZVirtualMachine) NetworkDevices() []VZNetworkDevice
- func (v VZVirtualMachine) Pause(ctx context.Context) error
- func (v VZVirtualMachine) PauseWithCompletionHandler(completionHandler ErrorHandler)
- func (v VZVirtualMachine) Queue() dispatch.Queue
- func (v VZVirtualMachine) RequestStopWithError() (bool, error)
- func (v VZVirtualMachine) RestoreMachineStateFromURL(ctx context.Context, saveFileURL foundation.INSURL) error
- func (v VZVirtualMachine) RestoreMachineStateFromURLCompletionHandler(saveFileURL foundation.INSURL, completionHandler ErrorHandler)
- func (v VZVirtualMachine) Resume(ctx context.Context) error
- func (v VZVirtualMachine) ResumeWithCompletionHandler(completionHandler ErrorHandler)
- func (v VZVirtualMachine) SaveMachineStateToURL(ctx context.Context, saveFileURL foundation.INSURL) error
- func (v VZVirtualMachine) SaveMachineStateToURLCompletionHandler(saveFileURL foundation.INSURL, completionHandler ErrorHandler)
- func (v VZVirtualMachine) SetDelegate(value VZVirtualMachineDelegate)
- func (v VZVirtualMachine) SocketDevices() []VZSocketDevice
- func (v VZVirtualMachine) Start(ctx context.Context) error
- func (v VZVirtualMachine) StartWithCompletionHandler(completionHandler ErrorHandler)
- func (v VZVirtualMachine) StartWithOptions(ctx context.Context, options IVZVirtualMachineStartOptions) error
- func (v VZVirtualMachine) StartWithOptionsCompletionHandler(options IVZVirtualMachineStartOptions, completionHandler ErrorHandler)
- func (v VZVirtualMachine) State() VZVirtualMachineState
- func (v VZVirtualMachine) Stop(ctx context.Context) error
- func (v VZVirtualMachine) StopWithCompletionHandler(completionHandler ErrorHandler)
- func (v VZVirtualMachine) UsbControllers() []VZUSBController
- type VZVirtualMachineClass
- type VZVirtualMachineConfiguration
- func (v VZVirtualMachineConfiguration) AudioDevices() []VZAudioDeviceConfiguration
- func (v VZVirtualMachineConfiguration) Autorelease() VZVirtualMachineConfiguration
- func (v VZVirtualMachineConfiguration) BootLoader() IVZBootLoader
- func (v VZVirtualMachineConfiguration) CPUCount() uint
- func (v VZVirtualMachineConfiguration) ConsoleDevices() []VZConsoleDeviceConfiguration
- func (v VZVirtualMachineConfiguration) CpuCount() uint
- func (v VZVirtualMachineConfiguration) DirectorySharingDevices() []VZDirectorySharingDeviceConfiguration
- func (v VZVirtualMachineConfiguration) EntropyDevices() []VZEntropyDeviceConfiguration
- func (v VZVirtualMachineConfiguration) GraphicsDevices() []VZGraphicsDeviceConfiguration
- func (v VZVirtualMachineConfiguration) Init() VZVirtualMachineConfiguration
- func (v VZVirtualMachineConfiguration) Keyboards() []VZKeyboardConfiguration
- func (v VZVirtualMachineConfiguration) MemoryBalloonDevices() []VZMemoryBalloonDeviceConfiguration
- func (v VZVirtualMachineConfiguration) MemorySize() uint64
- func (v VZVirtualMachineConfiguration) NetworkDevices() []VZNetworkDeviceConfiguration
- func (v VZVirtualMachineConfiguration) Platform() IVZPlatformConfiguration
- func (v VZVirtualMachineConfiguration) PointingDevices() []VZPointingDeviceConfiguration
- func (v VZVirtualMachineConfiguration) SerialPorts() []VZSerialPortConfiguration
- func (v VZVirtualMachineConfiguration) SetAudioDevices(value []VZAudioDeviceConfiguration)
- func (v VZVirtualMachineConfiguration) SetBootLoader(value IVZBootLoader)
- func (v VZVirtualMachineConfiguration) SetCPUCount(value uint)
- func (v VZVirtualMachineConfiguration) SetConsoleDevices(value []VZConsoleDeviceConfiguration)
- func (v VZVirtualMachineConfiguration) SetCpuCount(value uint)
- func (v VZVirtualMachineConfiguration) SetDirectorySharingDevices(value []VZDirectorySharingDeviceConfiguration)
- func (v VZVirtualMachineConfiguration) SetEntropyDevices(value []VZEntropyDeviceConfiguration)
- func (v VZVirtualMachineConfiguration) SetGraphicsDevices(value []VZGraphicsDeviceConfiguration)
- func (v VZVirtualMachineConfiguration) SetKeyboards(value []VZKeyboardConfiguration)
- func (v VZVirtualMachineConfiguration) SetMemoryBalloonDevices(value []VZMemoryBalloonDeviceConfiguration)
- func (v VZVirtualMachineConfiguration) SetMemorySize(value uint64)
- func (v VZVirtualMachineConfiguration) SetNetworkDevices(value []VZNetworkDeviceConfiguration)
- func (v VZVirtualMachineConfiguration) SetPlatform(value IVZPlatformConfiguration)
- func (v VZVirtualMachineConfiguration) SetPointingDevices(value []VZPointingDeviceConfiguration)
- func (v VZVirtualMachineConfiguration) SetSerialPorts(value []VZSerialPortConfiguration)
- func (v VZVirtualMachineConfiguration) SetSocketDevices(value []VZSocketDeviceConfiguration)
- func (v VZVirtualMachineConfiguration) SetStorageDevices(value []VZStorageDeviceConfiguration)
- func (v VZVirtualMachineConfiguration) SetUsbControllers(value []VZUSBControllerConfiguration)
- func (v VZVirtualMachineConfiguration) SocketDevices() []VZSocketDeviceConfiguration
- func (v VZVirtualMachineConfiguration) StorageDevices() []VZStorageDeviceConfiguration
- func (v VZVirtualMachineConfiguration) UsbControllers() []VZUSBControllerConfiguration
- func (v VZVirtualMachineConfiguration) ValidateSaveRestoreSupportWithError() (bool, error)
- func (v VZVirtualMachineConfiguration) ValidateWithError() (bool, error)
- type VZVirtualMachineConfigurationClass
- func (vc VZVirtualMachineConfigurationClass) Alloc() VZVirtualMachineConfiguration
- func (_VZVirtualMachineConfigurationClass VZVirtualMachineConfigurationClass) MaximumAllowedCPUCount() uint
- func (_VZVirtualMachineConfigurationClass VZVirtualMachineConfigurationClass) MaximumAllowedMemorySize() uint64
- func (_VZVirtualMachineConfigurationClass VZVirtualMachineConfigurationClass) MinimumAllowedCPUCount() uint
- func (_VZVirtualMachineConfigurationClass VZVirtualMachineConfigurationClass) MinimumAllowedMemorySize() uint64
- type VZVirtualMachineDelegate
- type VZVirtualMachineDelegateConfig
- type VZVirtualMachineDelegateObject
- func (o VZVirtualMachineDelegateObject) BaseObject() objectivec.Object
- func (o VZVirtualMachineDelegateObject) GuestDidStopVirtualMachine(virtualMachine IVZVirtualMachine)
- func (o VZVirtualMachineDelegateObject) VirtualMachineDidStopWithError(virtualMachine IVZVirtualMachine, error_ foundation.INSError)
- func (o VZVirtualMachineDelegateObject) VirtualMachineNetworkDeviceAttachmentWasDisconnectedWithError(virtualMachine IVZVirtualMachine, networkDevice IVZNetworkDevice, ...)
- type VZVirtualMachineStartOptions
- type VZVirtualMachineStartOptionsClass
- type VZVirtualMachineState
- type VZVirtualMachineView
- func (v VZVirtualMachineView) AutomaticallyReconfiguresDisplay() bool
- func (v VZVirtualMachineView) Autorelease() VZVirtualMachineView
- func (v VZVirtualMachineView) CapturesSystemKeys() bool
- func (v VZVirtualMachineView) Init() VZVirtualMachineView
- func (v VZVirtualMachineView) SetAutomaticallyReconfiguresDisplay(value bool)
- func (v VZVirtualMachineView) SetCapturesSystemKeys(value bool)
- func (v VZVirtualMachineView) SetVirtualMachine(value IVZVirtualMachine)
- func (v VZVirtualMachineView) VirtualMachine() IVZVirtualMachine
- type VZVirtualMachineViewClass
- type VZVmnetNetworkDeviceAttachment
- func (v VZVmnetNetworkDeviceAttachment) Autorelease() VZVmnetNetworkDeviceAttachment
- func (v VZVmnetNetworkDeviceAttachment) Init() VZVmnetNetworkDeviceAttachment
- func (v VZVmnetNetworkDeviceAttachment) InitWithNetwork(network vmnet.Vmnet_network_ref) VZVmnetNetworkDeviceAttachment
- func (v VZVmnetNetworkDeviceAttachment) Network() unsafe.Pointer
- type VZVmnetNetworkDeviceAttachmentClass
- type VZXHCIController
- type VZXHCIControllerClass
- type VZXHCIControllerConfiguration
- type VZXHCIControllerConfigurationClass
- type VirtioSocketConnectionErrorHandler
Constants ¶
This section is empty.
Variables ¶
var ( // VZErrorDomain is the error domain for the Virtualization framework. // // See: https://developer.apple.com/documentation/Virtualization/VZErrorDomain VZErrorDomain foundation.NSErrorDomain )
Functions ¶
func NewErrorBlock ¶
func NewErrorBlock(handler ErrorHandler) (objc.ID, func())
NewErrorBlock wraps a Go ErrorHandler as an Objective-C block. The caller must defer the returned cleanup function.
Used by:
- [VZLinuxRosettaDirectoryShare.InstallRosettaWithCompletionHandler]
- VZMacOSInstaller.InstallWithCompletionHandler
- VZUSBController.AttachDeviceCompletionHandler
- VZUSBController.DetachDeviceCompletionHandler
- VZVirtualMachine.PauseWithCompletionHandler
- VZVirtualMachine.RestoreMachineStateFromURLCompletionHandler
- VZVirtualMachine.ResumeWithCompletionHandler
- VZVirtualMachine.SaveMachineStateToURLCompletionHandler
- VZVirtualMachine.StartWithCompletionHandler
- VZVirtualMachine.StartWithOptionsCompletionHandler
- VZVirtualMachine.StopWithCompletionHandler
func NewMacOSRestoreImageErrorBlock ¶
func NewMacOSRestoreImageErrorBlock(handler MacOSRestoreImageErrorHandler) (objc.ID, func())
NewMacOSRestoreImageErrorBlock wraps a Go MacOSRestoreImageErrorHandler as an Objective-C block. The caller must defer the returned cleanup function.
Used by:
- [VZMacOSRestoreImage.FetchLatestSupportedWithCompletionHandler]
- [VZMacOSRestoreImage.LoadFileURLCompletionHandler]
func NewVirtioSocketConnectionErrorBlock ¶
func NewVirtioSocketConnectionErrorBlock(handler VirtioSocketConnectionErrorHandler) (objc.ID, func())
NewVirtioSocketConnectionErrorBlock wraps a Go VirtioSocketConnectionErrorHandler as an Objective-C block. The caller must defer the returned cleanup function.
Used by:
Types ¶
type ErrorHandler ¶
type ErrorHandler = func(error)
ErrorHandler handles The completion handler the framework invokes after the request finishes processing.
- error: A result type that contains an error object when the VM fails to start.
The error can be type-asserted to *foundation.NSError for Domain, Code, and UserInfo.
Used by:
- [VZLinuxRosettaDirectoryShare.InstallRosettaWithCompletionHandler]
- VZMacOSInstaller.InstallWithCompletionHandler
- VZUSBController.AttachDeviceCompletionHandler
- VZUSBController.DetachDeviceCompletionHandler
- VZVirtualMachine.PauseWithCompletionHandler
- VZVirtualMachine.RestoreMachineStateFromURLCompletionHandler
- VZVirtualMachine.ResumeWithCompletionHandler
- VZVirtualMachine.SaveMachineStateToURLCompletionHandler
- VZVirtualMachine.StartWithCompletionHandler
- VZVirtualMachine.StartWithOptionsCompletionHandler
- VZVirtualMachine.StopWithCompletionHandler
type IVZAudioDeviceConfiguration ¶
type IVZAudioDeviceConfiguration interface {
objectivec.IObject
}
An interface definition for the VZAudioDeviceConfiguration class.
See: https://developer.apple.com/documentation/Virtualization/VZAudioDeviceConfiguration
type IVZAudioInputStreamSource ¶
type IVZAudioInputStreamSource interface {
objectivec.IObject
}
An interface definition for the VZAudioInputStreamSource class.
See: https://developer.apple.com/documentation/Virtualization/VZAudioInputStreamSource
type IVZAudioOutputStreamSink ¶
type IVZAudioOutputStreamSink interface {
objectivec.IObject
}
An interface definition for the VZAudioOutputStreamSink class.
See: https://developer.apple.com/documentation/Virtualization/VZAudioOutputStreamSink
type IVZBootLoader ¶
type IVZBootLoader interface {
objectivec.IObject
}
An interface definition for the VZBootLoader class.
See: https://developer.apple.com/documentation/Virtualization/VZBootLoader
type IVZBridgedNetworkDeviceAttachment ¶
type IVZBridgedNetworkDeviceAttachment interface {
IVZNetworkDeviceAttachment
// Creates the attachment from a bridged network interface object.
InitWithInterface(interface_ IVZBridgedNetworkInterface) VZBridgedNetworkDeviceAttachment
// The network interface assigned to this attachment.
Interface() IVZBridgedNetworkInterface
// The object that defines how the virtual network device communicates with the host system.
Attachment() IVZNetworkDeviceAttachment
SetAttachment(value IVZNetworkDeviceAttachment)
// The array of network devices that you expose to the guest operating system.
NetworkDevices() IVZNetworkDeviceConfiguration
SetNetworkDevices(value IVZNetworkDeviceConfiguration)
}
An interface definition for the VZBridgedNetworkDeviceAttachment class.
Creating the attachment point ¶
- [IVZBridgedNetworkDeviceAttachment.InitWithInterface]: Creates the attachment from a bridged network interface object.
Getting the network interface ¶
- [IVZBridgedNetworkDeviceAttachment.Interface]: The network interface assigned to this attachment.
See: https://developer.apple.com/documentation/Virtualization/VZBridgedNetworkDeviceAttachment
type IVZBridgedNetworkInterface ¶
type IVZBridgedNetworkInterface interface {
objectivec.IObject
// The unique BSD name of this network interface.
Identifier() string
// A user-visible name for the network interface.
LocalizedDisplayName() string
}
An interface definition for the VZBridgedNetworkInterface class.
Getting the interface description ¶
- [IVZBridgedNetworkInterface.Identifier]: The unique BSD name of this network interface.
- [IVZBridgedNetworkInterface.LocalizedDisplayName]: A user-visible name for the network interface.
See: https://developer.apple.com/documentation/Virtualization/VZBridgedNetworkInterface
type IVZConsoleDevice ¶
type IVZConsoleDevice interface {
objectivec.IObject
// The list of configured console devices on the VM.
ConsoleDevices() IVZConsoleDevice
SetConsoleDevices(value IVZConsoleDevice)
}
An interface definition for the VZConsoleDevice class.
See: https://developer.apple.com/documentation/Virtualization/VZConsoleDevice
type IVZConsoleDeviceConfiguration ¶
type IVZConsoleDeviceConfiguration interface {
objectivec.IObject
}
An interface definition for the VZConsoleDeviceConfiguration class.
See: https://developer.apple.com/documentation/Virtualization/VZConsoleDeviceConfiguration
type IVZConsolePortConfiguration ¶
type IVZConsolePortConfiguration interface {
objectivec.IObject
// The serial port attachment.
Attachment() IVZSerialPortAttachment
SetAttachment(value IVZSerialPortAttachment)
}
An interface definition for the VZConsolePortConfiguration class.
Configuring the attachment ¶
- [IVZConsolePortConfiguration.Attachment]: The serial port attachment.
- [IVZConsolePortConfiguration.SetAttachment]
See: https://developer.apple.com/documentation/Virtualization/VZConsolePortConfiguration
type IVZDirectoryShare ¶
type IVZDirectoryShare interface {
objectivec.IObject
}
An interface definition for the VZDirectoryShare class.
See: https://developer.apple.com/documentation/Virtualization/VZDirectoryShare
type IVZDirectorySharingDevice ¶
type IVZDirectorySharingDevice interface {
objectivec.IObject
}
An interface definition for the VZDirectorySharingDevice class.
See: https://developer.apple.com/documentation/Virtualization/VZDirectorySharingDevice
type IVZDirectorySharingDeviceConfiguration ¶
type IVZDirectorySharingDeviceConfiguration interface {
objectivec.IObject
}
An interface definition for the VZDirectorySharingDeviceConfiguration class.
See: https://developer.apple.com/documentation/Virtualization/VZDirectorySharingDeviceConfiguration
type IVZDiskBlockDeviceStorageDeviceAttachment ¶
type IVZDiskBlockDeviceStorageDeviceAttachment interface {
IVZStorageDeviceAttachment
// Creates a new block storage device attachment from a file handle and with the specified access mode, synchronization mode, and error object that you provide.
InitWithFileHandleReadOnlySynchronizationModeError(fileHandle foundation.NSFileHandle, readOnly bool, synchronizationMode VZDiskSynchronizationMode) (VZDiskBlockDeviceStorageDeviceAttachment, error)
// A file handle to a block device.
FileHandle() foundation.NSFileHandle
// A Boolean value that indicates whether this disk attachment is read-only; otherwise, if the file handle allows writes, the device can write data into it.
ReadOnly() bool
// The value that defines how the disk synchronizes with the underlying storage when the guest operating system flushes data.
SynchronizationMode() VZDiskSynchronizationMode
}
An interface definition for the VZDiskBlockDeviceStorageDeviceAttachment class.
Initializers ¶
- [IVZDiskBlockDeviceStorageDeviceAttachment.InitWithFileHandleReadOnlySynchronizationModeError]: Creates a new block storage device attachment from a file handle and with the specified access mode, synchronization mode, and error object that you provide.
Getting the block storage device details ¶
- [IVZDiskBlockDeviceStorageDeviceAttachment.FileHandle]: A file handle to a block device.
- [IVZDiskBlockDeviceStorageDeviceAttachment.ReadOnly]: A Boolean value that indicates whether this disk attachment is read-only; otherwise, if the file handle allows writes, the device can write data into it.
- [IVZDiskBlockDeviceStorageDeviceAttachment.SynchronizationMode]: The value that defines how the disk synchronizes with the underlying storage when the guest operating system flushes data.
See: https://developer.apple.com/documentation/Virtualization/VZDiskBlockDeviceStorageDeviceAttachment
type IVZDiskImageStorageDeviceAttachment ¶
type IVZDiskImageStorageDeviceAttachment interface {
IVZStorageDeviceAttachment
// Creates the attachment object from the specified disk image.
InitWithURLReadOnlyError(url foundation.INSURL, readOnly bool) (VZDiskImageStorageDeviceAttachment, error)
// Initialize the attachment from a local file URL.
InitWithURLReadOnlyCachingModeSynchronizationModeError(url foundation.INSURL, readOnly bool, cachingMode VZDiskImageCachingMode, synchronizationMode VZDiskImageSynchronizationMode) (VZDiskImageStorageDeviceAttachment, error)
// The URL of the underlying disk image.
URL() foundation.INSURL
// A Boolean value that indicates whether the underlying disk image is read-only.
ReadOnly() bool
// The current cacheing mode for the virtual disk image.
CachingMode() VZDiskImageCachingMode
// The mode in which the disk image synchronizes data with the underlying storage device.
SynchronizationMode() VZDiskImageSynchronizationMode
}
An interface definition for the VZDiskImageStorageDeviceAttachment class.
Creating the attachment point ¶
- [IVZDiskImageStorageDeviceAttachment.InitWithURLReadOnlyError]: Creates the attachment object from the specified disk image.
- [IVZDiskImageStorageDeviceAttachment.InitWithURLReadOnlyCachingModeSynchronizationModeError]: Initialize the attachment from a local file URL.
Getting the disk image details ¶
- [IVZDiskImageStorageDeviceAttachment.URL]: The URL of the underlying disk image.
- [IVZDiskImageStorageDeviceAttachment.ReadOnly]: A Boolean value that indicates whether the underlying disk image is read-only.
- [IVZDiskImageStorageDeviceAttachment.CachingMode]: The current cacheing mode for the virtual disk image.
- [IVZDiskImageStorageDeviceAttachment.SynchronizationMode]: The mode in which the disk image synchronizes data with the underlying storage device.
See: https://developer.apple.com/documentation/Virtualization/VZDiskImageStorageDeviceAttachment
type IVZEFIBootLoader ¶
type IVZEFIBootLoader interface {
IVZBootLoader
// The boot loader’s EFI variable store.
VariableStore() IVZEFIVariableStore
SetVariableStore(value IVZEFIVariableStore)
}
An interface definition for the VZEFIBootLoader class.
Instance properties ¶
- [IVZEFIBootLoader.VariableStore]: The boot loader’s EFI variable store.
- [IVZEFIBootLoader.SetVariableStore]
See: https://developer.apple.com/documentation/Virtualization/VZEFIBootLoader
type IVZEFIVariableStore ¶
type IVZEFIVariableStore interface {
objectivec.IObject
// Creates a new EFI variable store at specified the URL on the filesystem, initialization options, and error-return variable.
InitCreatingVariableStoreAtURLOptionsError(URL foundation.INSURL, options VZEFIVariableStoreInitializationOptions) (VZEFIVariableStore, error)
// Initialize the variable store from the URL of an existing file.
InitWithURL(URL foundation.INSURL) VZEFIVariableStore
// The URL of the variable store on the local file system.
URL() foundation.INSURL
}
An interface definition for the VZEFIVariableStore class.
Creating the variable store ¶
- [IVZEFIVariableStore.InitCreatingVariableStoreAtURLOptionsError]: Creates a new EFI variable store at specified the URL on the filesystem, initialization options, and error-return variable.
- [IVZEFIVariableStore.InitWithURL]: Initialize the variable store from the URL of an existing file.
Instance properties ¶
- [IVZEFIVariableStore.URL]: The URL of the variable store on the local file system.
See: https://developer.apple.com/documentation/Virtualization/VZEFIVariableStore
type IVZEntropyDeviceConfiguration ¶
type IVZEntropyDeviceConfiguration interface {
objectivec.IObject
}
An interface definition for the VZEntropyDeviceConfiguration class.
See: https://developer.apple.com/documentation/Virtualization/VZEntropyDeviceConfiguration
type IVZFileHandleNetworkDeviceAttachment ¶
type IVZFileHandleNetworkDeviceAttachment interface {
IVZNetworkDeviceAttachment
// Creates the attachment from a file handle that contains a connected datagram socket.
InitWithFileHandle(fileHandle foundation.NSFileHandle) VZFileHandleNetworkDeviceAttachment
// The file handle assigned to this attachment.
FileHandle() foundation.NSFileHandle
// An integer value that indicates the maximum transmission unit (MTU) associated with this attachment.
MaximumTransmissionUnit() int
SetMaximumTransmissionUnit(value int)
// The object that defines how the virtual network device communicates with the host system.
Attachment() IVZNetworkDeviceAttachment
SetAttachment(value IVZNetworkDeviceAttachment)
// The array of network devices that you expose to the guest operating system.
NetworkDevices() IVZNetworkDeviceConfiguration
SetNetworkDevices(value IVZNetworkDeviceConfiguration)
}
An interface definition for the VZFileHandleNetworkDeviceAttachment class.
Creating the attachment point ¶
- [IVZFileHandleNetworkDeviceAttachment.InitWithFileHandle]: Creates the attachment from a file handle that contains a connected datagram socket.
Getting the file handle ¶
- [IVZFileHandleNetworkDeviceAttachment.FileHandle]: The file handle assigned to this attachment.
Specifying the network packet size ¶
- [IVZFileHandleNetworkDeviceAttachment.MaximumTransmissionUnit]: An integer value that indicates the maximum transmission unit (MTU) associated with this attachment.
- [IVZFileHandleNetworkDeviceAttachment.SetMaximumTransmissionUnit]
See: https://developer.apple.com/documentation/Virtualization/VZFileHandleNetworkDeviceAttachment
type IVZFileHandleSerialPortAttachment ¶
type IVZFileHandleSerialPortAttachment interface {
IVZSerialPortAttachment
// Creates a serial port attachment object from the specified file handles.
InitWithFileHandleForReadingFileHandleForWriting(fileHandleForReading foundation.NSFileHandle, fileHandleForWriting foundation.NSFileHandle) VZFileHandleSerialPortAttachment
// The file handle that the guest operating system uses to read data.
FileHandleForReading() foundation.NSFileHandle
// The file handle that the guest operating system uses to write data.
FileHandleForWriting() foundation.NSFileHandle
}
An interface definition for the VZFileHandleSerialPortAttachment class.
Creating the attachment point ¶
- [IVZFileHandleSerialPortAttachment.InitWithFileHandleForReadingFileHandleForWriting]: Creates a serial port attachment object from the specified file handles.
Getting the file handles ¶
- [IVZFileHandleSerialPortAttachment.FileHandleForReading]: The file handle that the guest operating system uses to read data.
- [IVZFileHandleSerialPortAttachment.FileHandleForWriting]: The file handle that the guest operating system uses to write data.
See: https://developer.apple.com/documentation/Virtualization/VZFileHandleSerialPortAttachment
type IVZFileSerialPortAttachment ¶
type IVZFileSerialPortAttachment interface {
IVZSerialPortAttachment
// Creates a file-based serial port attachment object.
InitWithURLAppendError(url foundation.INSURL, shouldAppend bool) (VZFileSerialPortAttachment, error)
// The URL of a file on the local file system.
URL() foundation.INSURL
// A Boolean that indicates whether the virtual machine appends data to the file.
Append() bool
}
An interface definition for the VZFileSerialPortAttachment class.
Creating the attachment point ¶
- [IVZFileSerialPortAttachment.InitWithURLAppendError]: Creates a file-based serial port attachment object.
Getting the file details ¶
- [IVZFileSerialPortAttachment.URL]: The URL of a file on the local file system.
- [IVZFileSerialPortAttachment.Append]: A Boolean that indicates whether the virtual machine appends data to the file.
See: https://developer.apple.com/documentation/Virtualization/VZFileSerialPortAttachment
type IVZGenericMachineIdentifier ¶
type IVZGenericMachineIdentifier interface {
objectivec.IObject
// Creates a new unique identifier for a VM with the provided data.
InitWithDataRepresentation(dataRepresentation foundation.INSData) VZGenericMachineIdentifier
// An opaque data representation of the VM’s identifier.
DataRepresentation() foundation.INSData
// A Boolean value that indicates whether nested virtualization is in an enabled state.
IsNestedVirtualizationEnabled() bool
SetIsNestedVirtualizationEnabled(value bool)
// A value that represents a unique identifier for the virtual machine.
MachineIdentifier() IVZGenericMachineIdentifier
SetMachineIdentifier(value IVZGenericMachineIdentifier)
}
An interface definition for the VZGenericMachineIdentifier class.
Creating a Machine Identifier ¶
- [IVZGenericMachineIdentifier.InitWithDataRepresentation]: Creates a new unique identifier for a VM with the provided data.
Getting Information About the Machine Identifier ¶
- [IVZGenericMachineIdentifier.DataRepresentation]: An opaque data representation of the VM’s identifier.
See: https://developer.apple.com/documentation/Virtualization/VZGenericMachineIdentifier
type IVZGenericPlatformConfiguration ¶
type IVZGenericPlatformConfiguration interface {
IVZPlatformConfiguration
// A value that represents a unique identifier for the virtual machine.
MachineIdentifier() IVZGenericMachineIdentifier
SetMachineIdentifier(value IVZGenericMachineIdentifier)
// A Boolean value that indicates whether nested virtualization is in an enabled state.
NestedVirtualizationEnabled() bool
SetNestedVirtualizationEnabled(value bool)
}
An interface definition for the VZGenericPlatformConfiguration class.
Identifying the platform configuration ¶
- [IVZGenericPlatformConfiguration.MachineIdentifier]: A value that represents a unique identifier for the virtual machine.
- [IVZGenericPlatformConfiguration.SetMachineIdentifier]
- [IVZGenericPlatformConfiguration.NestedVirtualizationEnabled]: A Boolean value that indicates whether nested virtualization is in an enabled state.
- [IVZGenericPlatformConfiguration.SetNestedVirtualizationEnabled]
See: https://developer.apple.com/documentation/Virtualization/VZGenericPlatformConfiguration
type IVZGraphicsDevice ¶
type IVZGraphicsDevice interface {
objectivec.IObject
// The list of graphics displays configured for this graphics device.
Displays() []VZGraphicsDisplay
// The list of configured graphics devices on the virtual machine.
GraphicsDevices() IVZGraphicsDevice
SetGraphicsDevices(value IVZGraphicsDevice)
}
An interface definition for the VZGraphicsDevice class.
Getting the device’s displays ¶
- [IVZGraphicsDevice.Displays]: The list of graphics displays configured for this graphics device.
See: https://developer.apple.com/documentation/Virtualization/VZGraphicsDevice
type IVZGraphicsDeviceConfiguration ¶
type IVZGraphicsDeviceConfiguration interface {
objectivec.IObject
}
An interface definition for the VZGraphicsDeviceConfiguration class.
See: https://developer.apple.com/documentation/Virtualization/VZGraphicsDeviceConfiguration
type IVZGraphicsDisplay ¶
type IVZGraphicsDisplay interface {
objectivec.IObject
// Returns the size of the display, in pixels.
SizeInPixels() corefoundation.CGSize
// Adds an observer to notify about display configuration changes.
AddObserver(observer VZGraphicsDisplayObserver)
// Removes a display configuration change observer.
RemoveObserver(observer VZGraphicsDisplayObserver)
// Resize this display with the new dimensions you provide.
ReconfigureWithSizeInPixelsError(sizeInPixels corefoundation.CGSize) (bool, error)
// Reconfigure this display with the new display configuration you provide.
ReconfigureWithConfigurationError(configuration IVZGraphicsDisplayConfiguration) (bool, error)
// The list of graphics displays configured for this graphics device.
Displays() IVZGraphicsDisplay
SetDisplays(value IVZGraphicsDisplay)
}
An interface definition for the VZGraphicsDisplay class.
Getting the display size ¶
- [IVZGraphicsDisplay.SizeInPixels]: Returns the size of the display, in pixels.
Observing changes to the display configuration ¶
- [IVZGraphicsDisplay.AddObserver]: Adds an observer to notify about display configuration changes.
- [IVZGraphicsDisplay.RemoveObserver]: Removes a display configuration change observer.
Changing the display configuration ¶
- [IVZGraphicsDisplay.ReconfigureWithSizeInPixelsError]: Resize this display with the new dimensions you provide.
- [IVZGraphicsDisplay.ReconfigureWithConfigurationError]: Reconfigure this display with the new display configuration you provide.
See: https://developer.apple.com/documentation/Virtualization/VZGraphicsDisplay
type IVZGraphicsDisplayConfiguration ¶
type IVZGraphicsDisplayConfiguration interface {
objectivec.IObject
}
An interface definition for the VZGraphicsDisplayConfiguration class.
See: https://developer.apple.com/documentation/Virtualization/VZGraphicsDisplayConfiguration
type IVZHostAudioInputStreamSource ¶
type IVZHostAudioInputStreamSource interface {
IVZAudioInputStreamSource
}
An interface definition for the VZHostAudioInputStreamSource class.
See: https://developer.apple.com/documentation/Virtualization/VZHostAudioInputStreamSource
type IVZHostAudioOutputStreamSink ¶
type IVZHostAudioOutputStreamSink interface {
IVZAudioOutputStreamSink
}
An interface definition for the VZHostAudioOutputStreamSink class.
See: https://developer.apple.com/documentation/Virtualization/VZHostAudioOutputStreamSink
type IVZKeyboardConfiguration ¶
type IVZKeyboardConfiguration interface {
objectivec.IObject
}
An interface definition for the VZKeyboardConfiguration class.
See: https://developer.apple.com/documentation/Virtualization/VZKeyboardConfiguration
type IVZLinuxBootLoader ¶
type IVZLinuxBootLoader interface {
IVZBootLoader
// Creates a boot loader that launches the Linux kernel at the specified URL.
InitWithKernelURL(kernelURL foundation.INSURL) VZLinuxBootLoader
// The command-line parameters to pass to the Linux kernel at boot time.
CommandLine() string
SetCommandLine(value string)
// The location of an optional RAM disk, which the boot loader maps into memory before it boots the Linux kernel.
InitialRamdiskURL() foundation.INSURL
SetInitialRamdiskURL(value foundation.INSURL)
// The URL of the Linux kernel file.
KernelURL() foundation.INSURL
SetKernelURL(value foundation.INSURL)
// The guest system to boot when the VM starts.
BootLoader() IVZBootLoader
SetBootLoader(value IVZBootLoader)
}
An interface definition for the VZLinuxBootLoader class.
Creating the Linux boot loader ¶
- [IVZLinuxBootLoader.InitWithKernelURL]: Creates a boot loader that launches the Linux kernel at the specified URL.
Configuring the boot parameters ¶
- [IVZLinuxBootLoader.CommandLine]: The command-line parameters to pass to the Linux kernel at boot time.
- [IVZLinuxBootLoader.SetCommandLine]
- [IVZLinuxBootLoader.InitialRamdiskURL]: The location of an optional RAM disk, which the boot loader maps into memory before it boots the Linux kernel.
- [IVZLinuxBootLoader.SetInitialRamdiskURL]
Getting the kernel file ¶
- [IVZLinuxBootLoader.KernelURL]: The URL of the Linux kernel file.
- [IVZLinuxBootLoader.SetKernelURL]
See: https://developer.apple.com/documentation/Virtualization/VZLinuxBootLoader
type IVZLinuxRosettaAbstractSocketCachingOptions ¶
type IVZLinuxRosettaAbstractSocketCachingOptions interface {
IVZLinuxRosettaCachingOptions
// Initialize options to set on a Rosetta directory share.
InitWithNameError(name string) (VZLinuxRosettaAbstractSocketCachingOptions, error)
// The name of the abstract socket that Rosetta uses.
Name() string
}
An interface definition for the VZLinuxRosettaAbstractSocketCachingOptions class.
Initalizers ¶
- [IVZLinuxRosettaAbstractSocketCachingOptions.InitWithNameError]: Initialize options to set on a Rosetta directory share.
Accessing the socket name ¶
- [IVZLinuxRosettaAbstractSocketCachingOptions.Name]: The name of the abstract socket that Rosetta uses.
See: https://developer.apple.com/documentation/Virtualization/VZLinuxRosettaAbstractSocketCachingOptions
type IVZLinuxRosettaCachingOptions ¶
type IVZLinuxRosettaCachingOptions interface {
objectivec.IObject
}
An interface definition for the VZLinuxRosettaCachingOptions class.
See: https://developer.apple.com/documentation/Virtualization/VZLinuxRosettaCachingOptions
type IVZLinuxRosettaDirectoryShare ¶
type IVZLinuxRosettaDirectoryShare interface {
IVZDirectoryShare
InitWithError() (VZLinuxRosettaDirectoryShare, error)
// The value that enables translation caching and configures the socket communication type for Rosetta.
// The value that enables translation caching and configures the socket communication type for Rosetta.
}
An interface definition for the VZLinuxRosettaDirectoryShare class.
Creating a Rosetta directory share ¶
- [IVZLinuxRosettaDirectoryShare.InitWithError]: Creates a new Rosetta directory share, or returns an error if Rosetta isn’t installed.
Setting the ahead of time (AOT) caching options ¶
- [IVZLinuxRosettaDirectoryShare.CachingOptions]: The value that enables translation caching and configures the socket communication type for Rosetta.
- [IVZLinuxRosettaDirectoryShare.SetCachingOptions]
See: https://developer.apple.com/documentation/Virtualization/VZLinuxRosettaDirectoryShare
type IVZLinuxRosettaUnixSocketCachingOptions ¶
type IVZLinuxRosettaUnixSocketCachingOptions interface {
IVZLinuxRosettaCachingOptions
// Creates a new Rosetta caching options object for a UNIX domain socket with the path you specify.
InitWithPathError(path string) (VZLinuxRosettaUnixSocketCachingOptions, error)
// The path to the UNIX domain socket that Rosetta uses.
Path() string
}
An interface definition for the VZLinuxRosettaUnixSocketCachingOptions class.
Initializers ¶
- [IVZLinuxRosettaUnixSocketCachingOptions.InitWithPathError]: Creates a new Rosetta caching options object for a UNIX domain socket with the path you specify.
Accessing the socket path ¶
- [IVZLinuxRosettaUnixSocketCachingOptions.Path]: The path to the UNIX domain socket that Rosetta uses.
See: https://developer.apple.com/documentation/Virtualization/VZLinuxRosettaUnixSocketCachingOptions
type IVZMACAddress ¶
type IVZMACAddress interface {
objectivec.IObject
// Creates a MAC address object from a specially formatted string.
InitWithString(string_ string) VZMACAddress
// Creates a MAC address from the specified 48-bit Ethernet address.
InitWithEthernetAddress(ethernetAddress unsafe.Pointer) VZMACAddress
// The MAC address as a formatted string.
String() string
// The MAC address as an Ethernet data structure.
EthernetAddress() [6]byte
// A Boolean value that indicates whether the address is a broadcast address.
IsBroadcastAddress() bool
// A Boolean value that indicates whether the address is a multicast address.
IsMulticastAddress() bool
// A Boolean value that indicates whether the address is a unicast address.
IsUnicastAddress() bool
// A Boolean value that indicates whether the address is a locally administered address (LAA).
IsLocallyAdministeredAddress() bool
// A Boolean value that indicates whether the address is a universally adminstered address (UAA).
IsUniversallyAdministeredAddress() bool
}
An interface definition for the VZMACAddress class.
Creating a MAC address ¶
- [IVZMACAddress.InitWithString]: Creates a MAC address object from a specially formatted string.
- [IVZMACAddress.InitWithEthernetAddress]: Creates a MAC address from the specified 48-bit Ethernet address.
Getting the address ¶
- [IVZMACAddress.String]: The MAC address as a formatted string.
- [IVZMACAddress.EthernetAddress]: The MAC address as an Ethernet data structure.
Getting address attributes ¶
- [IVZMACAddress.IsBroadcastAddress]: A Boolean value that indicates whether the address is a broadcast address.
- [IVZMACAddress.IsMulticastAddress]: A Boolean value that indicates whether the address is a multicast address.
- [IVZMACAddress.IsUnicastAddress]: A Boolean value that indicates whether the address is a unicast address.
- [IVZMACAddress.IsLocallyAdministeredAddress]: A Boolean value that indicates whether the address is a locally administered address (LAA).
- [IVZMACAddress.IsUniversallyAdministeredAddress]: A Boolean value that indicates whether the address is a universally adminstered address (UAA).
See: https://developer.apple.com/documentation/Virtualization/VZMACAddress
type IVZMacAuxiliaryStorage ¶
type IVZMacAuxiliaryStorage interface {
objectivec.IObject
// Initializes an auxiliary storage object with data from the location at the URL you provide.
InitWithURL(URL foundation.INSURL) VZMacAuxiliaryStorage
// Creates an initialized Mac auxiliary storage instance that describes a specific hardware model at a URL you specify.
InitCreatingStorageAtURLHardwareModelOptionsError(URL foundation.INSURL, hardwareModel IVZMacHardwareModel, options VZMacAuxiliaryStorageInitializationOptions) (VZMacAuxiliaryStorage, error)
// The URL of the auxiliary storage on the local file system.
URL() foundation.INSURL
// The Mac auxiliary storage.
AuxiliaryStorage() IVZMacAuxiliaryStorage
SetAuxiliaryStorage(value IVZMacAuxiliaryStorage)
// The Mac hardware model.
HardwareModel() IVZMacHardwareModel
SetHardwareModel(value IVZMacHardwareModel)
// This object represents the most fully featured configuration that’s supported by both the current host and by this restore image.
MostFeaturefulSupportedConfiguration() IVZMacOSConfigurationRequirements
SetMostFeaturefulSupportedConfiguration(value IVZMacOSConfigurationRequirements)
}
An interface definition for the VZMacAuxiliaryStorage class.
Creating the auxiliary storage ¶
- [IVZMacAuxiliaryStorage.InitWithURL]: Initializes an auxiliary storage object with data from the location at the URL you provide.
- [IVZMacAuxiliaryStorage.InitCreatingStorageAtURLHardwareModelOptionsError]: Creates an initialized Mac auxiliary storage instance that describes a specific hardware model at a URL you specify.
Configuring the auxiliary storage location ¶
- [IVZMacAuxiliaryStorage.URL]: The URL of the auxiliary storage on the local file system.
See: https://developer.apple.com/documentation/Virtualization/VZMacAuxiliaryStorage
type IVZMacGraphicsDevice ¶
type IVZMacGraphicsDevice interface {
IVZGraphicsDevice
}
An interface definition for the VZMacGraphicsDevice class.
See: https://developer.apple.com/documentation/Virtualization/VZMacGraphicsDevice
type IVZMacGraphicsDeviceConfiguration ¶
type IVZMacGraphicsDeviceConfiguration interface {
IVZGraphicsDeviceConfiguration
// The displays associated with this graphics device.
Displays() []VZMacGraphicsDisplayConfiguration
SetDisplays(value []VZMacGraphicsDisplayConfiguration)
}
An interface definition for the VZMacGraphicsDeviceConfiguration class.
Configuring displays ¶
- [IVZMacGraphicsDeviceConfiguration.Displays]: The displays associated with this graphics device.
- [IVZMacGraphicsDeviceConfiguration.SetDisplays]
See: https://developer.apple.com/documentation/Virtualization/VZMacGraphicsDeviceConfiguration
type IVZMacGraphicsDisplay ¶
type IVZMacGraphicsDisplay interface {
IVZGraphicsDisplay
// Returns the pixel density of the display in pixels per inch.
PixelsPerInch() int
}
An interface definition for the VZMacGraphicsDisplay class.
Getting the display’s pixel density ¶
- [IVZMacGraphicsDisplay.PixelsPerInch]: Returns the pixel density of the display in pixels per inch.
See: https://developer.apple.com/documentation/Virtualization/VZMacGraphicsDisplay
type IVZMacGraphicsDisplayConfiguration ¶
type IVZMacGraphicsDisplayConfiguration interface {
IVZGraphicsDisplayConfiguration
// Create a display configuration suitable for showing on the specified screen.
InitForScreenSizeInPoints(screen appkit.NSScreen, sizeInPoints corefoundation.CGSize) VZMacGraphicsDisplayConfiguration
// Create a display configuration with the specified pixel dimensions and pixel density.
InitWithWidthInPixelsHeightInPixelsPixelsPerInch(widthInPixels int, heightInPixels int, pixelsPerInch int) VZMacGraphicsDisplayConfiguration
// The height of the display, in pixels.
HeightInPixels() int
SetHeightInPixels(value int)
// The width of the display, in pixels.
WidthInPixels() int
SetWidthInPixels(value int)
// The pixel density in pixels per inch.
PixelsPerInch() int
SetPixelsPerInch(value int)
}
An interface definition for the VZMacGraphicsDisplayConfiguration class.
Creating the display configuration ¶
- [IVZMacGraphicsDisplayConfiguration.InitForScreenSizeInPoints]: Create a display configuration suitable for showing on the specified screen.
- [IVZMacGraphicsDisplayConfiguration.InitWithWidthInPixelsHeightInPixelsPixelsPerInch]: Create a display configuration with the specified pixel dimensions and pixel density.
Configuring the display properties ¶
- [IVZMacGraphicsDisplayConfiguration.HeightInPixels]: The height of the display, in pixels.
- [IVZMacGraphicsDisplayConfiguration.SetHeightInPixels]
- [IVZMacGraphicsDisplayConfiguration.WidthInPixels]: The width of the display, in pixels.
- [IVZMacGraphicsDisplayConfiguration.SetWidthInPixels]
- [IVZMacGraphicsDisplayConfiguration.PixelsPerInch]: The pixel density in pixels per inch.
- [IVZMacGraphicsDisplayConfiguration.SetPixelsPerInch]
See: https://developer.apple.com/documentation/Virtualization/VZMacGraphicsDisplayConfiguration
type IVZMacHardwareModel ¶
type IVZMacHardwareModel interface {
objectivec.IObject
// Creates an instance of the hardware model described by the specified data representation.
InitWithDataRepresentation(dataRepresentation foundation.INSData) VZMacHardwareModel
// Returns the opaque data representation of the hardware model.
DataRepresentation() foundation.INSData
// A Boolean value that indicates whether the host supports this hardware model.
Supported() bool
// The Mac hardware model.
HardwareModel() IVZMacHardwareModel
SetHardwareModel(value IVZMacHardwareModel)
// This object represents the most fully featured configuration that’s supported by both the current host and by this restore image.
MostFeaturefulSupportedConfiguration() IVZMacOSConfigurationRequirements
SetMostFeaturefulSupportedConfiguration(value IVZMacOSConfigurationRequirements)
}
An interface definition for the VZMacHardwareModel class.
Creating the hardware model ¶
- [IVZMacHardwareModel.InitWithDataRepresentation]: Creates an instance of the hardware model described by the specified data representation.
Configuring the hardware model ¶
- [IVZMacHardwareModel.DataRepresentation]: Returns the opaque data representation of the hardware model.
- [IVZMacHardwareModel.Supported]: A Boolean value that indicates whether the host supports this hardware model.
See: https://developer.apple.com/documentation/Virtualization/VZMacHardwareModel
type IVZMacKeyboardConfiguration ¶
type IVZMacKeyboardConfiguration interface {
IVZKeyboardConfiguration
}
An interface definition for the VZMacKeyboardConfiguration class.
See: https://developer.apple.com/documentation/Virtualization/VZMacKeyboardConfiguration
type IVZMacMachineIdentifier ¶
type IVZMacMachineIdentifier interface {
objectivec.IObject
// Create a machine identifier described by the specified data representation.
InitWithDataRepresentation(dataRepresentation foundation.INSData) VZMacMachineIdentifier
// Returns the opaque data representation of the machine identifier.
DataRepresentation() foundation.INSData
}
An interface definition for the VZMacMachineIdentifier class.
Creating a machine identifier ¶
- [IVZMacMachineIdentifier.InitWithDataRepresentation]: Create a machine identifier described by the specified data representation.
Machine data representation ¶
- [IVZMacMachineIdentifier.DataRepresentation]: Returns the opaque data representation of the machine identifier.
See: https://developer.apple.com/documentation/Virtualization/VZMacMachineIdentifier
type IVZMacOSBootLoader ¶
type IVZMacOSBootLoader interface {
IVZBootLoader
// The hardware platform to use.
Platform() IVZPlatformConfiguration
SetPlatform(value IVZPlatformConfiguration)
}
An interface definition for the VZMacOSBootLoader class.
See: https://developer.apple.com/documentation/Virtualization/VZMacOSBootLoader
type IVZMacOSConfigurationRequirements ¶
type IVZMacOSConfigurationRequirements interface {
objectivec.IObject
// The hardware model for this configuration.
HardwareModel() IVZMacHardwareModel
// The minimum supported number of CPUs for this configuration.
MinimumSupportedCPUCount() uint
// The minimum supported memory size for this configuration.
MinimumSupportedMemorySize() uint64
}
An interface definition for the VZMacOSConfigurationRequirements class.
Configuration Requirements ¶
- [IVZMacOSConfigurationRequirements.HardwareModel]: The hardware model for this configuration.
- [IVZMacOSConfigurationRequirements.MinimumSupportedCPUCount]: The minimum supported number of CPUs for this configuration.
- [IVZMacOSConfigurationRequirements.MinimumSupportedMemorySize]: The minimum supported memory size for this configuration.
See: https://developer.apple.com/documentation/Virtualization/VZMacOSConfigurationRequirements
type IVZMacOSInstaller ¶
type IVZMacOSInstaller interface {
objectivec.IObject
// Creates a macOS installer object.
InitWithVirtualMachineRestoreImageURL(virtualMachine IVZVirtualMachine, restoreImageFileURL foundation.INSURL) VZMacOSInstaller
// A progress object that you can use to observe or cancel an installation.
Progress() foundation.NSProgress
// The restore image URL used to initialize this installer.
RestoreImageURL() foundation.INSURL
// The virtual machine used to initialize this installer.
VirtualMachine() IVZVirtualMachine
// Start installing macOS.
InstallWithCompletionHandler(completionHandler ErrorHandler)
}
An interface definition for the VZMacOSInstaller class.
Creating a macOS Installer ¶
- [IVZMacOSInstaller.InitWithVirtualMachineRestoreImageURL]: Creates a macOS installer object.
Getting Information About an Installation ¶
- [IVZMacOSInstaller.Progress]: A progress object that you can use to observe or cancel an installation.
- [IVZMacOSInstaller.RestoreImageURL]: The restore image URL used to initialize this installer.
- [IVZMacOSInstaller.VirtualMachine]: The virtual machine used to initialize this installer.
Installing macOS ¶
- [IVZMacOSInstaller.InstallWithCompletionHandler]: Start installing macOS.
See: https://developer.apple.com/documentation/Virtualization/VZMacOSInstaller
type IVZMacOSRestoreImage ¶
type IVZMacOSRestoreImage interface {
objectivec.IObject
// The build version this restore image contains.
BuildVersion() string
// A Boolean value that indicates whether the current host supports this restore image.
Supported() bool
// This object represents the most fully featured configuration that’s supported by both the current host and by this restore image.
MostFeaturefulSupportedConfiguration() IVZMacOSConfigurationRequirements
// The operating system version this restore image contains.
OperatingSystemVersion() foundation.NSOperatingSystemVersion
// The URL of this restore image.
URL() foundation.INSURL
// The Mac hardware model.
HardwareModel() IVZMacHardwareModel
SetHardwareModel(value IVZMacHardwareModel)
}
An interface definition for the VZMacOSRestoreImage class.
Getting Information About the Restore Image ¶
- [IVZMacOSRestoreImage.BuildVersion]: The build version this restore image contains.
- [IVZMacOSRestoreImage.Supported]: A Boolean value that indicates whether the current host supports this restore image.
- [IVZMacOSRestoreImage.MostFeaturefulSupportedConfiguration]: This object represents the most fully featured configuration that’s supported by both the current host and by this restore image.
- [IVZMacOSRestoreImage.OperatingSystemVersion]: The operating system version this restore image contains.
- [IVZMacOSRestoreImage.URL]: The URL of this restore image.
See: https://developer.apple.com/documentation/Virtualization/VZMacOSRestoreImage
type IVZMacOSVirtualMachineStartOptions ¶
type IVZMacOSVirtualMachineStartOptions interface {
IVZVirtualMachineStartOptions
// A Boolean value that indicates whether the macOS guest should start in recovery mode.
StartUpFromMacOSRecovery() bool
SetStartUpFromMacOSRecovery(value bool)
}
An interface definition for the VZMacOSVirtualMachineStartOptions class.
Setting recovery mode ¶
- [IVZMacOSVirtualMachineStartOptions.StartUpFromMacOSRecovery]: A Boolean value that indicates whether the macOS guest should start in recovery mode.
- [IVZMacOSVirtualMachineStartOptions.SetStartUpFromMacOSRecovery]
See: https://developer.apple.com/documentation/Virtualization/VZMacOSVirtualMachineStartOptions
type IVZMacPlatformConfiguration ¶
type IVZMacPlatformConfiguration interface {
IVZPlatformConfiguration
// The Mac auxiliary storage.
AuxiliaryStorage() IVZMacAuxiliaryStorage
SetAuxiliaryStorage(value IVZMacAuxiliaryStorage)
// The Mac hardware model.
HardwareModel() IVZMacHardwareModel
SetHardwareModel(value IVZMacHardwareModel)
// The Mac machine identifier.
MachineIdentifier() IVZMacMachineIdentifier
SetMachineIdentifier(value IVZMacMachineIdentifier)
// This object represents the most fully featured configuration that’s supported by both the current host and by this restore image.
MostFeaturefulSupportedConfiguration() IVZMacOSConfigurationRequirements
SetMostFeaturefulSupportedConfiguration(value IVZMacOSConfigurationRequirements)
}
An interface definition for the VZMacPlatformConfiguration class.
Getting platform properties ¶
- [IVZMacPlatformConfiguration.AuxiliaryStorage]: The Mac auxiliary storage.
- [IVZMacPlatformConfiguration.SetAuxiliaryStorage]
- [IVZMacPlatformConfiguration.HardwareModel]: The Mac hardware model.
- [IVZMacPlatformConfiguration.SetHardwareModel]
- [IVZMacPlatformConfiguration.MachineIdentifier]: The Mac machine identifier.
- [IVZMacPlatformConfiguration.SetMachineIdentifier]
See: https://developer.apple.com/documentation/Virtualization/VZMacPlatformConfiguration
type IVZMacTrackpadConfiguration ¶
type IVZMacTrackpadConfiguration interface {
IVZPointingDeviceConfiguration
// The list of pointing devices.
PointingDevices() IVZPointingDeviceConfiguration
SetPointingDevices(value IVZPointingDeviceConfiguration)
}
An interface definition for the VZMacTrackpadConfiguration class.
See: https://developer.apple.com/documentation/Virtualization/VZMacTrackpadConfiguration
type IVZMemoryBalloonDevice ¶
type IVZMemoryBalloonDevice interface {
objectivec.IObject
// An array that you configure with a memory balloon device, used to update the memory in the VM.
MemoryBalloonDevices() IVZMemoryBalloonDeviceConfiguration
SetMemoryBalloonDevices(value IVZMemoryBalloonDeviceConfiguration)
}
An interface definition for the VZMemoryBalloonDevice class.
See: https://developer.apple.com/documentation/Virtualization/VZMemoryBalloonDevice
type IVZMemoryBalloonDeviceConfiguration ¶
type IVZMemoryBalloonDeviceConfiguration interface {
objectivec.IObject
}
An interface definition for the VZMemoryBalloonDeviceConfiguration class.
See: https://developer.apple.com/documentation/Virtualization/VZMemoryBalloonDeviceConfiguration
type IVZMultipleDirectoryShare ¶
type IVZMultipleDirectoryShare interface {
IVZDirectoryShare
InitWithDirectories(directories foundation.INSDictionary) VZMultipleDirectoryShare
Directories() foundation.INSDictionary
}
An interface definition for the VZMultipleDirectoryShare class.
Creating a directory share ¶
- [IVZMultipleDirectoryShare.InitWithDirectories]: Creates the directory share with a set of directories on the host.
Accessing the shared directories ¶
- [IVZMultipleDirectoryShare.Directories]: The directories on the host to expose to the guest.
See: https://developer.apple.com/documentation/Virtualization/VZMultipleDirectoryShare
type IVZNATNetworkDeviceAttachment ¶
type IVZNATNetworkDeviceAttachment interface {
IVZNetworkDeviceAttachment
// The object that defines how the virtual network device communicates with the host system.
Attachment() IVZNetworkDeviceAttachment
SetAttachment(value IVZNetworkDeviceAttachment)
// The array of network devices that you expose to the guest operating system.
NetworkDevices() IVZNetworkDeviceConfiguration
SetNetworkDevices(value IVZNetworkDeviceConfiguration)
}
An interface definition for the VZNATNetworkDeviceAttachment class.
See: https://developer.apple.com/documentation/Virtualization/VZNATNetworkDeviceAttachment
type IVZNVMExpressControllerDeviceConfiguration ¶
type IVZNVMExpressControllerDeviceConfiguration interface {
IVZStorageDeviceConfiguration
// Creates a new NVM Express controller configuration with the storage device attachment you provide.
InitWithAttachment(attachment IVZStorageDeviceAttachment) VZNVMExpressControllerDeviceConfiguration
}
An interface definition for the VZNVMExpressControllerDeviceConfiguration class.
Creating a new device configuration ¶
- [IVZNVMExpressControllerDeviceConfiguration.InitWithAttachment]: Creates a new NVM Express controller configuration with the storage device attachment you provide.
See: https://developer.apple.com/documentation/Virtualization/VZNVMExpressControllerDeviceConfiguration
type IVZNetworkBlockDeviceStorageDeviceAttachment ¶
type IVZNetworkBlockDeviceStorageDeviceAttachment interface {
IVZStorageDeviceAttachment
// Creates a new network block device (NBD) storage attachment from an NDB Uniform Resource Indicator (URI) represented as a URL that you provide.
InitWithURLError(URL foundation.INSURL) (VZNetworkBlockDeviceStorageDeviceAttachment, error)
// Creates a new network block device storage attachment from an NBD Uniform Resource Indicator (URI) represented as a URL, timeout value, and read-only and synchronization modes that you provide.
InitWithURLTimeoutForcedReadOnlySynchronizationModeError(URL foundation.INSURL, timeout float64, forcedReadOnly bool, synchronizationMode VZDiskSynchronizationMode) (VZNetworkBlockDeviceStorageDeviceAttachment, error)
// Returns a Boolean value that indicates whether the underlying disk attachment network is in a read-only state.
ForcedReadOnly() bool
// The mode in which the NBD client synchronizes data with the NBD server.
SynchronizationMode() VZDiskSynchronizationMode
// The timeout value in seconds for the connection between the client and server.
Timeout() float64
// The URL that refers to the NBD server to which the NBD client will connect.
URL() foundation.INSURL
// The object that receives messages about changes to the network block device attachment.
Delegate() VZNetworkBlockDeviceStorageDeviceAttachmentDelegate
SetDelegate(value VZNetworkBlockDeviceStorageDeviceAttachmentDelegate)
}
An interface definition for the VZNetworkBlockDeviceStorageDeviceAttachment class.
Creating network block device attachments ¶
- [IVZNetworkBlockDeviceStorageDeviceAttachment.InitWithURLError]: Creates a new network block device (NBD) storage attachment from an NDB Uniform Resource Indicator (URI) represented as a URL that you provide.
- [IVZNetworkBlockDeviceStorageDeviceAttachment.InitWithURLTimeoutForcedReadOnlySynchronizationModeError]: Creates a new network block device storage attachment from an NBD Uniform Resource Indicator (URI) represented as a URL, timeout value, and read-only and synchronization modes that you provide.
Getting information about the attachment point ¶
- [IVZNetworkBlockDeviceStorageDeviceAttachment.ForcedReadOnly]: Returns a Boolean value that indicates whether the underlying disk attachment network is in a read-only state.
- [IVZNetworkBlockDeviceStorageDeviceAttachment.SynchronizationMode]: The mode in which the NBD client synchronizes data with the NBD server.
- [IVZNetworkBlockDeviceStorageDeviceAttachment.Timeout]: The timeout value in seconds for the connection between the client and server.
- [IVZNetworkBlockDeviceStorageDeviceAttachment.URL]: The URL that refers to the NBD server to which the NBD client will connect.
Observing changes to the network block device ¶
- [IVZNetworkBlockDeviceStorageDeviceAttachment.Delegate]: The object that receives messages about changes to the network block device attachment.
- [IVZNetworkBlockDeviceStorageDeviceAttachment.SetDelegate]
See: https://developer.apple.com/documentation/Virtualization/VZNetworkBlockDeviceStorageDeviceAttachment
type IVZNetworkDevice ¶
type IVZNetworkDevice interface {
objectivec.IObject
// The network attachment that’s connected to this network device.
Attachment() IVZNetworkDeviceAttachment
SetAttachment(value IVZNetworkDeviceAttachment)
// The list of configured network devices on the VM.
NetworkDevices() IVZNetworkDevice
SetNetworkDevices(value IVZNetworkDevice)
}
An interface definition for the VZNetworkDevice class.
Getting the network attachment point ¶
- [IVZNetworkDevice.Attachment]: The network attachment that’s connected to this network device.
- [IVZNetworkDevice.SetAttachment]
See: https://developer.apple.com/documentation/Virtualization/VZNetworkDevice
type IVZNetworkDeviceAttachment ¶
type IVZNetworkDeviceAttachment interface {
objectivec.IObject
}
An interface definition for the VZNetworkDeviceAttachment class.
See: https://developer.apple.com/documentation/Virtualization/VZNetworkDeviceAttachment
type IVZNetworkDeviceConfiguration ¶
type IVZNetworkDeviceConfiguration interface {
objectivec.IObject
// The object that defines how the virtual network device communicates with the host system.
Attachment() IVZNetworkDeviceAttachment
SetAttachment(value IVZNetworkDeviceAttachment)
// The media access control (MAC) address to assign to the network device.
MACAddress() IVZMACAddress
SetMACAddress(value IVZMACAddress)
}
An interface definition for the VZNetworkDeviceConfiguration class.
Setting configuration attributes ¶
- [IVZNetworkDeviceConfiguration.Attachment]: The object that defines how the virtual network device communicates with the host system.
- [IVZNetworkDeviceConfiguration.SetAttachment]
- [IVZNetworkDeviceConfiguration.MACAddress]: The media access control (MAC) address to assign to the network device.
- [IVZNetworkDeviceConfiguration.SetMACAddress]
See: https://developer.apple.com/documentation/Virtualization/VZNetworkDeviceConfiguration
type IVZPlatformConfiguration ¶
type IVZPlatformConfiguration interface {
objectivec.IObject
}
An interface definition for the VZPlatformConfiguration class.
See: https://developer.apple.com/documentation/Virtualization/VZPlatformConfiguration
type IVZPointingDeviceConfiguration ¶
type IVZPointingDeviceConfiguration interface {
objectivec.IObject
}
An interface definition for the VZPointingDeviceConfiguration class.
See: https://developer.apple.com/documentation/Virtualization/VZPointingDeviceConfiguration
type IVZSerialPortAttachment ¶
type IVZSerialPortAttachment interface {
objectivec.IObject
}
An interface definition for the VZSerialPortAttachment class.
See: https://developer.apple.com/documentation/Virtualization/VZSerialPortAttachment
type IVZSerialPortConfiguration ¶
type IVZSerialPortConfiguration interface {
objectivec.IObject
// The object that defines how the configuration of the virtual machine’s serial port interfaces.
Attachment() IVZSerialPortAttachment
SetAttachment(value IVZSerialPortAttachment)
}
An interface definition for the VZSerialPortConfiguration class.
Configuring the Attachment Point ¶
- [IVZSerialPortConfiguration.Attachment]: The object that defines how the configuration of the virtual machine’s serial port interfaces.
- [IVZSerialPortConfiguration.SetAttachment]
See: https://developer.apple.com/documentation/Virtualization/VZSerialPortConfiguration
type IVZSharedDirectory ¶
type IVZSharedDirectory interface {
objectivec.IObject
InitWithURLReadOnly(url foundation.INSURL, readOnly bool) VZSharedDirectory
URL() foundation.INSURL
ReadOnly() bool
}
An interface definition for the VZSharedDirectory class.
Creating a Shared Directory ¶
- [IVZSharedDirectory.InitWithURLReadOnly]: Initialize with a host directory.
Accessing Directory Properties ¶
- [IVZSharedDirectory.URL]: A file URL to a directory on the host system to expose to the guest.
- [IVZSharedDirectory.ReadOnly]: A Boolean value that indicates whether the directory is read-only to the guest.
See: https://developer.apple.com/documentation/Virtualization/VZSharedDirectory
type IVZSingleDirectoryShare ¶
type IVZSingleDirectoryShare interface {
IVZDirectoryShare
InitWithDirectory(directory IVZSharedDirectory) VZSingleDirectoryShare
Directory() IVZSharedDirectory
}
An interface definition for the VZSingleDirectoryShare class.
Creating a directory share ¶
- [IVZSingleDirectoryShare.InitWithDirectory]: Creates a directory share with a directory that you specify on the host.
Accessing directory properties ¶
- [IVZSingleDirectoryShare.Directory]: The directory on the host to share with the guest VM.
See: https://developer.apple.com/documentation/Virtualization/VZSingleDirectoryShare
type IVZSocketDevice ¶
type IVZSocketDevice interface {
objectivec.IObject
// The array of socket devices that the VM configures for use ports in the guest VM.
SocketDevices() IVZSocketDevice
SetSocketDevices(value IVZSocketDevice)
}
An interface definition for the VZSocketDevice class.
See: https://developer.apple.com/documentation/Virtualization/VZSocketDevice
type IVZSocketDeviceConfiguration ¶
type IVZSocketDeviceConfiguration interface {
objectivec.IObject
}
An interface definition for the VZSocketDeviceConfiguration class.
See: https://developer.apple.com/documentation/Virtualization/VZSocketDeviceConfiguration
type IVZSpiceAgentPortAttachment ¶
type IVZSpiceAgentPortAttachment interface {
IVZSerialPortAttachment
// A Boolean value that indicates whether the framework needs to share the clipboard between the host and the VM.
}
An interface definition for the VZSpiceAgentPortAttachment class.
Enabling clipboard sharing between the host and the VM ¶
- [IVZSpiceAgentPortAttachment.SharesClipboard]: A Boolean value that indicates whether the framework needs to share the clipboard between the host and the VM.
- [IVZSpiceAgentPortAttachment.SetSharesClipboard]
See: https://developer.apple.com/documentation/Virtualization/VZSpiceAgentPortAttachment
type IVZStorageDevice ¶
type IVZStorageDevice interface {
objectivec.IObject
}
An interface definition for the VZStorageDevice class.
See: https://developer.apple.com/documentation/Virtualization/VZStorageDevice
type IVZStorageDeviceAttachment ¶
type IVZStorageDeviceAttachment interface {
objectivec.IObject
}
An interface definition for the VZStorageDeviceAttachment class.
See: https://developer.apple.com/documentation/Virtualization/VZStorageDeviceAttachment
type IVZStorageDeviceConfiguration ¶
type IVZStorageDeviceConfiguration interface {
objectivec.IObject
// The attachment object that provides the underlying storage for the device.
Attachment() IVZStorageDeviceAttachment
}
An interface definition for the VZStorageDeviceConfiguration class.
Getting the attachment point ¶
- [IVZStorageDeviceConfiguration.Attachment]: The attachment object that provides the underlying storage for the device.
See: https://developer.apple.com/documentation/Virtualization/VZStorageDeviceConfiguration
type IVZUSBController ¶
type IVZUSBController interface {
objectivec.IObject
// The list of attached USB devices for the controller.
UsbDevices() []objectivec.IObject
// Attaches a USB device to the controller.
AttachDeviceCompletionHandler(device VZUSBDevice, completionHandler ErrorHandler)
// Detaches a USB device from the controller.
DetachDeviceCompletionHandler(device VZUSBDevice, completionHandler ErrorHandler)
// The list of runtime USB controller objects.
UsbControllers() IVZUSBController
SetUsbControllers(value IVZUSBController)
}
An interface definition for the VZUSBController class.
Instance properties ¶
- [IVZUSBController.UsbDevices]: The list of attached USB devices for the controller.
Attaching and detaching devices ¶
- [IVZUSBController.AttachDeviceCompletionHandler]: Attaches a USB device to the controller.
- [IVZUSBController.DetachDeviceCompletionHandler]: Detaches a USB device from the controller.
See: https://developer.apple.com/documentation/Virtualization/VZUSBController
type IVZUSBControllerConfiguration ¶
type IVZUSBControllerConfiguration interface {
objectivec.IObject
// The list of USB devices.
UsbDevices() []objectivec.IObject
SetUsbDevices(value []objectivec.IObject)
}
An interface definition for the VZUSBControllerConfiguration class.
Instance properties ¶
- [IVZUSBControllerConfiguration.UsbDevices]: The list of USB devices.
- [IVZUSBControllerConfiguration.SetUsbDevices]
See: https://developer.apple.com/documentation/Virtualization/VZUSBControllerConfiguration
type IVZUSBKeyboardConfiguration ¶
type IVZUSBKeyboardConfiguration interface {
IVZKeyboardConfiguration
}
An interface definition for the VZUSBKeyboardConfiguration class.
See: https://developer.apple.com/documentation/Virtualization/VZUSBKeyboardConfiguration
type IVZUSBMassStorageDevice ¶
type IVZUSBMassStorageDevice interface {
IVZStorageDevice
VZUSBDevice
// Creates a USB mass storage device with the provided configuration.
InitWithConfiguration(configuration IVZUSBMassStorageDeviceConfiguration) VZUSBMassStorageDevice
// The list of attached USB devices for the controller.
UsbDevices() VZUSBDevice
SetUsbDevices(value VZUSBDevice)
}
An interface definition for the VZUSBMassStorageDevice class.
Creating a USB mass storage device ¶
- [IVZUSBMassStorageDevice.InitWithConfiguration]: Creates a USB mass storage device with the provided configuration.
See: https://developer.apple.com/documentation/Virtualization/VZUSBMassStorageDevice
type IVZUSBMassStorageDeviceConfiguration ¶
type IVZUSBMassStorageDeviceConfiguration interface {
IVZStorageDeviceConfiguration
VZUSBDeviceConfiguration
// Creates a new storage device configuration with the specified attachment.
InitWithAttachment(attachment IVZStorageDeviceAttachment) VZUSBMassStorageDeviceConfiguration
}
An interface definition for the VZUSBMassStorageDeviceConfiguration class.
Creating the configuration object ¶
- [IVZUSBMassStorageDeviceConfiguration.InitWithAttachment]: Creates a new storage device configuration with the specified attachment.
See: https://developer.apple.com/documentation/Virtualization/VZUSBMassStorageDeviceConfiguration
type IVZUSBScreenCoordinatePointingDeviceConfiguration ¶
type IVZUSBScreenCoordinatePointingDeviceConfiguration interface {
IVZPointingDeviceConfiguration
}
An interface definition for the VZUSBScreenCoordinatePointingDeviceConfiguration class.
type IVZVirtioBlockDeviceConfiguration ¶
type IVZVirtioBlockDeviceConfiguration interface {
IVZStorageDeviceConfiguration
// Creates a block device configuration object that uses the specified storage medium.
InitWithAttachment(attachment IVZStorageDeviceAttachment) VZVirtioBlockDeviceConfiguration
// The string that identifies the VIRTIO block device.
BlockDeviceIdentifier() string
SetBlockDeviceIdentifier(value string)
// The array of storage devices that you expose to the guest operating system.
StorageDevices() IVZStorageDeviceConfiguration
SetStorageDevices(value IVZStorageDeviceConfiguration)
}
An interface definition for the VZVirtioBlockDeviceConfiguration class.
Creating the configuration object ¶
- [IVZVirtioBlockDeviceConfiguration.InitWithAttachment]: Creates a block device configuration object that uses the specified storage medium.
Identifying a block device ¶
- [IVZVirtioBlockDeviceConfiguration.BlockDeviceIdentifier]: The string that identifies the VIRTIO block device.
- [IVZVirtioBlockDeviceConfiguration.SetBlockDeviceIdentifier]
See: https://developer.apple.com/documentation/Virtualization/VZVirtioBlockDeviceConfiguration
type IVZVirtioConsoleDevice ¶
type IVZVirtioConsoleDevice interface {
IVZConsoleDevice
// The array of console ports that a specific device uses.
Ports() IVZVirtioConsolePortArray
// The delegate object for the console device.
Delegate() VZVirtioConsoleDeviceDelegate
SetDelegate(value VZVirtioConsoleDeviceDelegate)
}
An interface definition for the VZVirtioConsoleDevice class.
Configuring the console ¶
- [IVZVirtioConsoleDevice.Ports]: The array of console ports that a specific device uses.
- [IVZVirtioConsoleDevice.Delegate]: The delegate object for the console device.
- [IVZVirtioConsoleDevice.SetDelegate]
See: https://developer.apple.com/documentation/Virtualization/VZVirtioConsoleDevice
type IVZVirtioConsoleDeviceConfiguration ¶
type IVZVirtioConsoleDeviceConfiguration interface {
IVZConsoleDeviceConfiguration
// The list of Virtio port configurations.
Ports() IVZVirtioConsolePortConfigurationArray
// The array of console devices that you expose to the guest operating system.
ConsoleDevices() IVZConsoleDeviceConfiguration
SetConsoleDevices(value IVZConsoleDeviceConfiguration)
}
An interface definition for the VZVirtioConsoleDeviceConfiguration class.
Configuring the console ports ¶
- [IVZVirtioConsoleDeviceConfiguration.Ports]: The list of Virtio port configurations.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioConsoleDeviceConfiguration
type IVZVirtioConsoleDeviceSerialPortConfiguration ¶
type IVZVirtioConsoleDeviceSerialPortConfiguration interface {
IVZSerialPortConfiguration
}
An interface definition for the VZVirtioConsoleDeviceSerialPortConfiguration class.
type IVZVirtioConsolePort ¶
type IVZVirtioConsolePort interface {
objectivec.IObject
// The name of the port.
Name() string
// An array of serial port attachments.
Attachment() IVZSerialPortAttachment
SetAttachment(value IVZSerialPortAttachment)
// The array of console ports that a specific device uses.
Ports() IVZVirtioConsolePortArray
SetPorts(value IVZVirtioConsolePortArray)
}
An interface definition for the VZVirtioConsolePort class.
Configuring the port ¶
- [IVZVirtioConsolePort.Name]: The name of the port.
- [IVZVirtioConsolePort.Attachment]: An array of serial port attachments.
- [IVZVirtioConsolePort.SetAttachment]
See: https://developer.apple.com/documentation/Virtualization/VZVirtioConsolePort
type IVZVirtioConsolePortArray ¶
type IVZVirtioConsolePortArray interface {
objectivec.IObject
// An unsigned integer that represents the maximum number of ports allocated by this device.
MaximumPortCount() uint32
// Returns the Virtio console port at the specified index.
ObjectAtIndexedSubscript(portIndex uint) IVZVirtioConsolePort
}
An interface definition for the VZVirtioConsolePortArray class.
Determining the number of ports ¶
- [IVZVirtioConsolePortArray.MaximumPortCount]: An unsigned integer that represents the maximum number of ports allocated by this device.
Accessing a specific port ¶
- [IVZVirtioConsolePortArray.ObjectAtIndexedSubscript]: Returns the Virtio console port at the specified index.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioConsolePortArray
type IVZVirtioConsolePortConfiguration ¶
type IVZVirtioConsolePortConfiguration interface {
IVZConsolePortConfiguration
// A Boolean value that indicates whether this port is a console.
IsConsole() bool
SetIsConsole(value bool)
// The name of the port.
Name() string
SetName(value string)
// The array of console devices that you expose to the guest operating system.
ConsoleDevices() IVZConsoleDeviceConfiguration
SetConsoleDevices(value IVZConsoleDeviceConfiguration)
}
An interface definition for the VZVirtioConsolePortConfiguration class.
Configuring the port ¶
- [IVZVirtioConsolePortConfiguration.IsConsole]: A Boolean value that indicates whether this port is a console.
- [IVZVirtioConsolePortConfiguration.SetIsConsole]
- [IVZVirtioConsolePortConfiguration.Name]: The name of the port.
- [IVZVirtioConsolePortConfiguration.SetName]
See: https://developer.apple.com/documentation/Virtualization/VZVirtioConsolePortConfiguration
type IVZVirtioConsolePortConfigurationArray ¶
type IVZVirtioConsolePortConfigurationArray interface {
objectivec.IObject
// An unsigned integer that represents the maximum number of ports allocated by this device.
MaximumPortCount() uint32
SetMaximumPortCount(value uint32)
// Returns the Virtio console port configuration as the specified index.
ObjectAtIndexedSubscript(portIndex uint) IVZVirtioConsolePortConfiguration
SetObjectAtIndexedSubscript(configuration IVZVirtioConsolePortConfiguration, portIndex uint)
}
An interface definition for the VZVirtioConsolePortConfigurationArray class.
Determining the number of ports ¶
- [IVZVirtioConsolePortConfigurationArray.MaximumPortCount]: An unsigned integer that represents the maximum number of ports allocated by this device.
- [IVZVirtioConsolePortConfigurationArray.SetMaximumPortCount]
Accessing a specific port ¶
- [IVZVirtioConsolePortConfigurationArray.ObjectAtIndexedSubscript]: Returns the Virtio console port configuration as the specified index.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioConsolePortConfigurationArray
type IVZVirtioEntropyDeviceConfiguration ¶
type IVZVirtioEntropyDeviceConfiguration interface {
IVZEntropyDeviceConfiguration
// The array of randomization devices that you expose to the guest operating system.
EntropyDevices() IVZEntropyDeviceConfiguration
SetEntropyDevices(value IVZEntropyDeviceConfiguration)
}
An interface definition for the VZVirtioEntropyDeviceConfiguration class.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioEntropyDeviceConfiguration
type IVZVirtioFileSystemDevice ¶
type IVZVirtioFileSystemDevice interface {
IVZDirectorySharingDevice
// A value that defines the directory share the host exposes to the guest VM.
// A string that identifies the device.
Tag() string
// The list of configured directory-sharing devices on the VM.
DirectorySharingDevices() IVZDirectorySharingDevice
SetDirectorySharingDevices(value IVZDirectorySharingDevice)
}
An interface definition for the VZVirtioFileSystemDevice class.
Accessing directory properties ¶
- [IVZVirtioFileSystemDevice.Share]: A value that defines the directory share the host exposes to the guest VM.
- [IVZVirtioFileSystemDevice.SetShare]
- [IVZVirtioFileSystemDevice.Tag]: A string that identifies the device.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioFileSystemDevice
type IVZVirtioFileSystemDeviceConfiguration ¶
type IVZVirtioFileSystemDeviceConfiguration interface {
IVZDirectorySharingDeviceConfiguration
// Creates a configuration for a VIRTIO file system device.
InitWithTag(tag string) VZVirtioFileSystemDeviceConfiguration
// A value that defines how the host exposes resources to the guest virtual machine.
// A label that identifies this device in the guest VM.
Tag() string
SetTag(value string)
}
An interface definition for the VZVirtioFileSystemDeviceConfiguration class.
Creating a file system device configuration ¶
- [IVZVirtioFileSystemDeviceConfiguration.InitWithTag]: Creates a configuration for a VIRTIO file system device.
Getting file system information ¶
- [IVZVirtioFileSystemDeviceConfiguration.Share]: A value that defines how the host exposes resources to the guest virtual machine.
- [IVZVirtioFileSystemDeviceConfiguration.SetShare]
- [IVZVirtioFileSystemDeviceConfiguration.Tag]: A label that identifies this device in the guest VM.
- [IVZVirtioFileSystemDeviceConfiguration.SetTag]
See: https://developer.apple.com/documentation/Virtualization/VZVirtioFileSystemDeviceConfiguration
type IVZVirtioGraphicsDevice ¶
type IVZVirtioGraphicsDevice interface {
IVZGraphicsDevice
}
An interface definition for the VZVirtioGraphicsDevice class.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioGraphicsDevice
type IVZVirtioGraphicsDeviceConfiguration ¶
type IVZVirtioGraphicsDeviceConfiguration interface {
IVZGraphicsDeviceConfiguration
// The array of output devices.
Scanouts() []VZVirtioGraphicsScanoutConfiguration
SetScanouts(value []VZVirtioGraphicsScanoutConfiguration)
}
An interface definition for the VZVirtioGraphicsDeviceConfiguration class.
Instance properties ¶
- [IVZVirtioGraphicsDeviceConfiguration.Scanouts]: The array of output devices.
- [IVZVirtioGraphicsDeviceConfiguration.SetScanouts]
See: https://developer.apple.com/documentation/Virtualization/VZVirtioGraphicsDeviceConfiguration
type IVZVirtioGraphicsScanout ¶
type IVZVirtioGraphicsScanout interface {
IVZGraphicsDisplay
}
An interface definition for the VZVirtioGraphicsScanout class.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioGraphicsScanout
type IVZVirtioGraphicsScanoutConfiguration ¶
type IVZVirtioGraphicsScanoutConfiguration interface {
IVZGraphicsDisplayConfiguration
// Creates a Virtio graphics device with the specified dimensions.
InitWithWidthInPixelsHeightInPixels(widthInPixels int, heightInPixels int) VZVirtioGraphicsScanoutConfiguration
// An integer value that describes the height of the graphics device in pixels.
HeightInPixels() int
SetHeightInPixels(value int)
// An integer value that describes the width of the graphics device in pixels.
WidthInPixels() int
SetWidthInPixels(value int)
// The array of output devices.
Scanouts() IVZVirtioGraphicsScanoutConfiguration
SetScanouts(value IVZVirtioGraphicsScanoutConfiguration)
}
An interface definition for the VZVirtioGraphicsScanoutConfiguration class.
Creating the configuration object ¶
- [IVZVirtioGraphicsScanoutConfiguration.InitWithWidthInPixelsHeightInPixels]: Creates a Virtio graphics device with the specified dimensions.
Instance properties ¶
- [IVZVirtioGraphicsScanoutConfiguration.HeightInPixels]: An integer value that describes the height of the graphics device in pixels.
- [IVZVirtioGraphicsScanoutConfiguration.SetHeightInPixels]
- [IVZVirtioGraphicsScanoutConfiguration.WidthInPixels]: An integer value that describes the width of the graphics device in pixels.
- [IVZVirtioGraphicsScanoutConfiguration.SetWidthInPixels]
See: https://developer.apple.com/documentation/Virtualization/VZVirtioGraphicsScanoutConfiguration
type IVZVirtioNetworkDeviceConfiguration ¶
type IVZVirtioNetworkDeviceConfiguration interface {
IVZNetworkDeviceConfiguration
// The array of network devices that you expose to the guest operating system.
NetworkDevices() IVZNetworkDeviceConfiguration
SetNetworkDevices(value IVZNetworkDeviceConfiguration)
}
An interface definition for the VZVirtioNetworkDeviceConfiguration class.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioNetworkDeviceConfiguration
type IVZVirtioSocketConnection ¶
type IVZVirtioSocketConnection interface {
objectivec.IObject
// The port number of the system that opened the connection.
SourcePort() uint32
// The destination port number of the connection.
DestinationPort() uint32
// The file descriptor to use when sending data.
FileDescriptor() int
// Close the file descriptor associated with the socket.
Close()
}
An interface definition for the VZVirtioSocketConnection class.
Getting the connection details ¶
- [IVZVirtioSocketConnection.SourcePort]: The port number of the system that opened the connection.
- [IVZVirtioSocketConnection.DestinationPort]: The destination port number of the connection.
- [IVZVirtioSocketConnection.FileDescriptor]: The file descriptor to use when sending data.
Closing the connection ¶
- [IVZVirtioSocketConnection.Close]: Close the file descriptor associated with the socket.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioSocketConnection
type IVZVirtioSocketDevice ¶
type IVZVirtioSocketDevice interface {
IVZSocketDevice
// Configures an object to monitor the specified port for new connections.
SetSocketListenerForPort(listener IVZVirtioSocketListener, port uint32)
// Removes the listener object from the specfied port.
RemoveSocketListenerForPort(port uint32)
// Initiates a connection to the specified port of the guest operating system.
ConnectToPortCompletionHandler(port uint32, completionHandler VirtioSocketConnectionErrorHandler)
}
An interface definition for the VZVirtioSocketDevice class.
Configuring Port Listeners ¶
- [IVZVirtioSocketDevice.SetSocketListenerForPort]: Configures an object to monitor the specified port for new connections.
- [IVZVirtioSocketDevice.RemoveSocketListenerForPort]: Removes the listener object from the specfied port.
Connecting to Guest System Ports ¶
- [IVZVirtioSocketDevice.ConnectToPortCompletionHandler]: Initiates a connection to the specified port of the guest operating system.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioSocketDevice
type IVZVirtioSocketDeviceConfiguration ¶
type IVZVirtioSocketDeviceConfiguration interface {
IVZSocketDeviceConfiguration
// The socket device that you use to implement port-based communication with the guest operating system.
SocketDevices() IVZSocketDeviceConfiguration
SetSocketDevices(value IVZSocketDeviceConfiguration)
}
An interface definition for the VZVirtioSocketDeviceConfiguration class.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioSocketDeviceConfiguration
type IVZVirtioSocketListener ¶
type IVZVirtioSocketListener interface {
objectivec.IObject
// The custom object you use to respond to port-based connection attempts.
Delegate() VZVirtioSocketListenerDelegate
SetDelegate(value VZVirtioSocketListenerDelegate)
}
An interface definition for the VZVirtioSocketListener class.
Responding to new connections ¶
- [IVZVirtioSocketListener.Delegate]: The custom object you use to respond to port-based connection attempts.
- [IVZVirtioSocketListener.SetDelegate]
See: https://developer.apple.com/documentation/Virtualization/VZVirtioSocketListener
type IVZVirtioSoundDeviceConfiguration ¶
type IVZVirtioSoundDeviceConfiguration interface {
IVZAudioDeviceConfiguration
// List of audio streams exposed by this device.
Streams() []VZVirtioSoundDeviceStreamConfiguration
SetStreams(value []VZVirtioSoundDeviceStreamConfiguration)
// The list of audio devices.
AudioDevices() IVZAudioDeviceConfiguration
SetAudioDevices(value IVZAudioDeviceConfiguration)
}
An interface definition for the VZVirtioSoundDeviceConfiguration class.
Accessing the sound streams ¶
- [IVZVirtioSoundDeviceConfiguration.Streams]: List of audio streams exposed by this device.
- [IVZVirtioSoundDeviceConfiguration.SetStreams]
See: https://developer.apple.com/documentation/Virtualization/VZVirtioSoundDeviceConfiguration
type IVZVirtioSoundDeviceInputStreamConfiguration ¶
type IVZVirtioSoundDeviceInputStreamConfiguration interface {
IVZVirtioSoundDeviceStreamConfiguration
// An audio stream source that defines how the host supplies audio data for the guest.
Source() IVZAudioInputStreamSource
SetSource(value IVZAudioInputStreamSource)
}
An interface definition for the VZVirtioSoundDeviceInputStreamConfiguration class.
Accessing the sound source ¶
- [IVZVirtioSoundDeviceInputStreamConfiguration.Source]: An audio stream source that defines how the host supplies audio data for the guest.
- [IVZVirtioSoundDeviceInputStreamConfiguration.SetSource]
See: https://developer.apple.com/documentation/Virtualization/VZVirtioSoundDeviceInputStreamConfiguration
type IVZVirtioSoundDeviceOutputStreamConfiguration ¶
type IVZVirtioSoundDeviceOutputStreamConfiguration interface {
IVZVirtioSoundDeviceStreamConfiguration
// An audio stream sink that defines how the host handles audio data produced by the guest.
Sink() IVZAudioOutputStreamSink
SetSink(value IVZAudioOutputStreamSink)
}
An interface definition for the VZVirtioSoundDeviceOutputStreamConfiguration class.
Accessing the sound sink ¶
- [IVZVirtioSoundDeviceOutputStreamConfiguration.Sink]: An audio stream sink that defines how the host handles audio data produced by the guest.
- [IVZVirtioSoundDeviceOutputStreamConfiguration.SetSink]
type IVZVirtioSoundDeviceStreamConfiguration ¶
type IVZVirtioSoundDeviceStreamConfiguration interface {
objectivec.IObject
}
An interface definition for the VZVirtioSoundDeviceStreamConfiguration class.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioSoundDeviceStreamConfiguration
type IVZVirtioTraditionalMemoryBalloonDevice ¶
type IVZVirtioTraditionalMemoryBalloonDevice interface {
IVZMemoryBalloonDevice
// The target amount of memory, in bytes, to make available to the virtual machine.
TargetVirtualMachineMemorySize() uint64
SetTargetVirtualMachineMemorySize(value uint64)
}
An interface definition for the VZVirtioTraditionalMemoryBalloonDevice class.
Changing the memory partition size ¶
- [IVZVirtioTraditionalMemoryBalloonDevice.TargetVirtualMachineMemorySize]: The target amount of memory, in bytes, to make available to the virtual machine.
- [IVZVirtioTraditionalMemoryBalloonDevice.SetTargetVirtualMachineMemorySize]
See: https://developer.apple.com/documentation/Virtualization/VZVirtioTraditionalMemoryBalloonDevice
type IVZVirtioTraditionalMemoryBalloonDeviceConfiguration ¶
type IVZVirtioTraditionalMemoryBalloonDeviceConfiguration interface {
IVZMemoryBalloonDeviceConfiguration
// The array of devices that you use to adjust the amount of memory available to the guest system.
MemoryBalloonDevices() IVZMemoryBalloonDevice
SetMemoryBalloonDevices(value IVZMemoryBalloonDevice)
}
An interface definition for the VZVirtioTraditionalMemoryBalloonDeviceConfiguration class.
type IVZVirtualMachine ¶
type IVZVirtualMachine interface {
objectivec.IObject
// Creates the VM and configures it with the specified data.
InitWithConfiguration(configuration IVZVirtualMachineConfiguration) VZVirtualMachine
// Creates and configures the VM with the specified data and dispatch queue.
InitWithConfigurationQueue(configuration IVZVirtualMachineConfiguration, queue dispatch.Queue) VZVirtualMachine
// A custom object you use to determine when the VM stops.
Delegate() VZVirtualMachineDelegate
SetDelegate(value VZVirtualMachineDelegate)
// Starts the VM and notifies the specified completion handler if startup was successful.
StartWithCompletionHandler(completionHandler ErrorHandler)
// Starts the VM with the options and a completion handler you provide.
StartWithOptionsCompletionHandler(options IVZVirtualMachineStartOptions, completionHandler ErrorHandler)
// Stops a VM that’s in either a running or paused state.
StopWithCompletionHandler(completionHandler ErrorHandler)
// Asks the guest operating system to stop running.
RequestStopWithError() (bool, error)
// Pauses a running VM and notifies the specified completion handler of the results.
PauseWithCompletionHandler(completionHandler ErrorHandler)
// Resumes a paused VM and notifies the specified completion handler of the results.
ResumeWithCompletionHandler(completionHandler ErrorHandler)
// The list of configured console devices on the VM.
ConsoleDevices() []VZConsoleDevice
// The array of devices that you use to adjust the amount of memory available to the guest system.
MemoryBalloonDevices() []VZMemoryBalloonDevice
// The list of configured network devices on the VM.
NetworkDevices() []VZNetworkDevice
// The array of socket devices that the VM configures for use ports in the guest VM.
SocketDevices() []VZSocketDevice
// The list of configured directory-sharing devices on the VM.
DirectorySharingDevices() []VZDirectorySharingDevice
// The list of runtime USB controller objects.
UsbControllers() []VZUSBController
// The current execution state of the VM.
State() VZVirtualMachineState
// The list of configured graphics devices on the virtual machine.
GraphicsDevices() []VZGraphicsDevice
// A Boolean value that indicates whether you can start the VM.
CanStart() bool
// A Boolean value that indicates whether you can pause the VM.
CanPause() bool
// A Boolean value that indicates whether you can resume the VM.
CanResume() bool
// A Boolean value that indicates whether you can stop the VM.
CanStop() bool
// A Boolean value that indicates whether you can ask the guest operating system to stop running.
CanRequestStop() bool
// The queue associated with this virtual machine.
Queue() dispatch.Queue
// Saves the state of a VM.
SaveMachineStateToURLCompletionHandler(saveFileURL foundation.INSURL, completionHandler ErrorHandler)
// Restores a VM from a previously saved state.
RestoreMachineStateFromURLCompletionHandler(saveFileURL foundation.INSURL, completionHandler ErrorHandler)
}
An interface definition for the VZVirtualMachine class.
Creating the VM ¶
- [IVZVirtualMachine.InitWithConfiguration]: Creates the VM and configures it with the specified data.
- [IVZVirtualMachine.InitWithConfigurationQueue]: Creates and configures the VM with the specified data and dispatch queue.
Responding to a stopped VM ¶
- [IVZVirtualMachine.Delegate]: A custom object you use to determine when the VM stops.
- [IVZVirtualMachine.SetDelegate]
Starting and stopping the VM ¶
- [IVZVirtualMachine.StartWithCompletionHandler]: Starts the VM and notifies the specified completion handler if startup was successful.
- [IVZVirtualMachine.StartWithOptionsCompletionHandler]: Starts the VM with the options and a completion handler you provide.
- [IVZVirtualMachine.StopWithCompletionHandler]: Stops a VM that’s in either a running or paused state.
- [IVZVirtualMachine.RequestStopWithError]: Asks the guest operating system to stop running.
- [IVZVirtualMachine.PauseWithCompletionHandler]: Pauses a running VM and notifies the specified completion handler of the results.
- [IVZVirtualMachine.ResumeWithCompletionHandler]: Resumes a paused VM and notifies the specified completion handler of the results.
Configuring VM attributes at runtime ¶
- [IVZVirtualMachine.ConsoleDevices]: The list of configured console devices on the VM.
- [IVZVirtualMachine.MemoryBalloonDevices]: The array of devices that you use to adjust the amount of memory available to the guest system.
- [IVZVirtualMachine.NetworkDevices]: The list of configured network devices on the VM.
- [IVZVirtualMachine.SocketDevices]: The array of socket devices that the VM configures for use ports in the guest VM.
- [IVZVirtualMachine.DirectorySharingDevices]: The list of configured directory-sharing devices on the VM.
- [IVZVirtualMachine.UsbControllers]: The list of runtime USB controller objects.
Getting the state of the VM ¶
- [IVZVirtualMachine.State]: The current execution state of the VM.
- [IVZVirtualMachine.GraphicsDevices]: The list of configured graphics devices on the virtual machine.
- [IVZVirtualMachine.CanStart]: A Boolean value that indicates whether you can start the VM.
- [IVZVirtualMachine.CanPause]: A Boolean value that indicates whether you can pause the VM.
- [IVZVirtualMachine.CanResume]: A Boolean value that indicates whether you can resume the VM.
- [IVZVirtualMachine.CanStop]: A Boolean value that indicates whether you can stop the VM.
- [IVZVirtualMachine.CanRequestStop]: A Boolean value that indicates whether you can ask the guest operating system to stop running.
- [IVZVirtualMachine.Queue]: The queue associated with this virtual machine.
Saving and restoring the VM state ¶
- [IVZVirtualMachine.SaveMachineStateToURLCompletionHandler]: Saves the state of a VM.
- [IVZVirtualMachine.RestoreMachineStateFromURLCompletionHandler]: Restores a VM from a previously saved state.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine
type IVZVirtualMachineConfiguration ¶
type IVZVirtualMachineConfiguration interface {
objectivec.IObject
// The guest system to boot when the VM starts.
BootLoader() IVZBootLoader
SetBootLoader(value IVZBootLoader)
// The number of CPUs you make available to the guest operating system.
CPUCount() uint
SetCPUCount(value uint)
// The memory size in bytes for the virtual machine. Must be a multiple of 1MB and between minimumAllowedMemorySize and maximumAllowedMemorySize.
MemorySize() uint64
SetMemorySize(value uint64)
// An array that you configure with a memory balloon device, used to update the memory in the VM.
MemoryBalloonDevices() []VZMemoryBalloonDeviceConfiguration
SetMemoryBalloonDevices(value []VZMemoryBalloonDeviceConfiguration)
// The array of console devices that you expose to the guest operating system.
ConsoleDevices() []VZConsoleDeviceConfiguration
SetConsoleDevices(value []VZConsoleDeviceConfiguration)
// The array of network devices that you expose to the guest operating system.
NetworkDevices() []VZNetworkDeviceConfiguration
SetNetworkDevices(value []VZNetworkDeviceConfiguration)
// The socket device that you use to implement port-based communication with the guest operating system.
SocketDevices() []VZSocketDeviceConfiguration
SetSocketDevices(value []VZSocketDeviceConfiguration)
// The array of serial ports that you expose to the guest operating system.
SerialPorts() []VZSerialPortConfiguration
SetSerialPorts(value []VZSerialPortConfiguration)
// The array of storage devices that you expose to the guest operating system.
StorageDevices() []VZStorageDeviceConfiguration
SetStorageDevices(value []VZStorageDeviceConfiguration)
// The array of randomization devices that you expose to the guest operating system.
EntropyDevices() []VZEntropyDeviceConfiguration
SetEntropyDevices(value []VZEntropyDeviceConfiguration)
// The list of audio devices.
AudioDevices() []VZAudioDeviceConfiguration
SetAudioDevices(value []VZAudioDeviceConfiguration)
// The list of directory sharing devices.
DirectorySharingDevices() []VZDirectorySharingDeviceConfiguration
SetDirectorySharingDevices(value []VZDirectorySharingDeviceConfiguration)
// The list of graphics devices.
GraphicsDevices() []VZGraphicsDeviceConfiguration
SetGraphicsDevices(value []VZGraphicsDeviceConfiguration)
// The list of keyboards.
Keyboards() []VZKeyboardConfiguration
SetKeyboards(value []VZKeyboardConfiguration)
// The hardware platform to use.
Platform() IVZPlatformConfiguration
SetPlatform(value IVZPlatformConfiguration)
// The list of pointing devices.
PointingDevices() []VZPointingDeviceConfiguration
SetPointingDevices(value []VZPointingDeviceConfiguration)
// The list of configured USB controllers for the VM.
UsbControllers() []VZUSBControllerConfiguration
SetUsbControllers(value []VZUSBControllerConfiguration)
// Validates the current configuration settings and reports any issues that might prevent the successful initialization of the VM.
ValidateWithError() (bool, error)
// Determines whether the framework can save or restore the VM’s current configuration.
ValidateSaveRestoreSupportWithError() (bool, error)
// The number of CPUs for the virtual machine. Must be between minimumAllowedCPUCount and maximumAllowedCPUCount.
CpuCount() uint
SetCpuCount(value uint)
}
An interface definition for the VZVirtualMachineConfiguration class.
Configuring the guest system ¶
- [IVZVirtualMachineConfiguration.BootLoader]: The guest system to boot when the VM starts.
- [IVZVirtualMachineConfiguration.SetBootLoader]
Setting the number of CPUs ¶
- [IVZVirtualMachineConfiguration.CPUCount]: The number of CPUs you make available to the guest operating system.
- [IVZVirtualMachineConfiguration.SetCPUCount]
Sizing the memory partition ¶
- [IVZVirtualMachineConfiguration.MemorySize]: The memory size in bytes for the virtual machine. Must be a multiple of 1MB and between minimumAllowedMemorySize and maximumAllowedMemorySize.
- [IVZVirtualMachineConfiguration.SetMemorySize]
- [IVZVirtualMachineConfiguration.MemoryBalloonDevices]: An array that you configure with a memory balloon device, used to update the memory in the VM.
- [IVZVirtualMachineConfiguration.SetMemoryBalloonDevices]
Adding devices to the VM ¶
- [IVZVirtualMachineConfiguration.ConsoleDevices]: The array of console devices that you expose to the guest operating system.
- [IVZVirtualMachineConfiguration.SetConsoleDevices]
- [IVZVirtualMachineConfiguration.NetworkDevices]: The array of network devices that you expose to the guest operating system.
- [IVZVirtualMachineConfiguration.SetNetworkDevices]
- [IVZVirtualMachineConfiguration.SocketDevices]: The socket device that you use to implement port-based communication with the guest operating system.
- [IVZVirtualMachineConfiguration.SetSocketDevices]
- [IVZVirtualMachineConfiguration.SerialPorts]: The array of serial ports that you expose to the guest operating system.
- [IVZVirtualMachineConfiguration.SetSerialPorts]
- [IVZVirtualMachineConfiguration.StorageDevices]: The array of storage devices that you expose to the guest operating system.
- [IVZVirtualMachineConfiguration.SetStorageDevices]
- [IVZVirtualMachineConfiguration.EntropyDevices]: The array of randomization devices that you expose to the guest operating system.
- [IVZVirtualMachineConfiguration.SetEntropyDevices]
- [IVZVirtualMachineConfiguration.AudioDevices]: The list of audio devices.
- [IVZVirtualMachineConfiguration.SetAudioDevices]
- [IVZVirtualMachineConfiguration.DirectorySharingDevices]: The list of directory sharing devices.
- [IVZVirtualMachineConfiguration.SetDirectorySharingDevices]
- [IVZVirtualMachineConfiguration.GraphicsDevices]: The list of graphics devices.
- [IVZVirtualMachineConfiguration.SetGraphicsDevices]
- [IVZVirtualMachineConfiguration.Keyboards]: The list of keyboards.
- [IVZVirtualMachineConfiguration.SetKeyboards]
- [IVZVirtualMachineConfiguration.Platform]: The hardware platform to use.
- [IVZVirtualMachineConfiguration.SetPlatform]
- [IVZVirtualMachineConfiguration.PointingDevices]: The list of pointing devices.
- [IVZVirtualMachineConfiguration.SetPointingDevices]
- [IVZVirtualMachineConfiguration.UsbControllers]: The list of configured USB controllers for the VM.
- [IVZVirtualMachineConfiguration.SetUsbControllers]
Validating the configuration ¶
- [IVZVirtualMachineConfiguration.ValidateWithError]: Validates the current configuration settings and reports any issues that might prevent the successful initialization of the VM.
- [IVZVirtualMachineConfiguration.ValidateSaveRestoreSupportWithError]: Determines whether the framework can save or restore the VM’s current configuration.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachineConfiguration
type IVZVirtualMachineStartOptions ¶
type IVZVirtualMachineStartOptions interface {
objectivec.IObject
}
An interface definition for the VZVirtualMachineStartOptions class.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachineStartOptions
type IVZVirtualMachineView ¶
type IVZVirtualMachineView interface {
appkit.INSView
// A Boolean value that indicates whether the graphics display associated with this view automatically reconfigures with respect to view changes.
AutomaticallyReconfiguresDisplay() bool
SetAutomaticallyReconfiguresDisplay(value bool)
// A Boolean value that determines whether the system should send certain system keyboard shortcuts to the guest instead of the host.
CapturesSystemKeys() bool
SetCapturesSystemKeys(value bool)
// The VM to display in the view.
VirtualMachine() IVZVirtualMachine
SetVirtualMachine(value IVZVirtualMachine)
}
An interface definition for the VZVirtualMachineView class.
Configuring the VM ¶
- [IVZVirtualMachineView.AutomaticallyReconfiguresDisplay]: A Boolean value that indicates whether the graphics display associated with this view automatically reconfigures with respect to view changes.
- [IVZVirtualMachineView.SetAutomaticallyReconfiguresDisplay]
- [IVZVirtualMachineView.CapturesSystemKeys]: A Boolean value that determines whether the system should send certain system keyboard shortcuts to the guest instead of the host.
- [IVZVirtualMachineView.SetCapturesSystemKeys]
- [IVZVirtualMachineView.VirtualMachine]: The VM to display in the view.
- [IVZVirtualMachineView.SetVirtualMachine]
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachineView
type IVZVmnetNetworkDeviceAttachment ¶
type IVZVmnetNetworkDeviceAttachment interface {
IVZNetworkDeviceAttachment
// Creates the attachment and configures it with the specified data.
InitWithNetwork(network vmnet.Vmnet_network_ref) VZVmnetNetworkDeviceAttachment
// The network object that the you initialize the attachment with.
Network() unsafe.Pointer
}
An interface definition for the VZVmnetNetworkDeviceAttachment class.
Creating the vmnet network device attachment ¶
- [IVZVmnetNetworkDeviceAttachment.InitWithNetwork]: Creates the attachment and configures it with the specified data.
- [IVZVmnetNetworkDeviceAttachment.Network]: The network object that the you initialize the attachment with.
See: https://developer.apple.com/documentation/Virtualization/VZVmnetNetworkDeviceAttachment
type IVZXHCIController ¶
type IVZXHCIController interface {
IVZUSBController
}
An interface definition for the VZXHCIController class.
See: https://developer.apple.com/documentation/Virtualization/VZXHCIController
type IVZXHCIControllerConfiguration ¶
type IVZXHCIControllerConfiguration interface {
IVZUSBControllerConfiguration
}
An interface definition for the VZXHCIControllerConfiguration class.
See: https://developer.apple.com/documentation/Virtualization/VZXHCIControllerConfiguration
type MacOSRestoreImageErrorHandler ¶
type MacOSRestoreImageErrorHandler = func(*VZMacOSRestoreImage, error)
MacOSRestoreImageErrorHandler is the signature for a completion handler block.
Used by:
- [VZMacOSRestoreImage.FetchLatestSupportedWithCompletionHandler]
- [VZMacOSRestoreImage.LoadFileURLCompletionHandler]
type VZAudioDeviceConfiguration ¶
type VZAudioDeviceConfiguration struct {
objectivec.Object
}
The base class for an audio device configuration.
Overview ¶
Don’t instantiate this abstract class directly. Instead, instantiate one of its subclasses such as VZVirtioSoundDeviceConfiguration.
See: https://developer.apple.com/documentation/Virtualization/VZAudioDeviceConfiguration
func NewVZAudioDeviceConfiguration ¶
func NewVZAudioDeviceConfiguration() VZAudioDeviceConfiguration
NewVZAudioDeviceConfiguration creates a new VZAudioDeviceConfiguration instance.
func VZAudioDeviceConfigurationFromID ¶
func VZAudioDeviceConfigurationFromID(id objc.ID) VZAudioDeviceConfiguration
VZAudioDeviceConfigurationFromID constructs a VZAudioDeviceConfiguration from an objc.ID.
The base class for an audio device configuration.
func (VZAudioDeviceConfiguration) Autorelease ¶
func (a VZAudioDeviceConfiguration) Autorelease() VZAudioDeviceConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZAudioDeviceConfiguration) Init ¶
func (a VZAudioDeviceConfiguration) Init() VZAudioDeviceConfiguration
Init initializes the instance.
type VZAudioDeviceConfigurationClass ¶
type VZAudioDeviceConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZAudioDeviceConfigurationClass ¶
func GetVZAudioDeviceConfigurationClass() VZAudioDeviceConfigurationClass
GetVZAudioDeviceConfigurationClass returns the class object for VZAudioDeviceConfiguration.
func (VZAudioDeviceConfigurationClass) Alloc ¶
func (vc VZAudioDeviceConfigurationClass) Alloc() VZAudioDeviceConfiguration
Alloc allocates memory for a new instance of the class.
type VZAudioInputStreamSource ¶
type VZAudioInputStreamSource struct {
objectivec.Object
}
The base class for an audio input stream source.
Overview ¶
An audio input stream source defines how th guest produces audio input data on the host system.
Don’t instantiate VZAudioInputStreamSource directly, use one of its subclasses such as VZHostAudioInputStreamSource instead.
See: https://developer.apple.com/documentation/Virtualization/VZAudioInputStreamSource
func NewVZAudioInputStreamSource ¶
func NewVZAudioInputStreamSource() VZAudioInputStreamSource
NewVZAudioInputStreamSource creates a new VZAudioInputStreamSource instance.
func VZAudioInputStreamSourceFromID ¶
func VZAudioInputStreamSourceFromID(id objc.ID) VZAudioInputStreamSource
VZAudioInputStreamSourceFromID constructs a VZAudioInputStreamSource from an objc.ID.
The base class for an audio input stream source.
func (VZAudioInputStreamSource) Autorelease ¶
func (a VZAudioInputStreamSource) Autorelease() VZAudioInputStreamSource
Autorelease adds the receiver to the current autorelease pool.
func (VZAudioInputStreamSource) Init ¶
func (a VZAudioInputStreamSource) Init() VZAudioInputStreamSource
Init initializes the instance.
type VZAudioInputStreamSourceClass ¶
type VZAudioInputStreamSourceClass struct {
// contains filtered or unexported fields
}
func GetVZAudioInputStreamSourceClass ¶
func GetVZAudioInputStreamSourceClass() VZAudioInputStreamSourceClass
GetVZAudioInputStreamSourceClass returns the class object for VZAudioInputStreamSource.
func (VZAudioInputStreamSourceClass) Alloc ¶
func (vc VZAudioInputStreamSourceClass) Alloc() VZAudioInputStreamSource
Alloc allocates memory for a new instance of the class.
type VZAudioOutputStreamSink ¶
type VZAudioOutputStreamSink struct {
objectivec.Object
}
The base class for an audio output stream sink.
Overview ¶
An audio output stream sink defines how the host system consumes audio data from a guest.
Don’t instantiate VZAudioOutputStreamSink directly, use one of its subclasses, such as VZHostAudioOutputStreamSink instead.
See: https://developer.apple.com/documentation/Virtualization/VZAudioOutputStreamSink
func NewVZAudioOutputStreamSink ¶
func NewVZAudioOutputStreamSink() VZAudioOutputStreamSink
NewVZAudioOutputStreamSink creates a new VZAudioOutputStreamSink instance.
func VZAudioOutputStreamSinkFromID ¶
func VZAudioOutputStreamSinkFromID(id objc.ID) VZAudioOutputStreamSink
VZAudioOutputStreamSinkFromID constructs a VZAudioOutputStreamSink from an objc.ID.
The base class for an audio output stream sink.
func (VZAudioOutputStreamSink) Autorelease ¶
func (a VZAudioOutputStreamSink) Autorelease() VZAudioOutputStreamSink
Autorelease adds the receiver to the current autorelease pool.
func (VZAudioOutputStreamSink) Init ¶
func (a VZAudioOutputStreamSink) Init() VZAudioOutputStreamSink
Init initializes the instance.
type VZAudioOutputStreamSinkClass ¶
type VZAudioOutputStreamSinkClass struct {
// contains filtered or unexported fields
}
func GetVZAudioOutputStreamSinkClass ¶
func GetVZAudioOutputStreamSinkClass() VZAudioOutputStreamSinkClass
GetVZAudioOutputStreamSinkClass returns the class object for VZAudioOutputStreamSink.
func (VZAudioOutputStreamSinkClass) Alloc ¶
func (vc VZAudioOutputStreamSinkClass) Alloc() VZAudioOutputStreamSink
Alloc allocates memory for a new instance of the class.
type VZBootLoader ¶
type VZBootLoader struct {
objectivec.Object
}
The base class that defines the management of the initial process of the guest system.
Overview ¶
The VZBootLoader abstract class defines the common behaviors for booting a guest operating system into a VM. Don’t create instances of this class directly. Instead, instantiate the subclass that corresponds to the type of operating system you plan to load. For example, to create a boot loader object for a Linux kernel, create a VZLinuxBootLoader object; to create a boot loader object for installation using an ISO image create a VZEFIBootLoader. For a macOS system create VZMacOSBootLoader.
See: https://developer.apple.com/documentation/Virtualization/VZBootLoader
func NewVZBootLoader ¶
func NewVZBootLoader() VZBootLoader
NewVZBootLoader creates a new VZBootLoader instance.
func VZBootLoaderFromID ¶
func VZBootLoaderFromID(id objc.ID) VZBootLoader
VZBootLoaderFromID constructs a VZBootLoader from an objc.ID.
The base class that defines the management of the initial process of the guest system.
func (VZBootLoader) Autorelease ¶
func (b VZBootLoader) Autorelease() VZBootLoader
Autorelease adds the receiver to the current autorelease pool.
type VZBootLoaderClass ¶
type VZBootLoaderClass struct {
// contains filtered or unexported fields
}
func GetVZBootLoaderClass ¶
func GetVZBootLoaderClass() VZBootLoaderClass
GetVZBootLoaderClass returns the class object for VZBootLoader.
func (VZBootLoaderClass) Alloc ¶
func (vc VZBootLoaderClass) Alloc() VZBootLoader
Alloc allocates memory for a new instance of the class.
type VZBridgedNetworkDeviceAttachment ¶
type VZBridgedNetworkDeviceAttachment struct {
VZNetworkDeviceAttachment
}
A network device that interacts directly with a physical network interface on the host computer.
Overview ¶
A VZBridgedNetworkDeviceAttachment object represents a physical interface on the host computer. Use this object when configuring a network interface for your virtual machine. A bridged network device sends and receives packets on the same physical interface as the host computer, but does so using a different network layer.
To configure a network device with a bridged network interface:
- Obtain a reference to one of the host’s physical network interfaces from the [VZBridgedNetworkDeviceAttachment.NetworkInterfaces] property of VZBridgedNetworkInterface. - Create the VZBridgedNetworkDeviceAttachment object using the network interface. - Assign the attachment object to the VZBridgedNetworkDeviceAttachment.Attachment property of a VZVirtioNetworkDeviceConfiguration object. - Add the VZVirtioNetworkDeviceConfiguration object to the VZBridgedNetworkDeviceAttachment.NetworkDevices property of your VZVirtualMachineConfiguration.
Creating the attachment point ¶
- VZBridgedNetworkDeviceAttachment.InitWithInterface: Creates the attachment from a bridged network interface object.
Getting the network interface ¶
- VZBridgedNetworkDeviceAttachment.Interface: The network interface assigned to this attachment.
See: https://developer.apple.com/documentation/Virtualization/VZBridgedNetworkDeviceAttachment
func NewBridgedNetworkDeviceAttachmentWithInterface ¶
func NewBridgedNetworkDeviceAttachmentWithInterface(interface_ IVZBridgedNetworkInterface) VZBridgedNetworkDeviceAttachment
Creates the attachment from a bridged network interface object.
interface: An existing network interface of the host computer. Get a list of available interfaces from the [NetworkInterfaces] property of VZBridgedNetworkInterface.
Return Value ¶
An attachment object for the specified network interface.
func NewVZBridgedNetworkDeviceAttachment ¶
func NewVZBridgedNetworkDeviceAttachment() VZBridgedNetworkDeviceAttachment
NewVZBridgedNetworkDeviceAttachment creates a new VZBridgedNetworkDeviceAttachment instance.
func VZBridgedNetworkDeviceAttachmentFromID ¶
func VZBridgedNetworkDeviceAttachmentFromID(id objc.ID) VZBridgedNetworkDeviceAttachment
VZBridgedNetworkDeviceAttachmentFromID constructs a VZBridgedNetworkDeviceAttachment from an objc.ID.
A network device that interacts directly with a physical network interface on the host computer.
func (VZBridgedNetworkDeviceAttachment) Attachment ¶
func (b VZBridgedNetworkDeviceAttachment) Attachment() IVZNetworkDeviceAttachment
The object that defines how the virtual network device communicates with the host system.
See: https://developer.apple.com/documentation/virtualization/vznetworkdeviceconfiguration/attachment
func (VZBridgedNetworkDeviceAttachment) Autorelease ¶
func (b VZBridgedNetworkDeviceAttachment) Autorelease() VZBridgedNetworkDeviceAttachment
Autorelease adds the receiver to the current autorelease pool.
func (VZBridgedNetworkDeviceAttachment) Init ¶
func (b VZBridgedNetworkDeviceAttachment) Init() VZBridgedNetworkDeviceAttachment
Init initializes the instance.
func (VZBridgedNetworkDeviceAttachment) InitWithInterface ¶
func (b VZBridgedNetworkDeviceAttachment) InitWithInterface(interface_ IVZBridgedNetworkInterface) VZBridgedNetworkDeviceAttachment
Creates the attachment from a bridged network interface object.
interface: An existing network interface of the host computer. Get a list of available interfaces from the [NetworkInterfaces] property of VZBridgedNetworkInterface.
Return Value ¶
An attachment object for the specified network interface.
func (VZBridgedNetworkDeviceAttachment) Interface ¶
func (b VZBridgedNetworkDeviceAttachment) Interface() IVZBridgedNetworkInterface
The network interface assigned to this attachment.
See: https://developer.apple.com/documentation/Virtualization/VZBridgedNetworkDeviceAttachment/interface
func (VZBridgedNetworkDeviceAttachment) NetworkDevices ¶
func (b VZBridgedNetworkDeviceAttachment) NetworkDevices() IVZNetworkDeviceConfiguration
The array of network devices that you expose to the guest operating system.
func (VZBridgedNetworkDeviceAttachment) SetAttachment ¶
func (b VZBridgedNetworkDeviceAttachment) SetAttachment(value IVZNetworkDeviceAttachment)
func (VZBridgedNetworkDeviceAttachment) SetNetworkDevices ¶
func (b VZBridgedNetworkDeviceAttachment) SetNetworkDevices(value IVZNetworkDeviceConfiguration)
type VZBridgedNetworkDeviceAttachmentClass ¶
type VZBridgedNetworkDeviceAttachmentClass struct {
// contains filtered or unexported fields
}
func GetVZBridgedNetworkDeviceAttachmentClass ¶
func GetVZBridgedNetworkDeviceAttachmentClass() VZBridgedNetworkDeviceAttachmentClass
GetVZBridgedNetworkDeviceAttachmentClass returns the class object for VZBridgedNetworkDeviceAttachment.
func (VZBridgedNetworkDeviceAttachmentClass) Alloc ¶
func (vc VZBridgedNetworkDeviceAttachmentClass) Alloc() VZBridgedNetworkDeviceAttachment
Alloc allocates memory for a new instance of the class.
func (VZBridgedNetworkDeviceAttachmentClass) NetworkInterfaces ¶
func (_VZBridgedNetworkDeviceAttachmentClass VZBridgedNetworkDeviceAttachmentClass) NetworkInterfaces() VZBridgedNetworkInterface
The bridged network interfaces that you may use in your virtual machine.
See: https://developer.apple.com/documentation/virtualization/vzbridgednetworkinterface/networkinterfaces
func (VZBridgedNetworkDeviceAttachmentClass) SetNetworkInterfaces ¶
func (_VZBridgedNetworkDeviceAttachmentClass VZBridgedNetworkDeviceAttachmentClass) SetNetworkInterfaces(value VZBridgedNetworkInterface)
type VZBridgedNetworkInterface ¶
type VZBridgedNetworkInterface struct {
objectivec.Object
}
An object that identifies the supported network interfaces of the host computer.
Overview ¶
Use a VZBridgedNetworkInterface object to retrieve the physical interfaces on the host computer. Use a bridged network interface to create a VZBridgedNetworkDeviceAttachment object, which maps that interface to one of your virtual machine’s network devices. The host computer and your virtual machine share access to the physical network interface, but communicate over it using distinct network layers.
You don’t create VZBridgedNetworkInterface objects directly. Instead, the system creates one object for each physical interface of the host computer and stores those objects in the [VZBridgedNetworkInterface.NetworkInterfaces] property. Iterate over the objects in that property to retrieve the network interfaces you need.
Getting the interface description ¶
- VZBridgedNetworkInterface.Identifier: The unique BSD name of this network interface.
- VZBridgedNetworkInterface.LocalizedDisplayName: A user-visible name for the network interface.
See: https://developer.apple.com/documentation/Virtualization/VZBridgedNetworkInterface
func NewVZBridgedNetworkInterface ¶
func NewVZBridgedNetworkInterface() VZBridgedNetworkInterface
NewVZBridgedNetworkInterface creates a new VZBridgedNetworkInterface instance.
func VZBridgedNetworkInterfaceFromID ¶
func VZBridgedNetworkInterfaceFromID(id objc.ID) VZBridgedNetworkInterface
VZBridgedNetworkInterfaceFromID constructs a VZBridgedNetworkInterface from an objc.ID.
An object that identifies the supported network interfaces of the host computer.
func (VZBridgedNetworkInterface) Autorelease ¶
func (b VZBridgedNetworkInterface) Autorelease() VZBridgedNetworkInterface
Autorelease adds the receiver to the current autorelease pool.
func (VZBridgedNetworkInterface) Identifier ¶
func (b VZBridgedNetworkInterface) Identifier() string
The unique BSD name of this network interface.
Discussion ¶
BSD names for the host computer’s Ethernet interfaces include `en0`, `en1`, and so on.
See: https://developer.apple.com/documentation/Virtualization/VZBridgedNetworkInterface/identifier
func (VZBridgedNetworkInterface) Init ¶
func (b VZBridgedNetworkInterface) Init() VZBridgedNetworkInterface
Init initializes the instance.
func (VZBridgedNetworkInterface) LocalizedDisplayName ¶
func (b VZBridgedNetworkInterface) LocalizedDisplayName() string
A user-visible name for the network interface.
Discussion ¶
An example interface name is [Ethernet]. Use this string when you need to display the name of the interface to the user.
type VZBridgedNetworkInterfaceClass ¶
type VZBridgedNetworkInterfaceClass struct {
// contains filtered or unexported fields
}
func GetVZBridgedNetworkInterfaceClass ¶
func GetVZBridgedNetworkInterfaceClass() VZBridgedNetworkInterfaceClass
GetVZBridgedNetworkInterfaceClass returns the class object for VZBridgedNetworkInterface.
func (VZBridgedNetworkInterfaceClass) Alloc ¶
func (vc VZBridgedNetworkInterfaceClass) Alloc() VZBridgedNetworkInterface
Alloc allocates memory for a new instance of the class.
func (VZBridgedNetworkInterfaceClass) NetworkInterfaces ¶
func (_VZBridgedNetworkInterfaceClass VZBridgedNetworkInterfaceClass) NetworkInterfaces() []VZBridgedNetworkInterface
The bridged network interfaces that you may use in your virtual machine.
Discussion ¶
The system creates the objects in this property based on the available interfaces in the host machine.
See: https://developer.apple.com/documentation/Virtualization/VZBridgedNetworkInterface/networkInterfaces
type VZConsoleDevice ¶
type VZConsoleDevice struct {
objectivec.Object
}
A class that represents a console device in a VM.
Overview ¶
Don’t instantiate a VZConsoleDevice directly: You first configure console devices on the VZVirtualMachineConfiguration through a subclass of VZConsoleDeviceConfiguration. After you create VZVirtualMachine from the configuration, the console devices are available through the VZConsoleDevice.ConsoleDevices property.
The actual type of VZConsoleDevice corresponds to the type that the configuration uses. For example, a VZVirtioConsoleDeviceConfiguration is a device of type VZVirtioConsoleDevice.
See: https://developer.apple.com/documentation/Virtualization/VZConsoleDevice
func NewVZConsoleDevice ¶
func NewVZConsoleDevice() VZConsoleDevice
NewVZConsoleDevice creates a new VZConsoleDevice instance.
func VZConsoleDeviceFromID ¶
func VZConsoleDeviceFromID(id objc.ID) VZConsoleDevice
VZConsoleDeviceFromID constructs a VZConsoleDevice from an objc.ID.
A class that represents a console device in a VM.
func (VZConsoleDevice) Autorelease ¶
func (c VZConsoleDevice) Autorelease() VZConsoleDevice
Autorelease adds the receiver to the current autorelease pool.
func (VZConsoleDevice) ConsoleDevices ¶
func (c VZConsoleDevice) ConsoleDevices() IVZConsoleDevice
The list of configured console devices on the VM.
See: https://developer.apple.com/documentation/virtualization/vzvirtualmachine/consoledevices
func (VZConsoleDevice) Init ¶
func (c VZConsoleDevice) Init() VZConsoleDevice
Init initializes the instance.
func (VZConsoleDevice) SetConsoleDevices ¶
func (c VZConsoleDevice) SetConsoleDevices(value IVZConsoleDevice)
type VZConsoleDeviceClass ¶
type VZConsoleDeviceClass struct {
// contains filtered or unexported fields
}
func GetVZConsoleDeviceClass ¶
func GetVZConsoleDeviceClass() VZConsoleDeviceClass
GetVZConsoleDeviceClass returns the class object for VZConsoleDevice.
func (VZConsoleDeviceClass) Alloc ¶
func (vc VZConsoleDeviceClass) Alloc() VZConsoleDevice
Alloc allocates memory for a new instance of the class.
type VZConsoleDeviceConfiguration ¶
type VZConsoleDeviceConfiguration struct {
objectivec.Object
}
The base class for a console device configuration.
Overview ¶
Don’t instantiate VZConsoleDeviceConfiguration directly, instead use one of its subclasses like VZVirtioConsoleDeviceConfiguration instead.
See: https://developer.apple.com/documentation/Virtualization/VZConsoleDeviceConfiguration
func NewVZConsoleDeviceConfiguration ¶
func NewVZConsoleDeviceConfiguration() VZConsoleDeviceConfiguration
NewVZConsoleDeviceConfiguration creates a new VZConsoleDeviceConfiguration instance.
func VZConsoleDeviceConfigurationFromID ¶
func VZConsoleDeviceConfigurationFromID(id objc.ID) VZConsoleDeviceConfiguration
VZConsoleDeviceConfigurationFromID constructs a VZConsoleDeviceConfiguration from an objc.ID.
The base class for a console device configuration.
func (VZConsoleDeviceConfiguration) Autorelease ¶
func (c VZConsoleDeviceConfiguration) Autorelease() VZConsoleDeviceConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZConsoleDeviceConfiguration) Init ¶
func (c VZConsoleDeviceConfiguration) Init() VZConsoleDeviceConfiguration
Init initializes the instance.
type VZConsoleDeviceConfigurationClass ¶
type VZConsoleDeviceConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZConsoleDeviceConfigurationClass ¶
func GetVZConsoleDeviceConfigurationClass() VZConsoleDeviceConfigurationClass
GetVZConsoleDeviceConfigurationClass returns the class object for VZConsoleDeviceConfiguration.
func (VZConsoleDeviceConfigurationClass) Alloc ¶
func (vc VZConsoleDeviceConfigurationClass) Alloc() VZConsoleDeviceConfiguration
Alloc allocates memory for a new instance of the class.
type VZConsolePortConfiguration ¶
type VZConsolePortConfiguration struct {
objectivec.Object
}
The base class for a console port configuration.
Overview ¶
Don’t instantiate VZConsolePortConfiguration directly, instead use one of its subclasses like VZVirtioConsolePortConfiguration.
Configuring the attachment ¶
- VZConsolePortConfiguration.Attachment: The serial port attachment.
- VZConsolePortConfiguration.SetAttachment
See: https://developer.apple.com/documentation/Virtualization/VZConsolePortConfiguration
func NewVZConsolePortConfiguration ¶
func NewVZConsolePortConfiguration() VZConsolePortConfiguration
NewVZConsolePortConfiguration creates a new VZConsolePortConfiguration instance.
func VZConsolePortConfigurationFromID ¶
func VZConsolePortConfigurationFromID(id objc.ID) VZConsolePortConfiguration
VZConsolePortConfigurationFromID constructs a VZConsolePortConfiguration from an objc.ID.
The base class for a console port configuration.
func (VZConsolePortConfiguration) Attachment ¶
func (c VZConsolePortConfiguration) Attachment() IVZSerialPortAttachment
The serial port attachment.
See: https://developer.apple.com/documentation/Virtualization/VZConsolePortConfiguration/attachment
func (VZConsolePortConfiguration) Autorelease ¶
func (c VZConsolePortConfiguration) Autorelease() VZConsolePortConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZConsolePortConfiguration) Init ¶
func (c VZConsolePortConfiguration) Init() VZConsolePortConfiguration
Init initializes the instance.
func (VZConsolePortConfiguration) SetAttachment ¶
func (c VZConsolePortConfiguration) SetAttachment(value IVZSerialPortAttachment)
type VZConsolePortConfigurationClass ¶
type VZConsolePortConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZConsolePortConfigurationClass ¶
func GetVZConsolePortConfigurationClass() VZConsolePortConfigurationClass
GetVZConsolePortConfigurationClass returns the class object for VZConsolePortConfiguration.
func (VZConsolePortConfigurationClass) Alloc ¶
func (vc VZConsolePortConfigurationClass) Alloc() VZConsolePortConfiguration
Alloc allocates memory for a new instance of the class.
type VZDirectoryShare ¶
type VZDirectoryShare struct {
}
The base class for a directory share.
Overview ¶
A directory share defines how the system exposes host directories to a guest VM.
Don’t instantiate VZDirectoryShare directly, use one of its subclasses such as VZSingleDirectoryShare or VZMultipleDirectoryShare instead.
See: https://developer.apple.com/documentation/Virtualization/VZDirectoryShare
func NewVZDirectoryShare ¶
func NewVZDirectoryShare() VZDirectoryShare
NewVZDirectoryShare creates a new VZDirectoryShare instance.
func VZDirectoryShareFromID ¶
func VZDirectoryShareFromID(id objc.ID) VZDirectoryShare
VZDirectoryShareFromID constructs a VZDirectoryShare from an objc.ID.
The base class for a directory share.
func (VZDirectoryShare) Autorelease ¶
func (d VZDirectoryShare) Autorelease() VZDirectoryShare
Autorelease adds the receiver to the current autorelease pool.
func (VZDirectoryShare) Init ¶
func (d VZDirectoryShare) Init() VZDirectoryShare
Init initializes the instance.
type VZDirectoryShareClass ¶
type VZDirectoryShareClass struct {
// contains filtered or unexported fields
}
func GetVZDirectoryShareClass ¶
func GetVZDirectoryShareClass() VZDirectoryShareClass
GetVZDirectoryShareClass returns the class object for VZDirectoryShare.
func (VZDirectoryShareClass) Alloc ¶
func (vc VZDirectoryShareClass) Alloc() VZDirectoryShare
Alloc allocates memory for a new instance of the class.
type VZDirectorySharingDevice ¶
type VZDirectorySharingDevice struct {
objectivec.Object
}
The base class that represents a directory sharing device in a VM.
Overview ¶
Don’t instantiate VZDirectorySharingDevice directly; configure a directory sharing device first by using VZVirtualMachineConfiguration through a subclass of VZDirectorySharingDeviceConfiguration.
When you create a VZVirtualMachine from the configuration, the directory sharing devices are available through the `VZVirtualMachine.DirectorySharingDevices()` property.
The real type of VZDirectorySharingDevice corresponds to the type used by the configuration. For example, a VZVirtioFileSystemDeviceConfiguration leads to a device of type VZVirtioFileSystemDevice.
See: https://developer.apple.com/documentation/Virtualization/VZDirectorySharingDevice
func NewVZDirectorySharingDevice ¶
func NewVZDirectorySharingDevice() VZDirectorySharingDevice
NewVZDirectorySharingDevice creates a new VZDirectorySharingDevice instance.
func VZDirectorySharingDeviceFromID ¶
func VZDirectorySharingDeviceFromID(id objc.ID) VZDirectorySharingDevice
VZDirectorySharingDeviceFromID constructs a VZDirectorySharingDevice from an objc.ID.
The base class that represents a directory sharing device in a VM.
func (VZDirectorySharingDevice) Autorelease ¶
func (d VZDirectorySharingDevice) Autorelease() VZDirectorySharingDevice
Autorelease adds the receiver to the current autorelease pool.
func (VZDirectorySharingDevice) Init ¶
func (d VZDirectorySharingDevice) Init() VZDirectorySharingDevice
Init initializes the instance.
type VZDirectorySharingDeviceClass ¶
type VZDirectorySharingDeviceClass struct {
// contains filtered or unexported fields
}
func GetVZDirectorySharingDeviceClass ¶
func GetVZDirectorySharingDeviceClass() VZDirectorySharingDeviceClass
GetVZDirectorySharingDeviceClass returns the class object for VZDirectorySharingDevice.
func (VZDirectorySharingDeviceClass) Alloc ¶
func (vc VZDirectorySharingDeviceClass) Alloc() VZDirectorySharingDevice
Alloc allocates memory for a new instance of the class.
type VZDirectorySharingDeviceConfiguration ¶
type VZDirectorySharingDeviceConfiguration struct {
objectivec.Object
}
The base class for a directory sharing device configuration.
Overview ¶
Don’t instantiate VZDirectorySharingDeviceConfiguration directly. Instead use one of its subclasses, like VZVirtioFileSystemDeviceConfiguration.
See: https://developer.apple.com/documentation/Virtualization/VZDirectorySharingDeviceConfiguration
func NewVZDirectorySharingDeviceConfiguration ¶
func NewVZDirectorySharingDeviceConfiguration() VZDirectorySharingDeviceConfiguration
NewVZDirectorySharingDeviceConfiguration creates a new VZDirectorySharingDeviceConfiguration instance.
func VZDirectorySharingDeviceConfigurationFromID ¶
func VZDirectorySharingDeviceConfigurationFromID(id objc.ID) VZDirectorySharingDeviceConfiguration
VZDirectorySharingDeviceConfigurationFromID constructs a VZDirectorySharingDeviceConfiguration from an objc.ID.
The base class for a directory sharing device configuration.
func (VZDirectorySharingDeviceConfiguration) Autorelease ¶
func (d VZDirectorySharingDeviceConfiguration) Autorelease() VZDirectorySharingDeviceConfiguration
Autorelease adds the receiver to the current autorelease pool.
type VZDirectorySharingDeviceConfigurationClass ¶
type VZDirectorySharingDeviceConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZDirectorySharingDeviceConfigurationClass ¶
func GetVZDirectorySharingDeviceConfigurationClass() VZDirectorySharingDeviceConfigurationClass
GetVZDirectorySharingDeviceConfigurationClass returns the class object for VZDirectorySharingDeviceConfiguration.
type VZDiskBlockDeviceStorageDeviceAttachment ¶
type VZDiskBlockDeviceStorageDeviceAttachment struct {
VZStorageDeviceAttachment
}
A storage device attachment that uses a disk to store data.
Overview ¶
The disk block device implements a storage attachment by using an actual disk rather than a disk image on a file system.
In the following example, a disk device at `/dev/rdisk42` executes the I/O operations directly on that disk rather than through a file system:
By default, only the `root` user can access the disk file handle. Running virtual machines as `root` isn’t recommended. The best practice is to open the file in a separate process that has `root` privileges, then pass the open file descriptor using XPC or a Unix socket to a non-`root` process running Virtualization. For more information about Unix sockets, see Streams, Sockets, and Ports; for more information on XPC services, see the XPC framework documentation.
Initializers ¶
- VZDiskBlockDeviceStorageDeviceAttachment.InitWithFileHandleReadOnlySynchronizationModeError: Creates a new block storage device attachment from a file handle and with the specified access mode, synchronization mode, and error object that you provide.
Getting the block storage device details ¶
- VZDiskBlockDeviceStorageDeviceAttachment.FileHandle: A file handle to a block device.
- VZDiskBlockDeviceStorageDeviceAttachment.ReadOnly: A Boolean value that indicates whether this disk attachment is read-only; otherwise, if the file handle allows writes, the device can write data into it.
- VZDiskBlockDeviceStorageDeviceAttachment.SynchronizationMode: The value that defines how the disk synchronizes with the underlying storage when the guest operating system flushes data.
See: https://developer.apple.com/documentation/Virtualization/VZDiskBlockDeviceStorageDeviceAttachment
func NewDiskBlockDeviceStorageDeviceAttachmentWithFileHandleReadOnlySynchronizationModeError ¶
func NewDiskBlockDeviceStorageDeviceAttachmentWithFileHandleReadOnlySynchronizationModeError(fileHandle foundation.NSFileHandle, readOnly bool, synchronizationMode VZDiskSynchronizationMode) (VZDiskBlockDeviceStorageDeviceAttachment, error)
Creates a new block storage device attachment from a file handle and with the specified access mode, synchronization mode, and error object that you provide.
fileHandle: The [FileHandle] to a block device to attach to this VM. // [FileHandle]: https://developer.apple.com/documentation/Foundation/FileHandle
readOnly: A Boolean value that indicates whether this disk attachment is read-only; otherwise, if the file handle allows writes, the device can write data into it.
synchronizationMode: The VZDiskSynchronizationMode value that defines how the disk synchronizes with the underlying storage when the guest operating system flushes data. // VZDiskSynchronizationMode: https://developer.apple.com/documentation/Virtualization/VZDiskSynchronizationMode
Discussion ¶
The `readOnly` parameter affects how the Virtualization framework exposes the disk to the guest operating system by the storage controller. If you intend to use the disk in read-only mode, it’s also a best practice to open the file handle as read-only.
func NewVZDiskBlockDeviceStorageDeviceAttachment ¶
func NewVZDiskBlockDeviceStorageDeviceAttachment() VZDiskBlockDeviceStorageDeviceAttachment
NewVZDiskBlockDeviceStorageDeviceAttachment creates a new VZDiskBlockDeviceStorageDeviceAttachment instance.
func VZDiskBlockDeviceStorageDeviceAttachmentFromID ¶
func VZDiskBlockDeviceStorageDeviceAttachmentFromID(id objc.ID) VZDiskBlockDeviceStorageDeviceAttachment
VZDiskBlockDeviceStorageDeviceAttachmentFromID constructs a VZDiskBlockDeviceStorageDeviceAttachment from an objc.ID.
A storage device attachment that uses a disk to store data.
func (VZDiskBlockDeviceStorageDeviceAttachment) Autorelease ¶
func (d VZDiskBlockDeviceStorageDeviceAttachment) Autorelease() VZDiskBlockDeviceStorageDeviceAttachment
Autorelease adds the receiver to the current autorelease pool.
func (VZDiskBlockDeviceStorageDeviceAttachment) FileHandle ¶
func (d VZDiskBlockDeviceStorageDeviceAttachment) FileHandle() foundation.NSFileHandle
A file handle to a block device.
func (VZDiskBlockDeviceStorageDeviceAttachment) InitWithFileHandleReadOnlySynchronizationModeError ¶
func (d VZDiskBlockDeviceStorageDeviceAttachment) InitWithFileHandleReadOnlySynchronizationModeError(fileHandle foundation.NSFileHandle, readOnly bool, synchronizationMode VZDiskSynchronizationMode) (VZDiskBlockDeviceStorageDeviceAttachment, error)
Creates a new block storage device attachment from a file handle and with the specified access mode, synchronization mode, and error object that you provide.
fileHandle: The [FileHandle] to a block device to attach to this VM. // [FileHandle]: https://developer.apple.com/documentation/Foundation/FileHandle
readOnly: A Boolean value that indicates whether this disk attachment is read-only; otherwise, if the file handle allows writes, the device can write data into it.
synchronizationMode: The VZDiskSynchronizationMode value that defines how the disk synchronizes with the underlying storage when the guest operating system flushes data. // VZDiskSynchronizationMode: https://developer.apple.com/documentation/Virtualization/VZDiskSynchronizationMode
Discussion ¶
The `readOnly` parameter affects how the Virtualization framework exposes the disk to the guest operating system by the storage controller. If you intend to use the disk in read-only mode, it’s also a best practice to open the file handle as read-only.
func (VZDiskBlockDeviceStorageDeviceAttachment) ReadOnly ¶
func (d VZDiskBlockDeviceStorageDeviceAttachment) ReadOnly() bool
A Boolean value that indicates whether this disk attachment is read-only; otherwise, if the file handle allows writes, the device can write data into it.
func (VZDiskBlockDeviceStorageDeviceAttachment) SynchronizationMode ¶
func (d VZDiskBlockDeviceStorageDeviceAttachment) SynchronizationMode() VZDiskSynchronizationMode
The value that defines how the disk synchronizes with the underlying storage when the guest operating system flushes data.
type VZDiskBlockDeviceStorageDeviceAttachmentClass ¶
type VZDiskBlockDeviceStorageDeviceAttachmentClass struct {
// contains filtered or unexported fields
}
func GetVZDiskBlockDeviceStorageDeviceAttachmentClass ¶
func GetVZDiskBlockDeviceStorageDeviceAttachmentClass() VZDiskBlockDeviceStorageDeviceAttachmentClass
GetVZDiskBlockDeviceStorageDeviceAttachmentClass returns the class object for VZDiskBlockDeviceStorageDeviceAttachment.
func (VZDiskBlockDeviceStorageDeviceAttachmentClass) Alloc ¶
func (vc VZDiskBlockDeviceStorageDeviceAttachmentClass) Alloc() VZDiskBlockDeviceStorageDeviceAttachment
Alloc allocates memory for a new instance of the class.
type VZDiskImageCachingMode ¶
type VZDiskImageCachingMode int
See: https://developer.apple.com/documentation/Virtualization/VZDiskImageCachingMode
const ( // VZDiskImageCachingModeAutomatic: Allows the virtualization framework to automatically determine whether to enable data caching. VZDiskImageCachingModeAutomatic VZDiskImageCachingMode = 0 // VZDiskImageCachingModeCached: Enables data caching. VZDiskImageCachingModeCached VZDiskImageCachingMode = 2 // VZDiskImageCachingModeUncached: Disables data caching. VZDiskImageCachingModeUncached VZDiskImageCachingMode = 1 )
func (VZDiskImageCachingMode) String ¶
func (e VZDiskImageCachingMode) String() string
type VZDiskImageStorageDeviceAttachment ¶
type VZDiskImageStorageDeviceAttachment struct {
VZStorageDeviceAttachment
}
A device that stores content in a disk image.
Overview ¶
Use a VZDiskImageStorageDeviceAttachment object to manage the storage for a disk in a virtual machine (VM). The guest operating system sees the storage as a disk, and when the guest operating system writes files to the disk, the virtual machine stores the files in the disk image you provide.
The virtualization framework supports two disk image formats:
RAW disk images: A file that’s the requested size of the VM disk, this format results in a 1-to-1 mapping between the offsets in the file and the offsets in the VM disk. ASIF disk images: (ASIF) files transfer more efficiently between hosts or disks because their intrinsic structure doesn’t depend on the host file system’s capabilities. The size the ASIF file takes on the file system is proportional to the actual data stored in the disk image.
Create the disk image ¶
Create disk images using `diskutil`, a command-line utility you can access through the Terminal app. The `diskutil` utility performs a number of functions. The command uses a specific structure that tells the app what function it’s performing, including many arguments documented in its online manual page documents. For more information, see the `diskutil` manual page by using the command `man diskutil` in Terminal.
The command to creates disk image files you use with VMs starts with `diskutil image create blank`, followed by three required arguments that describe the structure, size, and location of the disk image. The general format of the command follows the pattern shown here:
Use these parameters to specify the configuration of the disk image:
`--format`: An argument that describes the specific file-system format to use, either [RAW] or [ASIF]. `diskutil` supports other file-system formats as well, not all of which Virtualization supports. For more information, see the `diskutil` manual page by using the command `man diskutil` in Terminal. `--fs`: An argument that specifies the file system to use when creating the disk image. `--size`: An argument that describes the size of the file system to create, usually specified in gigabytes with the suffix [GiB]; for example, `256GiB` specifies a 256 GB image file size. You can also specify sizes in megabytes, using the MiB notation; for example, `256MiB`. `IMAGE_PATH`: The file system path that represents the location where `diskutil` creates the [RAW] or [ASIF] file.
To create a RAW disk image in the file system of the host computer, open Terminal and run the following command, replacing the placeholder values with your own, for example:
A best practice is to give disk images a common and easily recognizable file extension, such as `XCUIElementTypeImg`; for example `VM_Image.Img()`.
To create an ASIF image, replace [RAW] with [ASIF], as shown here:
You can execute `diskutil` commands under app control to create disk images programmatically.
You can also create [ASIF] or [RAW] disk images interactively using Disk Utility, a utility app that Apple provides with macOS. To create volumes with Disk Utility, open the app, then select File > New Image > Blank Image. Configure the form by selecting the disk format (either [ASIF] or [RAW]), volume size, and location for the new volume, and then click Save. For more information on using Disk Utility, see Disk Utility User Guide.
Alternatively, you can create a raw disk image programmatically using the UNIX `open()` and `truncate()` standard library functions as shown here:
Initialize the disk image ¶
After creating the disk image, you use it to initialize a VM’s VZDiskImageStorageDeviceAttachment object. Use the attachment object to configure the VZVirtioBlockDeviceConfiguration object that you add to your virtual machine’s configuration, as shown here:
Creating the attachment point ¶
- VZDiskImageStorageDeviceAttachment.InitWithURLReadOnlyError: Creates the attachment object from the specified disk image.
- VZDiskImageStorageDeviceAttachment.InitWithURLReadOnlyCachingModeSynchronizationModeError: Initialize the attachment from a local file URL.
Getting the disk image details ¶
- VZDiskImageStorageDeviceAttachment.URL: The URL of the underlying disk image.
- VZDiskImageStorageDeviceAttachment.ReadOnly: A Boolean value that indicates whether the underlying disk image is read-only.
- VZDiskImageStorageDeviceAttachment.CachingMode: The current cacheing mode for the virtual disk image.
- VZDiskImageStorageDeviceAttachment.SynchronizationMode: The mode in which the disk image synchronizes data with the underlying storage device.
See: https://developer.apple.com/documentation/Virtualization/VZDiskImageStorageDeviceAttachment
func NewDiskImageStorageDeviceAttachmentWithURLReadOnlyCachingModeSynchronizationModeError ¶
func NewDiskImageStorageDeviceAttachmentWithURLReadOnlyCachingModeSynchronizationModeError(url foundation.INSURL, readOnly bool, cachingMode VZDiskImageCachingMode, synchronizationMode VZDiskImageSynchronizationMode) (VZDiskImageStorageDeviceAttachment, error)
Initialize the attachment from a local file URL.
url: Local file URL to the disk image in RAW format.
readOnly: If `true`, the device attachment is read-only, otherwise the device can write data to the disk image.
cachingMode: The cacheing mode from one of the available VZDiskImageCachingMode options. // VZDiskImageCachingMode: https://developer.apple.com/documentation/Virtualization/VZDiskImageCachingMode
synchronizationMode: How the disk image synchronizes with the underlying storage when the guest operating system flushes data, described by one of the available VZDiskImageSynchronizationMode modes. // VZDiskImageSynchronizationMode: https://developer.apple.com/documentation/Virtualization/VZDiskImageSynchronizationMode
func NewDiskImageStorageDeviceAttachmentWithURLReadOnlyError ¶
func NewDiskImageStorageDeviceAttachmentWithURLReadOnlyError(url foundation.INSURL, readOnly bool) (VZDiskImageStorageDeviceAttachment, error)
Creates the attachment object from the specified disk image.
url: A URL that points to a local disk image in RAW format.
readOnly: A Boolean that indicates whether to configure the disk image as read-only. Specify [true] to prevent the guest operating system from writing to the disk image, and [false] to allow writing. // [false]: https://developer.apple.com/documentation/Swift/false [true]: https://developer.apple.com/documentation/Swift/true
Return Value ¶
In Swift the methods returns an attachment object; in Objective-C the methods returns an attachment object on success, or `nil` if an error occurred
func NewVZDiskImageStorageDeviceAttachment ¶
func NewVZDiskImageStorageDeviceAttachment() VZDiskImageStorageDeviceAttachment
NewVZDiskImageStorageDeviceAttachment creates a new VZDiskImageStorageDeviceAttachment instance.
func VZDiskImageStorageDeviceAttachmentFromID ¶
func VZDiskImageStorageDeviceAttachmentFromID(id objc.ID) VZDiskImageStorageDeviceAttachment
VZDiskImageStorageDeviceAttachmentFromID constructs a VZDiskImageStorageDeviceAttachment from an objc.ID.
A device that stores content in a disk image.
func (VZDiskImageStorageDeviceAttachment) Autorelease ¶
func (d VZDiskImageStorageDeviceAttachment) Autorelease() VZDiskImageStorageDeviceAttachment
Autorelease adds the receiver to the current autorelease pool.
func (VZDiskImageStorageDeviceAttachment) CachingMode ¶
func (d VZDiskImageStorageDeviceAttachment) CachingMode() VZDiskImageCachingMode
The current cacheing mode for the virtual disk image.
func (VZDiskImageStorageDeviceAttachment) Init ¶
func (d VZDiskImageStorageDeviceAttachment) Init() VZDiskImageStorageDeviceAttachment
Init initializes the instance.
func (VZDiskImageStorageDeviceAttachment) InitWithURLReadOnlyCachingModeSynchronizationModeError ¶
func (d VZDiskImageStorageDeviceAttachment) InitWithURLReadOnlyCachingModeSynchronizationModeError(url foundation.INSURL, readOnly bool, cachingMode VZDiskImageCachingMode, synchronizationMode VZDiskImageSynchronizationMode) (VZDiskImageStorageDeviceAttachment, error)
Initialize the attachment from a local file URL.
url: Local file URL to the disk image in RAW format.
readOnly: If `true`, the device attachment is read-only, otherwise the device can write data to the disk image.
cachingMode: The cacheing mode from one of the available VZDiskImageCachingMode options. // VZDiskImageCachingMode: https://developer.apple.com/documentation/Virtualization/VZDiskImageCachingMode
synchronizationMode: How the disk image synchronizes with the underlying storage when the guest operating system flushes data, described by one of the available VZDiskImageSynchronizationMode modes. // VZDiskImageSynchronizationMode: https://developer.apple.com/documentation/Virtualization/VZDiskImageSynchronizationMode
func (VZDiskImageStorageDeviceAttachment) InitWithURLReadOnlyError ¶
func (d VZDiskImageStorageDeviceAttachment) InitWithURLReadOnlyError(url foundation.INSURL, readOnly bool) (VZDiskImageStorageDeviceAttachment, error)
Creates the attachment object from the specified disk image.
url: A URL that points to a local disk image in RAW format.
readOnly: A Boolean that indicates whether to configure the disk image as read-only. Specify [true] to prevent the guest operating system from writing to the disk image, and [false] to allow writing. // [false]: https://developer.apple.com/documentation/Swift/false [true]: https://developer.apple.com/documentation/Swift/true
Return Value ¶
In Swift the methods returns an attachment object; in Objective-C the methods returns an attachment object on success, or `nil` if an error occurred
func (VZDiskImageStorageDeviceAttachment) ReadOnly ¶
func (d VZDiskImageStorageDeviceAttachment) ReadOnly() bool
A Boolean value that indicates whether the underlying disk image is read-only.
Discussion ¶
If the value of this property is true, the guest operating system may read the contents of the disk image, but may not write to it.
func (VZDiskImageStorageDeviceAttachment) SynchronizationMode ¶
func (d VZDiskImageStorageDeviceAttachment) SynchronizationMode() VZDiskImageSynchronizationMode
The mode in which the disk image synchronizes data with the underlying storage device.
func (VZDiskImageStorageDeviceAttachment) URL ¶
func (d VZDiskImageStorageDeviceAttachment) URL() foundation.INSURL
The URL of the underlying disk image.
See: https://developer.apple.com/documentation/Virtualization/VZDiskImageStorageDeviceAttachment/url
type VZDiskImageStorageDeviceAttachmentClass ¶
type VZDiskImageStorageDeviceAttachmentClass struct {
// contains filtered or unexported fields
}
func GetVZDiskImageStorageDeviceAttachmentClass ¶
func GetVZDiskImageStorageDeviceAttachmentClass() VZDiskImageStorageDeviceAttachmentClass
GetVZDiskImageStorageDeviceAttachmentClass returns the class object for VZDiskImageStorageDeviceAttachment.
func (VZDiskImageStorageDeviceAttachmentClass) Alloc ¶
func (vc VZDiskImageStorageDeviceAttachmentClass) Alloc() VZDiskImageStorageDeviceAttachment
Alloc allocates memory for a new instance of the class.
type VZDiskImageSynchronizationMode ¶
type VZDiskImageSynchronizationMode int
See: https://developer.apple.com/documentation/Virtualization/VZDiskImageSynchronizationMode
const ( // VZDiskImageSynchronizationModeFsync: Synchronizes data to the drive using the system’s best-effort synchronization mode. VZDiskImageSynchronizationModeFsync VZDiskImageSynchronizationMode = 2 // VZDiskImageSynchronizationModeFull: Synchronizes data to the permanent storage holding the disk image. VZDiskImageSynchronizationModeFull VZDiskImageSynchronizationMode = 1 // VZDiskImageSynchronizationModeNone: Disables data synchronization with the permanent storage. VZDiskImageSynchronizationModeNone VZDiskImageSynchronizationMode = 3 )
func (VZDiskImageSynchronizationMode) String ¶
func (e VZDiskImageSynchronizationMode) String() string
type VZDiskSynchronizationMode ¶
type VZDiskSynchronizationMode int
See: https://developer.apple.com/documentation/Virtualization/VZDiskSynchronizationMode
const ( // VZDiskSynchronizationModeFull: Perform all synchronization operations as requested by the guest OS. VZDiskSynchronizationModeFull VZDiskSynchronizationMode = 0 // VZDiskSynchronizationModeNone: Don’t synchronize the data with the permanent storage. VZDiskSynchronizationModeNone VZDiskSynchronizationMode = 1 )
func (VZDiskSynchronizationMode) String ¶
func (e VZDiskSynchronizationMode) String() string
type VZEFIBootLoader ¶
type VZEFIBootLoader struct {
VZBootLoader
}
The boot loader configuration the system uses to boot guest-operating systems that expect an Extensible Firmware Interface (EFI) ROM.
Instance properties ¶
- VZEFIBootLoader.VariableStore: The boot loader’s EFI variable store.
- VZEFIBootLoader.SetVariableStore
See: https://developer.apple.com/documentation/Virtualization/VZEFIBootLoader
func NewVZEFIBootLoader ¶
func NewVZEFIBootLoader() VZEFIBootLoader
NewVZEFIBootLoader creates a new VZEFIBootLoader instance.
func VZEFIBootLoaderFromID ¶
func VZEFIBootLoaderFromID(id objc.ID) VZEFIBootLoader
VZEFIBootLoaderFromID constructs a VZEFIBootLoader from an objc.ID.
The boot loader configuration the system uses to boot guest-operating systems that expect an Extensible Firmware Interface (EFI) ROM.
func (VZEFIBootLoader) Autorelease ¶
func (e VZEFIBootLoader) Autorelease() VZEFIBootLoader
Autorelease adds the receiver to the current autorelease pool.
func (VZEFIBootLoader) Init ¶
func (e VZEFIBootLoader) Init() VZEFIBootLoader
Init initializes the instance.
func (VZEFIBootLoader) SetVariableStore ¶
func (e VZEFIBootLoader) SetVariableStore(value IVZEFIVariableStore)
func (VZEFIBootLoader) VariableStore ¶
func (e VZEFIBootLoader) VariableStore() IVZEFIVariableStore
The boot loader’s EFI variable store.
See: https://developer.apple.com/documentation/Virtualization/VZEFIBootLoader/variableStore
type VZEFIBootLoaderClass ¶
type VZEFIBootLoaderClass struct {
// contains filtered or unexported fields
}
func GetVZEFIBootLoaderClass ¶
func GetVZEFIBootLoaderClass() VZEFIBootLoaderClass
GetVZEFIBootLoaderClass returns the class object for VZEFIBootLoader.
func (VZEFIBootLoaderClass) Alloc ¶
func (vc VZEFIBootLoaderClass) Alloc() VZEFIBootLoader
Alloc allocates memory for a new instance of the class.
type VZEFIVariableStore ¶
type VZEFIVariableStore struct {
objectivec.Object
}
An object that represents the Extensible Firmware Interface (EFI) variable store that contains NVRAM variables the EFI exposes.
Creating the variable store ¶
- VZEFIVariableStore.InitCreatingVariableStoreAtURLOptionsError: Creates a new EFI variable store at specified the URL on the filesystem, initialization options, and error-return variable.
- VZEFIVariableStore.InitWithURL: Initialize the variable store from the URL of an existing file.
Instance properties ¶
- VZEFIVariableStore.URL: The URL of the variable store on the local file system.
See: https://developer.apple.com/documentation/Virtualization/VZEFIVariableStore
func NewEFIVariableStoreCreatingVariableStoreAtURLOptionsError ¶
func NewEFIVariableStoreCreatingVariableStoreAtURLOptionsError(URL foundation.INSURL, options VZEFIVariableStoreInitializationOptions) (VZEFIVariableStore, error)
Creates a new EFI variable store at specified the URL on the filesystem, initialization options, and error-return variable.
URL: A URL that specifies the location on disk at which to store the EFI information.
options: An array of possible [VZEFIVariableStore.InitializationOptions]. // [VZEFIVariableStore.InitializationOptions]: https://developer.apple.com/documentation/Virtualization/VZEFIVariableStore/InitializationOptions
func NewEFIVariableStoreWithURL ¶
func NewEFIVariableStoreWithURL(URL foundation.INSURL) VZEFIVariableStore
Initialize the variable store from the URL of an existing file.
URL: The URL of the location on disk that contains the stored EFI information.
See: https://developer.apple.com/documentation/Virtualization/VZEFIVariableStore/init(url:)
func NewVZEFIVariableStore ¶
func NewVZEFIVariableStore() VZEFIVariableStore
NewVZEFIVariableStore creates a new VZEFIVariableStore instance.
func VZEFIVariableStoreFromID ¶
func VZEFIVariableStoreFromID(id objc.ID) VZEFIVariableStore
VZEFIVariableStoreFromID constructs a VZEFIVariableStore from an objc.ID.
An object that represents the Extensible Firmware Interface (EFI) variable store that contains NVRAM variables the EFI exposes.
func (VZEFIVariableStore) Autorelease ¶
func (e VZEFIVariableStore) Autorelease() VZEFIVariableStore
Autorelease adds the receiver to the current autorelease pool.
func (VZEFIVariableStore) Init ¶
func (e VZEFIVariableStore) Init() VZEFIVariableStore
Init initializes the instance.
func (VZEFIVariableStore) InitCreatingVariableStoreAtURLOptionsError ¶
func (e VZEFIVariableStore) InitCreatingVariableStoreAtURLOptionsError(URL foundation.INSURL, options VZEFIVariableStoreInitializationOptions) (VZEFIVariableStore, error)
Creates a new EFI variable store at specified the URL on the filesystem, initialization options, and error-return variable.
URL: A URL that specifies the location on disk at which to store the EFI information.
options: An array of possible [VZEFIVariableStore.InitializationOptions]. // [VZEFIVariableStore.InitializationOptions]: https://developer.apple.com/documentation/Virtualization/VZEFIVariableStore/InitializationOptions
func (VZEFIVariableStore) InitWithURL ¶
func (e VZEFIVariableStore) InitWithURL(URL foundation.INSURL) VZEFIVariableStore
Initialize the variable store from the URL of an existing file.
URL: The URL of the location on disk that contains the stored EFI information.
See: https://developer.apple.com/documentation/Virtualization/VZEFIVariableStore/init(url:)
func (VZEFIVariableStore) URL ¶
func (e VZEFIVariableStore) URL() foundation.INSURL
The URL of the variable store on the local file system.
See: https://developer.apple.com/documentation/Virtualization/VZEFIVariableStore/url
type VZEFIVariableStoreClass ¶
type VZEFIVariableStoreClass struct {
// contains filtered or unexported fields
}
func GetVZEFIVariableStoreClass ¶
func GetVZEFIVariableStoreClass() VZEFIVariableStoreClass
GetVZEFIVariableStoreClass returns the class object for VZEFIVariableStore.
func (VZEFIVariableStoreClass) Alloc ¶
func (vc VZEFIVariableStoreClass) Alloc() VZEFIVariableStore
Alloc allocates memory for a new instance of the class.
type VZEFIVariableStoreInitializationOptions ¶
type VZEFIVariableStoreInitializationOptions int
See: https://developer.apple.com/documentation/Virtualization/VZEFIVariableStore/InitializationOptions
const ( // VZEFIVariableStoreInitializationOptionAllowOverwrite: A Boolean value that indicates whether the framework can overwrite the EFI variable store. VZEFIVariableStoreInitializationOptionAllowOverwrite VZEFIVariableStoreInitializationOptions = 1 )
func (VZEFIVariableStoreInitializationOptions) String ¶
func (e VZEFIVariableStoreInitializationOptions) String() string
type VZEntropyDeviceConfiguration ¶
type VZEntropyDeviceConfiguration struct {
objectivec.Object
}
The common configuration traits for entropy devices.
Overview ¶
Don’t create a VZEntropyDeviceConfiguration object directly. Instead, instantiate a subclass such as VZVirtioEntropyDeviceConfiguration to configure a source of entropy for your virtual machine.
See: https://developer.apple.com/documentation/Virtualization/VZEntropyDeviceConfiguration
func NewVZEntropyDeviceConfiguration ¶
func NewVZEntropyDeviceConfiguration() VZEntropyDeviceConfiguration
NewVZEntropyDeviceConfiguration creates a new VZEntropyDeviceConfiguration instance.
func VZEntropyDeviceConfigurationFromID ¶
func VZEntropyDeviceConfigurationFromID(id objc.ID) VZEntropyDeviceConfiguration
VZEntropyDeviceConfigurationFromID constructs a VZEntropyDeviceConfiguration from an objc.ID.
The common configuration traits for entropy devices.
func (VZEntropyDeviceConfiguration) Autorelease ¶
func (e VZEntropyDeviceConfiguration) Autorelease() VZEntropyDeviceConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZEntropyDeviceConfiguration) Init ¶
func (e VZEntropyDeviceConfiguration) Init() VZEntropyDeviceConfiguration
Init initializes the instance.
type VZEntropyDeviceConfigurationClass ¶
type VZEntropyDeviceConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZEntropyDeviceConfigurationClass ¶
func GetVZEntropyDeviceConfigurationClass() VZEntropyDeviceConfigurationClass
GetVZEntropyDeviceConfigurationClass returns the class object for VZEntropyDeviceConfiguration.
func (VZEntropyDeviceConfigurationClass) Alloc ¶
func (vc VZEntropyDeviceConfigurationClass) Alloc() VZEntropyDeviceConfiguration
Alloc allocates memory for a new instance of the class.
type VZErrorCode ¶
type VZErrorCode int
See: https://developer.apple.com/documentation/Virtualization/VZError/Code
const ( // VZErrorDeviceAlreadyAttached: The device already has an attachment to the VM. VZErrorDeviceAlreadyAttached VZErrorCode = 30002 // VZErrorDeviceInitializationFailure: A device initialization failure. VZErrorDeviceInitializationFailure VZErrorCode = 30003 // VZErrorDeviceNotFound: The framework can’t find the device. VZErrorDeviceNotFound VZErrorCode = 30004 // VZErrorInstallationFailed: An error occurred during installation. VZErrorInstallationFailed VZErrorCode = 10007 // VZErrorInstallationRequiresUpdate: The VM requires a software update in order to complete the installation. VZErrorInstallationRequiresUpdate VZErrorCode = 10006 // VZErrorInternal: An internal error, such as the VM unexpectedly stopping. VZErrorInternal VZErrorCode = 1 // VZErrorInvalidDiskImage: An invalid disk-image error. VZErrorInvalidDiskImage VZErrorCode = 5 // VZErrorInvalidRestoreImage: The restore image is invalid. VZErrorInvalidRestoreImage VZErrorCode = 10005 // VZErrorInvalidRestoreImageCatalog: The restore image catalog is invalid. VZErrorInvalidRestoreImageCatalog VZErrorCode = 10002 // VZErrorInvalidVirtualMachineConfiguration: An invalid configuration error. VZErrorInvalidVirtualMachineConfiguration VZErrorCode = 2 // VZErrorInvalidVirtualMachineState: An invalid state error. VZErrorInvalidVirtualMachineState VZErrorCode = 3 // VZErrorInvalidVirtualMachineStateTransition: An invalid state transition error. VZErrorInvalidVirtualMachineStateTransition VZErrorCode = 4 // VZErrorNetworkBlockDeviceDisconnected: The network block device client disconnected from the server. VZErrorNetworkBlockDeviceDisconnected VZErrorCode = 20002 // VZErrorNetworkBlockDeviceNegotiationFailed: The connection or the negotiation with the network block device server failed. VZErrorNetworkBlockDeviceNegotiationFailed VZErrorCode = 20001 // VZErrorNetworkError: A network error, such as a failed connection error, occurred. VZErrorNetworkError VZErrorCode = 7 // VZErrorNoSupportedRestoreImagesInCatalog: The restore image catalog has no supported restore images. VZErrorNoSupportedRestoreImagesInCatalog VZErrorCode = 10003 // VZErrorNotSupported: The host computer or operating system isn’t supported. VZErrorNotSupported VZErrorCode = 10 // VZErrorOperationCancelled: The code that indicates user canceled the installation of Rosetta or the app canceled the installation of a guest OS. VZErrorOperationCancelled VZErrorCode = 9 // VZErrorOutOfDiskSpace: The host is out of disk space. VZErrorOutOfDiskSpace VZErrorCode = 8 // VZErrorRestore: The VM failed to restore from save file. VZErrorRestore VZErrorCode = 12 // VZErrorRestoreImageCatalogLoadFailed: The restore image catalog failed to load. VZErrorRestoreImageCatalogLoadFailed VZErrorCode = 10001 // VZErrorRestoreImageLoadFailed: The restore image failed to load. VZErrorRestoreImageLoadFailed VZErrorCode = 10004 // VZErrorSave: The VM failed to save to the save file. VZErrorSave VZErrorCode = 11 // VZErrorUSBControllerNotFound: The framework can’t find the controller. VZErrorUSBControllerNotFound VZErrorCode = 30001 // VZErrorVirtualMachineLimitExceeded: Unable to create an additional VM. VZErrorVirtualMachineLimitExceeded VZErrorCode = 6 )
func (VZErrorCode) String ¶
func (e VZErrorCode) String() string
type VZFileHandleNetworkDeviceAttachment ¶
type VZFileHandleNetworkDeviceAttachment struct {
VZNetworkDeviceAttachment
}
A network device that transmits raw network packets and frames using a datagram socket.
Overview ¶
A VZFileHandleNetworkDeviceAttachment object maps a network interface to a connected datagram socket. This attachment transmits data at the data link layer. You configure and manage the socket in your app, and manage the corresponding data transfers.
To configure a network device with a socket-based file handle:
- Create a socket with the `SOCK_DGRAM` type in your app. - Create a VZFileHandleNetworkDeviceAttachment.FileHandle from the socket’s file descriptor. - Create the VZFileHandleNetworkDeviceAttachment object using the file handle. - Assign the attachment object to the VZFileHandleNetworkDeviceAttachment.Attachment property of a VZVirtioNetworkDeviceConfiguration object. - Add the VZVirtioNetworkDeviceConfiguration object to the VZFileHandleNetworkDeviceAttachment.NetworkDevices property of your VZVirtualMachineConfiguration.
This attachment doesn’t require your app to have the com.apple.vm.networking entitlement.
Creating the attachment point ¶
- VZFileHandleNetworkDeviceAttachment.InitWithFileHandle: Creates the attachment from a file handle that contains a connected datagram socket.
Getting the file handle ¶
- VZFileHandleNetworkDeviceAttachment.FileHandle: The file handle assigned to this attachment.
Specifying the network packet size ¶
- VZFileHandleNetworkDeviceAttachment.MaximumTransmissionUnit: An integer value that indicates the maximum transmission unit (MTU) associated with this attachment.
- VZFileHandleNetworkDeviceAttachment.SetMaximumTransmissionUnit
See: https://developer.apple.com/documentation/Virtualization/VZFileHandleNetworkDeviceAttachment
func NewFileHandleNetworkDeviceAttachmentWithFileHandle ¶
func NewFileHandleNetworkDeviceAttachmentWithFileHandle(fileHandle foundation.NSFileHandle) VZFileHandleNetworkDeviceAttachment
Creates the attachment from a file handle that contains a connected datagram socket.
fileHandle: A file handle to a connected datagram socket.
Return Value ¶
An attachment object for the specified file handle.
func NewVZFileHandleNetworkDeviceAttachment ¶
func NewVZFileHandleNetworkDeviceAttachment() VZFileHandleNetworkDeviceAttachment
NewVZFileHandleNetworkDeviceAttachment creates a new VZFileHandleNetworkDeviceAttachment instance.
func VZFileHandleNetworkDeviceAttachmentFromID ¶
func VZFileHandleNetworkDeviceAttachmentFromID(id objc.ID) VZFileHandleNetworkDeviceAttachment
VZFileHandleNetworkDeviceAttachmentFromID constructs a VZFileHandleNetworkDeviceAttachment from an objc.ID.
A network device that transmits raw network packets and frames using a datagram socket.
func (VZFileHandleNetworkDeviceAttachment) Attachment ¶
func (f VZFileHandleNetworkDeviceAttachment) Attachment() IVZNetworkDeviceAttachment
The object that defines how the virtual network device communicates with the host system.
See: https://developer.apple.com/documentation/virtualization/vznetworkdeviceconfiguration/attachment
func (VZFileHandleNetworkDeviceAttachment) Autorelease ¶
func (f VZFileHandleNetworkDeviceAttachment) Autorelease() VZFileHandleNetworkDeviceAttachment
Autorelease adds the receiver to the current autorelease pool.
func (VZFileHandleNetworkDeviceAttachment) FileHandle ¶
func (f VZFileHandleNetworkDeviceAttachment) FileHandle() foundation.NSFileHandle
The file handle assigned to this attachment.
func (VZFileHandleNetworkDeviceAttachment) InitWithFileHandle ¶
func (f VZFileHandleNetworkDeviceAttachment) InitWithFileHandle(fileHandle foundation.NSFileHandle) VZFileHandleNetworkDeviceAttachment
Creates the attachment from a file handle that contains a connected datagram socket.
fileHandle: A file handle to a connected datagram socket.
Return Value ¶
An attachment object for the specified file handle.
func (VZFileHandleNetworkDeviceAttachment) MaximumTransmissionUnit ¶
func (f VZFileHandleNetworkDeviceAttachment) MaximumTransmissionUnit() int
An integer value that indicates the maximum transmission unit (MTU) associated with this attachment.
Discussion ¶
The client side of the associated datagram socket must be properly configured with the appropriate values for `SO_SNDBUF`, and `SO_RCVBUF`. Set these using the `setsockopt(_:_:_:_:_:)` system call. The system expects the value of `SO_RCVBUF` to be at least double the value of `SO_SNDBUF`, and for optimal performance, the recommended value of `SO_RCVBUF` is four times the value of `SO_SNDBUF`.
The default MTU is 1500. The maximum MTU allowed is 65535, and the minimum MTU allowed is 1500. An invalid MTU value results in an invalid virtual machine configuration.
func (VZFileHandleNetworkDeviceAttachment) NetworkDevices ¶
func (f VZFileHandleNetworkDeviceAttachment) NetworkDevices() IVZNetworkDeviceConfiguration
The array of network devices that you expose to the guest operating system.
func (VZFileHandleNetworkDeviceAttachment) SetAttachment ¶
func (f VZFileHandleNetworkDeviceAttachment) SetAttachment(value IVZNetworkDeviceAttachment)
func (VZFileHandleNetworkDeviceAttachment) SetMaximumTransmissionUnit ¶
func (f VZFileHandleNetworkDeviceAttachment) SetMaximumTransmissionUnit(value int)
func (VZFileHandleNetworkDeviceAttachment) SetNetworkDevices ¶
func (f VZFileHandleNetworkDeviceAttachment) SetNetworkDevices(value IVZNetworkDeviceConfiguration)
type VZFileHandleNetworkDeviceAttachmentClass ¶
type VZFileHandleNetworkDeviceAttachmentClass struct {
// contains filtered or unexported fields
}
func GetVZFileHandleNetworkDeviceAttachmentClass ¶
func GetVZFileHandleNetworkDeviceAttachmentClass() VZFileHandleNetworkDeviceAttachmentClass
GetVZFileHandleNetworkDeviceAttachmentClass returns the class object for VZFileHandleNetworkDeviceAttachment.
func (VZFileHandleNetworkDeviceAttachmentClass) Alloc ¶
func (vc VZFileHandleNetworkDeviceAttachmentClass) Alloc() VZFileHandleNetworkDeviceAttachment
Alloc allocates memory for a new instance of the class.
type VZFileHandleSerialPortAttachment ¶
type VZFileHandleSerialPortAttachment struct {
VZSerialPortAttachment
}
An attachment point that allows bidirectional communication using file handles.
Overview ¶
Use a VZFileHandleSerialPortAttachment object to configure a serial port using separate file handles for reading and writing data. In your virtual machine, use the file handles in this object in the following way:
- To send data to the guest operating system, write data to the file handle in the VZFileHandleSerialPortAttachment.FileHandleForReading property. - To receive data from the guest operating system, read data from the file handle in the VZFileHandleSerialPortAttachment.FileHandleForWriting property.
Creating the attachment point ¶
- VZFileHandleSerialPortAttachment.InitWithFileHandleForReadingFileHandleForWriting: Creates a serial port attachment object from the specified file handles.
Getting the file handles ¶
- VZFileHandleSerialPortAttachment.FileHandleForReading: The file handle that the guest operating system uses to read data.
- VZFileHandleSerialPortAttachment.FileHandleForWriting: The file handle that the guest operating system uses to write data.
See: https://developer.apple.com/documentation/Virtualization/VZFileHandleSerialPortAttachment
func NewFileHandleSerialPortAttachmentWithFileHandleForReadingFileHandleForWriting ¶
func NewFileHandleSerialPortAttachmentWithFileHandleForReadingFileHandleForWriting(fileHandleForReading foundation.NSFileHandle, fileHandleForWriting foundation.NSFileHandle) VZFileHandleSerialPortAttachment
Creates a serial port attachment object from the specified file handles.
fileHandleForReading: The file handle that the guest operating system uses to read data. Your virtual machine writes data to this file handle. If the file descriptor for the file handle is invalid, this method raises an exception.
fileHandleForWriting: The file handle to which the guest operating system writes data. Your virtual machine reads data from this file handle. If its file descriptor for the file handle is invalid, this method raises an exception.
Return Value ¶
A serial port attachment object.
func NewVZFileHandleSerialPortAttachment ¶
func NewVZFileHandleSerialPortAttachment() VZFileHandleSerialPortAttachment
NewVZFileHandleSerialPortAttachment creates a new VZFileHandleSerialPortAttachment instance.
func VZFileHandleSerialPortAttachmentFromID ¶
func VZFileHandleSerialPortAttachmentFromID(id objc.ID) VZFileHandleSerialPortAttachment
VZFileHandleSerialPortAttachmentFromID constructs a VZFileHandleSerialPortAttachment from an objc.ID.
An attachment point that allows bidirectional communication using file handles.
func (VZFileHandleSerialPortAttachment) Autorelease ¶
func (f VZFileHandleSerialPortAttachment) Autorelease() VZFileHandleSerialPortAttachment
Autorelease adds the receiver to the current autorelease pool.
func (VZFileHandleSerialPortAttachment) FileHandleForReading ¶
func (f VZFileHandleSerialPortAttachment) FileHandleForReading() foundation.NSFileHandle
The file handle that the guest operating system uses to read data.
Discussion ¶
When you want to send data to the guest operating system, write data to the file handle in this property.
func (VZFileHandleSerialPortAttachment) FileHandleForWriting ¶
func (f VZFileHandleSerialPortAttachment) FileHandleForWriting() foundation.NSFileHandle
The file handle that the guest operating system uses to write data.
Discussion ¶
When you want to receive data from the guest operating system, read data from the file handle in this property.
func (VZFileHandleSerialPortAttachment) Init ¶
func (f VZFileHandleSerialPortAttachment) Init() VZFileHandleSerialPortAttachment
Init initializes the instance.
func (VZFileHandleSerialPortAttachment) InitWithFileHandleForReadingFileHandleForWriting ¶
func (f VZFileHandleSerialPortAttachment) InitWithFileHandleForReadingFileHandleForWriting(fileHandleForReading foundation.NSFileHandle, fileHandleForWriting foundation.NSFileHandle) VZFileHandleSerialPortAttachment
Creates a serial port attachment object from the specified file handles.
fileHandleForReading: The file handle that the guest operating system uses to read data. Your virtual machine writes data to this file handle. If the file descriptor for the file handle is invalid, this method raises an exception.
fileHandleForWriting: The file handle to which the guest operating system writes data. Your virtual machine reads data from this file handle. If its file descriptor for the file handle is invalid, this method raises an exception.
Return Value ¶
A serial port attachment object.
type VZFileHandleSerialPortAttachmentClass ¶
type VZFileHandleSerialPortAttachmentClass struct {
// contains filtered or unexported fields
}
func GetVZFileHandleSerialPortAttachmentClass ¶
func GetVZFileHandleSerialPortAttachmentClass() VZFileHandleSerialPortAttachmentClass
GetVZFileHandleSerialPortAttachmentClass returns the class object for VZFileHandleSerialPortAttachment.
func (VZFileHandleSerialPortAttachmentClass) Alloc ¶
func (vc VZFileHandleSerialPortAttachmentClass) Alloc() VZFileHandleSerialPortAttachment
Alloc allocates memory for a new instance of the class.
type VZFileSerialPortAttachment ¶
type VZFileSerialPortAttachment struct {
VZSerialPortAttachment
}
An attachment point that writes data from the guest system to a file.
Overview ¶
Use a VZFileSerialPortAttachment object to configure a one-way serial port from the guest operating system to the virtual machine. When the guest sends data to the serial port, the virtual machine writes that data to the specified file. You can’t use this serial port to send data back to the guest.
Create a VZSerialPortAttachment object and assign it to an appropriate subclass of VZSerialPortConfiguration object, such as VZVirtioConsoleDeviceConfiguration. The file you use to create this object must be writable.
Creating the attachment point ¶
- VZFileSerialPortAttachment.InitWithURLAppendError: Creates a file-based serial port attachment object.
Getting the file details ¶
- VZFileSerialPortAttachment.URL: The URL of a file on the local file system.
- VZFileSerialPortAttachment.Append: A Boolean that indicates whether the virtual machine appends data to the file.
See: https://developer.apple.com/documentation/Virtualization/VZFileSerialPortAttachment
func NewFileSerialPortAttachmentWithURLAppendError ¶
func NewFileSerialPortAttachmentWithURLAppendError(url foundation.INSURL, shouldAppend bool) (VZFileSerialPortAttachment, error)
Creates a file-based serial port attachment object.
url: The URL of a file on the local file system. The specified file must be writable by the virtual machine.
shouldAppend: A Boolean that indicates whether the virtual machine opens the file in append mode. Specify [true] to append data to the file, and specify [false] to replace the contents of the file with any new data. // [false]: https://developer.apple.com/documentation/Swift/false [true]: https://developer.apple.com/documentation/Swift/true
Return Value ¶
A file-based serial port attachment on success, or `nil` if initialization failed.
func NewVZFileSerialPortAttachment ¶
func NewVZFileSerialPortAttachment() VZFileSerialPortAttachment
NewVZFileSerialPortAttachment creates a new VZFileSerialPortAttachment instance.
func VZFileSerialPortAttachmentFromID ¶
func VZFileSerialPortAttachmentFromID(id objc.ID) VZFileSerialPortAttachment
VZFileSerialPortAttachmentFromID constructs a VZFileSerialPortAttachment from an objc.ID.
An attachment point that writes data from the guest system to a file.
func (VZFileSerialPortAttachment) Append ¶
func (f VZFileSerialPortAttachment) Append() bool
A Boolean that indicates whether the virtual machine appends data to the file.
Discussion ¶
When the value of this property is true, the virtual machine appends new data to the file; otherwise, it replaces the existing contents of the file before writing new data to it.
See: https://developer.apple.com/documentation/Virtualization/VZFileSerialPortAttachment/append
func (VZFileSerialPortAttachment) Autorelease ¶
func (f VZFileSerialPortAttachment) Autorelease() VZFileSerialPortAttachment
Autorelease adds the receiver to the current autorelease pool.
func (VZFileSerialPortAttachment) Init ¶
func (f VZFileSerialPortAttachment) Init() VZFileSerialPortAttachment
Init initializes the instance.
func (VZFileSerialPortAttachment) InitWithURLAppendError ¶
func (f VZFileSerialPortAttachment) InitWithURLAppendError(url foundation.INSURL, shouldAppend bool) (VZFileSerialPortAttachment, error)
Creates a file-based serial port attachment object.
url: The URL of a file on the local file system. The specified file must be writable by the virtual machine.
shouldAppend: A Boolean that indicates whether the virtual machine opens the file in append mode. Specify [true] to append data to the file, and specify [false] to replace the contents of the file with any new data. // [false]: https://developer.apple.com/documentation/Swift/false [true]: https://developer.apple.com/documentation/Swift/true
Return Value ¶
A file-based serial port attachment on success, or `nil` if initialization failed.
func (VZFileSerialPortAttachment) URL ¶
func (f VZFileSerialPortAttachment) URL() foundation.INSURL
The URL of a file on the local file system.
See: https://developer.apple.com/documentation/Virtualization/VZFileSerialPortAttachment/url
type VZFileSerialPortAttachmentClass ¶
type VZFileSerialPortAttachmentClass struct {
// contains filtered or unexported fields
}
func GetVZFileSerialPortAttachmentClass ¶
func GetVZFileSerialPortAttachmentClass() VZFileSerialPortAttachmentClass
GetVZFileSerialPortAttachmentClass returns the class object for VZFileSerialPortAttachment.
func (VZFileSerialPortAttachmentClass) Alloc ¶
func (vc VZFileSerialPortAttachmentClass) Alloc() VZFileSerialPortAttachment
Alloc allocates memory for a new instance of the class.
type VZGenericMachineIdentifier ¶
type VZGenericMachineIdentifier struct {
objectivec.Object
}
An object that represents a unique identifier for a virtual machine.
Overview ¶
Use the data representation in VZGenericMachineIdentifier.DataRepresentation to save the VM’s identifier. To restore a previously saved identifier use VZGenericMachineIdentifier.InitWithDataRepresentation.
Creating a Machine Identifier ¶
- VZGenericMachineIdentifier.InitWithDataRepresentation: Creates a new unique identifier for a VM with the provided data.
Getting Information About the Machine Identifier ¶
- VZGenericMachineIdentifier.DataRepresentation: An opaque data representation of the VM’s identifier.
See: https://developer.apple.com/documentation/Virtualization/VZGenericMachineIdentifier
func NewGenericMachineIdentifierWithDataRepresentation ¶
func NewGenericMachineIdentifierWithDataRepresentation(dataRepresentation foundation.INSData) VZGenericMachineIdentifier
Creates a new unique identifier for a VM with the provided data.
dataRepresentation: A data object that describes the machine identifier.
func NewVZGenericMachineIdentifier ¶
func NewVZGenericMachineIdentifier() VZGenericMachineIdentifier
NewVZGenericMachineIdentifier creates a new VZGenericMachineIdentifier instance.
func VZGenericMachineIdentifierFromID ¶
func VZGenericMachineIdentifierFromID(id objc.ID) VZGenericMachineIdentifier
VZGenericMachineIdentifierFromID constructs a VZGenericMachineIdentifier from an objc.ID.
An object that represents a unique identifier for a virtual machine.
func (VZGenericMachineIdentifier) Autorelease ¶
func (g VZGenericMachineIdentifier) Autorelease() VZGenericMachineIdentifier
Autorelease adds the receiver to the current autorelease pool.
func (VZGenericMachineIdentifier) DataRepresentation ¶
func (g VZGenericMachineIdentifier) DataRepresentation() foundation.INSData
An opaque data representation of the VM’s identifier.
func (VZGenericMachineIdentifier) Init ¶
func (g VZGenericMachineIdentifier) Init() VZGenericMachineIdentifier
Init initializes the instance.
func (VZGenericMachineIdentifier) InitWithDataRepresentation ¶
func (g VZGenericMachineIdentifier) InitWithDataRepresentation(dataRepresentation foundation.INSData) VZGenericMachineIdentifier
Creates a new unique identifier for a VM with the provided data.
dataRepresentation: A data object that describes the machine identifier.
func (VZGenericMachineIdentifier) IsNestedVirtualizationEnabled ¶
func (g VZGenericMachineIdentifier) IsNestedVirtualizationEnabled() bool
A Boolean value that indicates whether nested virtualization is in an enabled state.
func (VZGenericMachineIdentifier) MachineIdentifier ¶
func (g VZGenericMachineIdentifier) MachineIdentifier() IVZGenericMachineIdentifier
A value that represents a unique identifier for the virtual machine.
func (VZGenericMachineIdentifier) SetIsNestedVirtualizationEnabled ¶
func (g VZGenericMachineIdentifier) SetIsNestedVirtualizationEnabled(value bool)
func (VZGenericMachineIdentifier) SetMachineIdentifier ¶
func (g VZGenericMachineIdentifier) SetMachineIdentifier(value IVZGenericMachineIdentifier)
type VZGenericMachineIdentifierClass ¶
type VZGenericMachineIdentifierClass struct {
// contains filtered or unexported fields
}
func GetVZGenericMachineIdentifierClass ¶
func GetVZGenericMachineIdentifierClass() VZGenericMachineIdentifierClass
GetVZGenericMachineIdentifierClass returns the class object for VZGenericMachineIdentifier.
func (VZGenericMachineIdentifierClass) Alloc ¶
func (vc VZGenericMachineIdentifierClass) Alloc() VZGenericMachineIdentifier
Alloc allocates memory for a new instance of the class.
func (VZGenericMachineIdentifierClass) IsNestedVirtualizationSupported ¶
func (_VZGenericMachineIdentifierClass VZGenericMachineIdentifierClass) IsNestedVirtualizationSupported() bool
A Boolean value that describes whether the platform configuration supports nested virtualization.
func (VZGenericMachineIdentifierClass) SetIsNestedVirtualizationSupported ¶
func (_VZGenericMachineIdentifierClass VZGenericMachineIdentifierClass) SetIsNestedVirtualizationSupported(value bool)
type VZGenericPlatformConfiguration ¶
type VZGenericPlatformConfiguration struct {
VZPlatformConfiguration
}
The platform configuration for a generic Intel or ARM virtual machine.
Identifying the platform configuration ¶
- VZGenericPlatformConfiguration.MachineIdentifier: A value that represents a unique identifier for the virtual machine.
- VZGenericPlatformConfiguration.SetMachineIdentifier
- VZGenericPlatformConfiguration.NestedVirtualizationEnabled: A Boolean value that indicates whether nested virtualization is in an enabled state.
- VZGenericPlatformConfiguration.SetNestedVirtualizationEnabled
See: https://developer.apple.com/documentation/Virtualization/VZGenericPlatformConfiguration
func NewVZGenericPlatformConfiguration ¶
func NewVZGenericPlatformConfiguration() VZGenericPlatformConfiguration
NewVZGenericPlatformConfiguration creates a new VZGenericPlatformConfiguration instance.
func VZGenericPlatformConfigurationFromID ¶
func VZGenericPlatformConfigurationFromID(id objc.ID) VZGenericPlatformConfiguration
VZGenericPlatformConfigurationFromID constructs a VZGenericPlatformConfiguration from an objc.ID.
The platform configuration for a generic Intel or ARM virtual machine.
func (VZGenericPlatformConfiguration) Autorelease ¶
func (g VZGenericPlatformConfiguration) Autorelease() VZGenericPlatformConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZGenericPlatformConfiguration) Init ¶
func (g VZGenericPlatformConfiguration) Init() VZGenericPlatformConfiguration
Init initializes the instance.
func (VZGenericPlatformConfiguration) MachineIdentifier ¶
func (g VZGenericPlatformConfiguration) MachineIdentifier() IVZGenericMachineIdentifier
A value that represents a unique identifier for the virtual machine.
func (VZGenericPlatformConfiguration) NestedVirtualizationEnabled ¶
func (g VZGenericPlatformConfiguration) NestedVirtualizationEnabled() bool
A Boolean value that indicates whether nested virtualization is in an enabled state.
func (VZGenericPlatformConfiguration) SetMachineIdentifier ¶
func (g VZGenericPlatformConfiguration) SetMachineIdentifier(value IVZGenericMachineIdentifier)
func (VZGenericPlatformConfiguration) SetNestedVirtualizationEnabled ¶
func (g VZGenericPlatformConfiguration) SetNestedVirtualizationEnabled(value bool)
type VZGenericPlatformConfigurationClass ¶
type VZGenericPlatformConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZGenericPlatformConfigurationClass ¶
func GetVZGenericPlatformConfigurationClass() VZGenericPlatformConfigurationClass
GetVZGenericPlatformConfigurationClass returns the class object for VZGenericPlatformConfiguration.
func (VZGenericPlatformConfigurationClass) Alloc ¶
func (vc VZGenericPlatformConfigurationClass) Alloc() VZGenericPlatformConfiguration
Alloc allocates memory for a new instance of the class.
func (VZGenericPlatformConfigurationClass) NestedVirtualizationSupported ¶
func (_VZGenericPlatformConfigurationClass VZGenericPlatformConfigurationClass) NestedVirtualizationSupported() bool
A Boolean value that describes whether the platform configuration supports nested virtualization.
Discussion ¶
Use this property to check whether support is available for the platform. As the following example shows, if the framework supports nested virtualization on the host, use [NestedVirtualizationEnabled] to enable the feature:
type VZGraphicsDevice ¶
type VZGraphicsDevice struct {
objectivec.Object
}
A class that represents a graphics device in a VM.
Overview ¶
You don’t instantiate a VZGraphicsDevice directly. Graphics devices are first configured on the VZVirtualMachineConfiguration through a subclass of VZGraphicsDeviceConfiguration.
When the framework creates a VZVirtualMachine from the configuration, the graphics devices are available through the VZGraphicsDevice.GraphicsDevices property.
The real type of VZGraphicsDevice corresponds to the type used by the configuration.
For example, a VZVirtioGraphicsDeviceConfiguration leads to a device of type VZVirtioGraphicsDevice and a VZMacGraphicsDeviceConfiguration leads to a device of type VZMacGraphicsDevice.
Getting the device’s displays ¶
- VZGraphicsDevice.Displays: The list of graphics displays configured for this graphics device.
See: https://developer.apple.com/documentation/Virtualization/VZGraphicsDevice
func NewVZGraphicsDevice ¶
func NewVZGraphicsDevice() VZGraphicsDevice
NewVZGraphicsDevice creates a new VZGraphicsDevice instance.
func VZGraphicsDeviceFromID ¶
func VZGraphicsDeviceFromID(id objc.ID) VZGraphicsDevice
VZGraphicsDeviceFromID constructs a VZGraphicsDevice from an objc.ID.
A class that represents a graphics device in a VM.
func (VZGraphicsDevice) Autorelease ¶
func (g VZGraphicsDevice) Autorelease() VZGraphicsDevice
Autorelease adds the receiver to the current autorelease pool.
func (VZGraphicsDevice) Displays ¶
func (g VZGraphicsDevice) Displays() []VZGraphicsDisplay
The list of graphics displays configured for this graphics device.
Discussion ¶
This is a list of the graphics displays configured on the graphics device configuration.
See: https://developer.apple.com/documentation/Virtualization/VZGraphicsDevice/displays
func (VZGraphicsDevice) GraphicsDevices ¶
func (g VZGraphicsDevice) GraphicsDevices() IVZGraphicsDevice
The list of configured graphics devices on the virtual machine.
See: https://developer.apple.com/documentation/virtualization/vzvirtualmachine/graphicsdevices
func (VZGraphicsDevice) Init ¶
func (g VZGraphicsDevice) Init() VZGraphicsDevice
Init initializes the instance.
func (VZGraphicsDevice) SetGraphicsDevices ¶
func (g VZGraphicsDevice) SetGraphicsDevices(value IVZGraphicsDevice)
type VZGraphicsDeviceClass ¶
type VZGraphicsDeviceClass struct {
// contains filtered or unexported fields
}
func GetVZGraphicsDeviceClass ¶
func GetVZGraphicsDeviceClass() VZGraphicsDeviceClass
GetVZGraphicsDeviceClass returns the class object for VZGraphicsDevice.
func (VZGraphicsDeviceClass) Alloc ¶
func (vc VZGraphicsDeviceClass) Alloc() VZGraphicsDevice
Alloc allocates memory for a new instance of the class.
type VZGraphicsDeviceConfiguration ¶
type VZGraphicsDeviceConfiguration struct {
objectivec.Object
}
The base class for a graphics device configuration.
See: https://developer.apple.com/documentation/Virtualization/VZGraphicsDeviceConfiguration
func NewVZGraphicsDeviceConfiguration ¶
func NewVZGraphicsDeviceConfiguration() VZGraphicsDeviceConfiguration
NewVZGraphicsDeviceConfiguration creates a new VZGraphicsDeviceConfiguration instance.
func VZGraphicsDeviceConfigurationFromID ¶
func VZGraphicsDeviceConfigurationFromID(id objc.ID) VZGraphicsDeviceConfiguration
VZGraphicsDeviceConfigurationFromID constructs a VZGraphicsDeviceConfiguration from an objc.ID.
The base class for a graphics device configuration.
func (VZGraphicsDeviceConfiguration) Autorelease ¶
func (g VZGraphicsDeviceConfiguration) Autorelease() VZGraphicsDeviceConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZGraphicsDeviceConfiguration) Init ¶
func (g VZGraphicsDeviceConfiguration) Init() VZGraphicsDeviceConfiguration
Init initializes the instance.
type VZGraphicsDeviceConfigurationClass ¶
type VZGraphicsDeviceConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZGraphicsDeviceConfigurationClass ¶
func GetVZGraphicsDeviceConfigurationClass() VZGraphicsDeviceConfigurationClass
GetVZGraphicsDeviceConfigurationClass returns the class object for VZGraphicsDeviceConfiguration.
func (VZGraphicsDeviceConfigurationClass) Alloc ¶
func (vc VZGraphicsDeviceConfigurationClass) Alloc() VZGraphicsDeviceConfiguration
Alloc allocates memory for a new instance of the class.
type VZGraphicsDisplay ¶
type VZGraphicsDisplay struct {
objectivec.Object
}
A class that represents a graphics display in a VM.
Overview ¶
Don’t instantiate a VZGraphicsDisplay directly. Graphics displays are first configured on a VZGraphicsDeviceConfiguration subclass. When you create a VZVirtualMachine from the configuration, the displays are available through the VZGraphicsDisplay.Displays property of the configuration’s VZGraphicsDevice.
Getting the display size ¶
- VZGraphicsDisplay.SizeInPixels: Returns the size of the display, in pixels.
Observing changes to the display configuration ¶
- VZGraphicsDisplay.AddObserver: Adds an observer to notify about display configuration changes.
- VZGraphicsDisplay.RemoveObserver: Removes a display configuration change observer.
Changing the display configuration ¶
- VZGraphicsDisplay.ReconfigureWithSizeInPixelsError: Resize this display with the new dimensions you provide.
- VZGraphicsDisplay.ReconfigureWithConfigurationError: Reconfigure this display with the new display configuration you provide.
See: https://developer.apple.com/documentation/Virtualization/VZGraphicsDisplay
func NewVZGraphicsDisplay ¶
func NewVZGraphicsDisplay() VZGraphicsDisplay
NewVZGraphicsDisplay creates a new VZGraphicsDisplay instance.
func VZGraphicsDisplayFromID ¶
func VZGraphicsDisplayFromID(id objc.ID) VZGraphicsDisplay
VZGraphicsDisplayFromID constructs a VZGraphicsDisplay from an objc.ID.
A class that represents a graphics display in a VM.
func (VZGraphicsDisplay) AddObserver ¶
func (g VZGraphicsDisplay) AddObserver(observer VZGraphicsDisplayObserver)
Adds an observer to notify about display configuration changes.
observer: The new observer the framework notifies about display configuration changes.
See: https://developer.apple.com/documentation/Virtualization/VZGraphicsDisplay/addObserver(_:)
func (VZGraphicsDisplay) Autorelease ¶
func (g VZGraphicsDisplay) Autorelease() VZGraphicsDisplay
Autorelease adds the receiver to the current autorelease pool.
func (VZGraphicsDisplay) Displays ¶
func (g VZGraphicsDisplay) Displays() IVZGraphicsDisplay
The list of graphics displays configured for this graphics device.
See: https://developer.apple.com/documentation/virtualization/vzgraphicsdevice/displays
func (VZGraphicsDisplay) Init ¶
func (g VZGraphicsDisplay) Init() VZGraphicsDisplay
Init initializes the instance.
func (VZGraphicsDisplay) ReconfigureWithConfigurationError ¶
func (g VZGraphicsDisplay) ReconfigureWithConfigurationError(configuration IVZGraphicsDisplayConfiguration) (bool, error)
Reconfigure this display with the new display configuration you provide.
configuration: The new VZGraphicsDisplayConfiguration configuration.
Discussion ¶
If successful, the framework passes the new configuration to the guest, but the guest may or may not respond to parts of the configuration. If the guest doesn’t use the new configuration, the Virtualization framework doesn’t return an error.
Reconfiguration of the display triggers a display state change that you can track by adopting the VZGraphicsDisplayObserver protocol.
func (VZGraphicsDisplay) ReconfigureWithSizeInPixelsError ¶
func (g VZGraphicsDisplay) ReconfigureWithSizeInPixelsError(sizeInPixels corefoundation.CGSize) (bool, error)
Resize this display with the new dimensions you provide.
sizeInPixels: The new display width and height in pixels.
Discussion ¶
If successful, the framework passes the new size to the guest but the guest may or may not respond to the new size. If the guest doesn’t use the new size, the Virtualization framework doesn’t return an error.
Resizing the display triggers a display state change that you can track by adopting the VZGraphicsDisplayObserver protocol.
func (VZGraphicsDisplay) RemoveObserver ¶
func (g VZGraphicsDisplay) RemoveObserver(observer VZGraphicsDisplayObserver)
Removes a display configuration change observer.
observer: The observer to remove from notifications about display configuration changes.
See: https://developer.apple.com/documentation/Virtualization/VZGraphicsDisplay/removeObserver(_:)
func (VZGraphicsDisplay) SetDisplays ¶
func (g VZGraphicsDisplay) SetDisplays(value IVZGraphicsDisplay)
func (VZGraphicsDisplay) SizeInPixels ¶
func (g VZGraphicsDisplay) SizeInPixels() corefoundation.CGSize
Returns the size of the display, in pixels.
See: https://developer.apple.com/documentation/Virtualization/VZGraphicsDisplay/sizeInPixels
type VZGraphicsDisplayClass ¶
type VZGraphicsDisplayClass struct {
// contains filtered or unexported fields
}
func GetVZGraphicsDisplayClass ¶
func GetVZGraphicsDisplayClass() VZGraphicsDisplayClass
GetVZGraphicsDisplayClass returns the class object for VZGraphicsDisplay.
func (VZGraphicsDisplayClass) Alloc ¶
func (vc VZGraphicsDisplayClass) Alloc() VZGraphicsDisplay
Alloc allocates memory for a new instance of the class.
type VZGraphicsDisplayConfiguration ¶
type VZGraphicsDisplayConfiguration struct {
objectivec.Object
}
The base class for a graphics display configuration.
Overview ¶
Don’t instantiate VZGraphicsDisplayConfiguration directly. Use one of its subclasses instead.
See: https://developer.apple.com/documentation/Virtualization/VZGraphicsDisplayConfiguration
func NewVZGraphicsDisplayConfiguration ¶
func NewVZGraphicsDisplayConfiguration() VZGraphicsDisplayConfiguration
NewVZGraphicsDisplayConfiguration creates a new VZGraphicsDisplayConfiguration instance.
func VZGraphicsDisplayConfigurationFromID ¶
func VZGraphicsDisplayConfigurationFromID(id objc.ID) VZGraphicsDisplayConfiguration
VZGraphicsDisplayConfigurationFromID constructs a VZGraphicsDisplayConfiguration from an objc.ID.
The base class for a graphics display configuration.
func (VZGraphicsDisplayConfiguration) Autorelease ¶
func (g VZGraphicsDisplayConfiguration) Autorelease() VZGraphicsDisplayConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZGraphicsDisplayConfiguration) Init ¶
func (g VZGraphicsDisplayConfiguration) Init() VZGraphicsDisplayConfiguration
Init initializes the instance.
type VZGraphicsDisplayConfigurationClass ¶
type VZGraphicsDisplayConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZGraphicsDisplayConfigurationClass ¶
func GetVZGraphicsDisplayConfigurationClass() VZGraphicsDisplayConfigurationClass
GetVZGraphicsDisplayConfigurationClass returns the class object for VZGraphicsDisplayConfiguration.
func (VZGraphicsDisplayConfigurationClass) Alloc ¶
func (vc VZGraphicsDisplayConfigurationClass) Alloc() VZGraphicsDisplayConfiguration
Alloc allocates memory for a new instance of the class.
type VZGraphicsDisplayObserver ¶
type VZGraphicsDisplayObserver interface {
objectivec.IObject
}
A protocol you implement to observe state changes in graphic displays.
See: https://developer.apple.com/documentation/Virtualization/VZGraphicsDisplayObserver
type VZGraphicsDisplayObserverObject ¶
type VZGraphicsDisplayObserverObject struct {
objectivec.Object
}
VZGraphicsDisplayObserverObject wraps an existing Objective-C object that conforms to the VZGraphicsDisplayObserver protocol.
func VZGraphicsDisplayObserverObjectFromID ¶
func VZGraphicsDisplayObserverObjectFromID(id objc.ID) VZGraphicsDisplayObserverObject
VZGraphicsDisplayObserverObjectFromID constructs a VZGraphicsDisplayObserverObject from an objc.ID. The object is determined to conform to the protocol at runtime.
func (VZGraphicsDisplayObserverObject) BaseObject ¶
func (o VZGraphicsDisplayObserverObject) BaseObject() objectivec.Object
func (VZGraphicsDisplayObserverObject) DisplayDidBeginReconfiguration ¶
func (o VZGraphicsDisplayObserverObject) DisplayDidBeginReconfiguration(display IVZGraphicsDisplay)
The method the framework calls when the reconfiguration operation has begun.
display: The VZGraphicsDisplay whose state is changing.
Discussion ¶
The framework issued a configuration change, such as a resize, and you can expect new frames with a new size or configuration.
The framework invokes this method on the VM’s queue.
func (VZGraphicsDisplayObserverObject) DisplayDidEndReconfiguration ¶
func (o VZGraphicsDisplayObserverObject) DisplayDidEndReconfiguration(display IVZGraphicsDisplay)
The method the framework calls when the reconfiguration operation ends.
display: The VZGraphicsDisplay whose state is changing.
Discussion ¶
Frame updates have arrived at the most recently requested display size and configuration.
The framework invokes this method on the VM’s queue.
type VZHostAudioInputStreamSource ¶
type VZHostAudioInputStreamSource struct {
VZAudioInputStreamSource
}
The host audio input stream source that provides audio from the host system’s default input device.
Overview ¶
The host input data comes from the same device that AudioQueueNewInput(_:_:_:_:_:_:_:) uses.
See: https://developer.apple.com/documentation/Virtualization/VZHostAudioInputStreamSource
func NewVZHostAudioInputStreamSource ¶
func NewVZHostAudioInputStreamSource() VZHostAudioInputStreamSource
NewVZHostAudioInputStreamSource creates a new VZHostAudioInputStreamSource instance.
func VZHostAudioInputStreamSourceFromID ¶
func VZHostAudioInputStreamSourceFromID(id objc.ID) VZHostAudioInputStreamSource
VZHostAudioInputStreamSourceFromID constructs a VZHostAudioInputStreamSource from an objc.ID.
The host audio input stream source that provides audio from the host system’s default input device.
func (VZHostAudioInputStreamSource) Autorelease ¶
func (h VZHostAudioInputStreamSource) Autorelease() VZHostAudioInputStreamSource
Autorelease adds the receiver to the current autorelease pool.
func (VZHostAudioInputStreamSource) Init ¶
func (h VZHostAudioInputStreamSource) Init() VZHostAudioInputStreamSource
Init initializes the instance.
type VZHostAudioInputStreamSourceClass ¶
type VZHostAudioInputStreamSourceClass struct {
// contains filtered or unexported fields
}
func GetVZHostAudioInputStreamSourceClass ¶
func GetVZHostAudioInputStreamSourceClass() VZHostAudioInputStreamSourceClass
GetVZHostAudioInputStreamSourceClass returns the class object for VZHostAudioInputStreamSource.
func (VZHostAudioInputStreamSourceClass) Alloc ¶
func (vc VZHostAudioInputStreamSourceClass) Alloc() VZHostAudioInputStreamSource
Alloc allocates memory for a new instance of the class.
type VZHostAudioOutputStreamSink ¶
type VZHostAudioOutputStreamSink struct {
VZAudioOutputStreamSink
}
Host audio output stream sink plays audio to the host system’s default output device.
Overview ¶
Host output data goes to the same device that AudioQueueNewOutput(_:_:_:_:_:_:_:) uses.
See: https://developer.apple.com/documentation/Virtualization/VZHostAudioOutputStreamSink
func NewVZHostAudioOutputStreamSink ¶
func NewVZHostAudioOutputStreamSink() VZHostAudioOutputStreamSink
NewVZHostAudioOutputStreamSink creates a new VZHostAudioOutputStreamSink instance.
func VZHostAudioOutputStreamSinkFromID ¶
func VZHostAudioOutputStreamSinkFromID(id objc.ID) VZHostAudioOutputStreamSink
VZHostAudioOutputStreamSinkFromID constructs a VZHostAudioOutputStreamSink from an objc.ID.
Host audio output stream sink plays audio to the host system’s default output device.
func (VZHostAudioOutputStreamSink) Autorelease ¶
func (h VZHostAudioOutputStreamSink) Autorelease() VZHostAudioOutputStreamSink
Autorelease adds the receiver to the current autorelease pool.
func (VZHostAudioOutputStreamSink) Init ¶
func (h VZHostAudioOutputStreamSink) Init() VZHostAudioOutputStreamSink
Init initializes the instance.
type VZHostAudioOutputStreamSinkClass ¶
type VZHostAudioOutputStreamSinkClass struct {
// contains filtered or unexported fields
}
func GetVZHostAudioOutputStreamSinkClass ¶
func GetVZHostAudioOutputStreamSinkClass() VZHostAudioOutputStreamSinkClass
GetVZHostAudioOutputStreamSinkClass returns the class object for VZHostAudioOutputStreamSink.
func (VZHostAudioOutputStreamSinkClass) Alloc ¶
func (vc VZHostAudioOutputStreamSinkClass) Alloc() VZHostAudioOutputStreamSink
Alloc allocates memory for a new instance of the class.
type VZKeyboardConfiguration ¶
type VZKeyboardConfiguration struct {
objectivec.Object
}
The base class for a configuring a keyboard.
Overview ¶
VZKeyboardConfiguration defines the abstract interface that defines a virtual keyboard that you connect to a guest operating system. Don’t instantiate VZKeyboardConfiguration directly, use one of its subclasses such as VZUSBKeyboardConfiguration instead.
See: https://developer.apple.com/documentation/Virtualization/VZKeyboardConfiguration
func NewVZKeyboardConfiguration ¶
func NewVZKeyboardConfiguration() VZKeyboardConfiguration
NewVZKeyboardConfiguration creates a new VZKeyboardConfiguration instance.
func VZKeyboardConfigurationFromID ¶
func VZKeyboardConfigurationFromID(id objc.ID) VZKeyboardConfiguration
VZKeyboardConfigurationFromID constructs a VZKeyboardConfiguration from an objc.ID.
The base class for a configuring a keyboard.
func (VZKeyboardConfiguration) Autorelease ¶
func (k VZKeyboardConfiguration) Autorelease() VZKeyboardConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZKeyboardConfiguration) Init ¶
func (k VZKeyboardConfiguration) Init() VZKeyboardConfiguration
Init initializes the instance.
type VZKeyboardConfigurationClass ¶
type VZKeyboardConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZKeyboardConfigurationClass ¶
func GetVZKeyboardConfigurationClass() VZKeyboardConfigurationClass
GetVZKeyboardConfigurationClass returns the class object for VZKeyboardConfiguration.
func (VZKeyboardConfigurationClass) Alloc ¶
func (vc VZKeyboardConfigurationClass) Alloc() VZKeyboardConfiguration
Alloc allocates memory for a new instance of the class.
type VZLinuxBootLoader ¶
type VZLinuxBootLoader struct {
VZBootLoader
}
An object that loads and configures a Linux kernel as the guest system of your VM.
Overview ¶
Create and configure a VZLinuxBootLoader object during the initial configuration of your VM. Use this object to specify the location of the Linux kernel that serves as the guest operating system. You can also specify additional information to use during the boot process, such as command-line parameters to pass to the kernel. Assign the VZLinuxBootLoader object to the [BootLoader] property of your VZVirtualMachineConfiguration object. A configuration with VZLinuxBootLoader is only valid if used with VZGenericPlatformConfiguration.
Creating the Linux boot loader ¶
- VZLinuxBootLoader.InitWithKernelURL: Creates a boot loader that launches the Linux kernel at the specified URL.
Configuring the boot parameters ¶
- VZLinuxBootLoader.CommandLine: The command-line parameters to pass to the Linux kernel at boot time.
- VZLinuxBootLoader.SetCommandLine
- VZLinuxBootLoader.InitialRamdiskURL: The location of an optional RAM disk, which the boot loader maps into memory before it boots the Linux kernel.
- VZLinuxBootLoader.SetInitialRamdiskURL
Getting the kernel file ¶
- VZLinuxBootLoader.KernelURL: The URL of the Linux kernel file.
- VZLinuxBootLoader.SetKernelURL
See: https://developer.apple.com/documentation/Virtualization/VZLinuxBootLoader
func NewLinuxBootLoaderWithKernelURL ¶
func NewLinuxBootLoaderWithKernelURL(kernelURL foundation.INSURL) VZLinuxBootLoader
Creates a boot loader that launches the Linux kernel at the specified URL.
kernelURL: The location of a Linux kernel on the local file system.
Return Value ¶
A boot loader object for the specified Linux kernel.
See: https://developer.apple.com/documentation/Virtualization/VZLinuxBootLoader/init(kernelURL:)
func NewVZLinuxBootLoader ¶
func NewVZLinuxBootLoader() VZLinuxBootLoader
NewVZLinuxBootLoader creates a new VZLinuxBootLoader instance.
func VZLinuxBootLoaderFromID ¶
func VZLinuxBootLoaderFromID(id objc.ID) VZLinuxBootLoader
VZLinuxBootLoaderFromID constructs a VZLinuxBootLoader from an objc.ID.
An object that loads and configures a Linux kernel as the guest system of your VM.
func (VZLinuxBootLoader) Autorelease ¶
func (l VZLinuxBootLoader) Autorelease() VZLinuxBootLoader
Autorelease adds the receiver to the current autorelease pool.
func (VZLinuxBootLoader) BootLoader ¶
func (l VZLinuxBootLoader) BootLoader() IVZBootLoader
The guest system to boot when the VM starts.
See: https://developer.apple.com/documentation/virtualization/vzvirtualmachineconfiguration/bootloader
func (VZLinuxBootLoader) CommandLine ¶
func (l VZLinuxBootLoader) CommandLine() string
The command-line parameters to pass to the Linux kernel at boot time.
Discussion ¶
For information about the parameters you can pass to a Linux kernel, see “The kernel’s command-line parameters”.
See: https://developer.apple.com/documentation/Virtualization/VZLinuxBootLoader/commandLine
func (VZLinuxBootLoader) Init ¶
func (l VZLinuxBootLoader) Init() VZLinuxBootLoader
Init initializes the instance.
func (VZLinuxBootLoader) InitWithKernelURL ¶
func (l VZLinuxBootLoader) InitWithKernelURL(kernelURL foundation.INSURL) VZLinuxBootLoader
Creates a boot loader that launches the Linux kernel at the specified URL.
kernelURL: The location of a Linux kernel on the local file system.
Return Value ¶
A boot loader object for the specified Linux kernel.
See: https://developer.apple.com/documentation/Virtualization/VZLinuxBootLoader/init(kernelURL:)
func (VZLinuxBootLoader) InitialRamdiskURL ¶
func (l VZLinuxBootLoader) InitialRamdiskURL() foundation.INSURL
The location of an optional RAM disk, which the boot loader maps into memory before it boots the Linux kernel.
Discussion ¶
The default value of this property is `nil`. If you want specific files to be available when your Linux kernel boots, provide a URL to a valid RAM disk file in this property.
See: https://developer.apple.com/documentation/Virtualization/VZLinuxBootLoader/initialRamdiskURL
func (VZLinuxBootLoader) KernelURL ¶
func (l VZLinuxBootLoader) KernelURL() foundation.INSURL
The URL of the Linux kernel file.
See: https://developer.apple.com/documentation/Virtualization/VZLinuxBootLoader/kernelURL
func (VZLinuxBootLoader) SetBootLoader ¶
func (l VZLinuxBootLoader) SetBootLoader(value IVZBootLoader)
func (VZLinuxBootLoader) SetCommandLine ¶
func (l VZLinuxBootLoader) SetCommandLine(value string)
func (VZLinuxBootLoader) SetInitialRamdiskURL ¶
func (l VZLinuxBootLoader) SetInitialRamdiskURL(value foundation.INSURL)
func (VZLinuxBootLoader) SetKernelURL ¶
func (l VZLinuxBootLoader) SetKernelURL(value foundation.INSURL)
type VZLinuxBootLoaderClass ¶
type VZLinuxBootLoaderClass struct {
// contains filtered or unexported fields
}
func GetVZLinuxBootLoaderClass ¶
func GetVZLinuxBootLoaderClass() VZLinuxBootLoaderClass
GetVZLinuxBootLoaderClass returns the class object for VZLinuxBootLoader.
func (VZLinuxBootLoaderClass) Alloc ¶
func (vc VZLinuxBootLoaderClass) Alloc() VZLinuxBootLoader
Alloc allocates memory for a new instance of the class.
type VZLinuxRosettaAbstractSocketCachingOptions ¶
type VZLinuxRosettaAbstractSocketCachingOptions struct {
VZLinuxRosettaCachingOptions
}
Caching options for an abstract socket.
Overview ¶
Use this object to configure Rosetta to communicate with the Rosetta daemon using an abstract socket.
Initalizers ¶
- VZLinuxRosettaAbstractSocketCachingOptions.InitWithNameError: Initialize options to set on a Rosetta directory share.
Accessing the socket name ¶
- VZLinuxRosettaAbstractSocketCachingOptions.Name: The name of the abstract socket that Rosetta uses.
See: https://developer.apple.com/documentation/Virtualization/VZLinuxRosettaAbstractSocketCachingOptions
func NewLinuxRosettaAbstractSocketCachingOptionsWithNameError ¶
func NewLinuxRosettaAbstractSocketCachingOptionsWithNameError(name string) (VZLinuxRosettaAbstractSocketCachingOptions, error)
Initialize options to set on a Rosetta directory share.
name: This is the name of the abstract socket that Rosetta uses.
error: If not `nil`, assigned with the error if the initialization fails.
Discussion ¶
The `sockaddr_un` structure in Linux defines the maximum allowed length of `name`.
func NewVZLinuxRosettaAbstractSocketCachingOptions ¶
func NewVZLinuxRosettaAbstractSocketCachingOptions() VZLinuxRosettaAbstractSocketCachingOptions
NewVZLinuxRosettaAbstractSocketCachingOptions creates a new VZLinuxRosettaAbstractSocketCachingOptions instance.
func VZLinuxRosettaAbstractSocketCachingOptionsFromID ¶
func VZLinuxRosettaAbstractSocketCachingOptionsFromID(id objc.ID) VZLinuxRosettaAbstractSocketCachingOptions
VZLinuxRosettaAbstractSocketCachingOptionsFromID constructs a VZLinuxRosettaAbstractSocketCachingOptions from an objc.ID.
Caching options for an abstract socket.
func (VZLinuxRosettaAbstractSocketCachingOptions) Autorelease ¶
func (l VZLinuxRosettaAbstractSocketCachingOptions) Autorelease() VZLinuxRosettaAbstractSocketCachingOptions
Autorelease adds the receiver to the current autorelease pool.
func (VZLinuxRosettaAbstractSocketCachingOptions) Init ¶
func (l VZLinuxRosettaAbstractSocketCachingOptions) Init() VZLinuxRosettaAbstractSocketCachingOptions
Init initializes the instance.
func (VZLinuxRosettaAbstractSocketCachingOptions) InitWithNameError ¶
func (l VZLinuxRosettaAbstractSocketCachingOptions) InitWithNameError(name string) (VZLinuxRosettaAbstractSocketCachingOptions, error)
Initialize options to set on a Rosetta directory share.
name: This is the name of the abstract socket that Rosetta uses.
error: If not `nil`, assigned with the error if the initialization fails.
Discussion ¶
The `sockaddr_un` structure in Linux defines the maximum allowed length of `name`.
func (VZLinuxRosettaAbstractSocketCachingOptions) Name ¶
func (l VZLinuxRosettaAbstractSocketCachingOptions) Name() string
The name of the abstract socket that Rosetta uses.
type VZLinuxRosettaAbstractSocketCachingOptionsClass ¶
type VZLinuxRosettaAbstractSocketCachingOptionsClass struct {
// contains filtered or unexported fields
}
func GetVZLinuxRosettaAbstractSocketCachingOptionsClass ¶
func GetVZLinuxRosettaAbstractSocketCachingOptionsClass() VZLinuxRosettaAbstractSocketCachingOptionsClass
GetVZLinuxRosettaAbstractSocketCachingOptionsClass returns the class object for VZLinuxRosettaAbstractSocketCachingOptions.
func (VZLinuxRosettaAbstractSocketCachingOptionsClass) Alloc ¶
func (vc VZLinuxRosettaAbstractSocketCachingOptionsClass) Alloc() VZLinuxRosettaAbstractSocketCachingOptions
Alloc allocates memory for a new instance of the class.
func (VZLinuxRosettaAbstractSocketCachingOptionsClass) MaximumNameLength ¶
func (_VZLinuxRosettaAbstractSocketCachingOptionsClass VZLinuxRosettaAbstractSocketCachingOptionsClass) MaximumNameLength() uint
The maximum length of name that the framework allows.
Discussion ¶
The `sockaddr_un` structure in Linux defines the maximum length for the path [Name].
type VZLinuxRosettaAvailability ¶
type VZLinuxRosettaAvailability int
See: https://developer.apple.com/documentation/Virtualization/VZLinuxRosettaAvailability
const ( // VZLinuxRosettaAvailabilityInstalled: Rosetta is available on the host system. VZLinuxRosettaAvailabilityInstalled VZLinuxRosettaAvailability = 2 // VZLinuxRosettaAvailabilityNotInstalled: Rosetta isn’t installed. VZLinuxRosettaAvailabilityNotInstalled VZLinuxRosettaAvailability = 1 // VZLinuxRosettaAvailabilityNotSupported: The current hardware or software configuration doesn’t support Rosetta. VZLinuxRosettaAvailabilityNotSupported VZLinuxRosettaAvailability = 0 )
func (VZLinuxRosettaAvailability) String ¶
func (e VZLinuxRosettaAvailability) String() string
type VZLinuxRosettaCachingOptions ¶
type VZLinuxRosettaCachingOptions struct {
objectivec.Object
}
An abstract class that defines UNIX socket-based caching options for Rosetta.
Overview ¶
VZLinuxRosettaCachingOptions define the communication mechanism between the Rosetta daemon and the Rosetta runtime.
Don’t instantiate VZLinuxRosettaCachingOptions directly. Use one of its subclasses, such as VZLinuxRosettaUnixSocketCachingOptions or VZLinuxRosettaAbstractSocketCachingOptions instead.
See: https://developer.apple.com/documentation/Virtualization/VZLinuxRosettaCachingOptions
func NewVZLinuxRosettaCachingOptions ¶
func NewVZLinuxRosettaCachingOptions() VZLinuxRosettaCachingOptions
NewVZLinuxRosettaCachingOptions creates a new VZLinuxRosettaCachingOptions instance.
func VZLinuxRosettaCachingOptionsFromID ¶
func VZLinuxRosettaCachingOptionsFromID(id objc.ID) VZLinuxRosettaCachingOptions
VZLinuxRosettaCachingOptionsFromID constructs a VZLinuxRosettaCachingOptions from an objc.ID.
An abstract class that defines UNIX socket-based caching options for Rosetta.
func (VZLinuxRosettaCachingOptions) Autorelease ¶
func (l VZLinuxRosettaCachingOptions) Autorelease() VZLinuxRosettaCachingOptions
Autorelease adds the receiver to the current autorelease pool.
func (VZLinuxRosettaCachingOptions) Init ¶
func (l VZLinuxRosettaCachingOptions) Init() VZLinuxRosettaCachingOptions
Init initializes the instance.
type VZLinuxRosettaCachingOptionsClass ¶
type VZLinuxRosettaCachingOptionsClass struct {
// contains filtered or unexported fields
}
func GetVZLinuxRosettaCachingOptionsClass ¶
func GetVZLinuxRosettaCachingOptionsClass() VZLinuxRosettaCachingOptionsClass
GetVZLinuxRosettaCachingOptionsClass returns the class object for VZLinuxRosettaCachingOptions.
func (VZLinuxRosettaCachingOptionsClass) Alloc ¶
func (vc VZLinuxRosettaCachingOptionsClass) Alloc() VZLinuxRosettaCachingOptions
Alloc allocates memory for a new instance of the class.
type VZLinuxRosettaDirectoryShare ¶
type VZLinuxRosettaDirectoryShare struct {
}
The Linux directory share for Rosetta.
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.
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.
Creating a Rosetta directory share ¶
- VZLinuxRosettaDirectoryShare.InitWithError: Creates a new Rosetta directory share, or returns an error if Rosetta isn’t installed.
Setting the ahead of time (AOT) caching options ¶
- VZLinuxRosettaDirectoryShare.CachingOptions: The value that enables translation caching and configures the socket communication type for Rosetta.
- VZLinuxRosettaDirectoryShare.SetCachingOptions
See: https://developer.apple.com/documentation/Virtualization/VZLinuxRosettaDirectoryShare
func NewLinuxRosettaDirectoryShareWithError ¶
func NewLinuxRosettaDirectoryShareWithError() (VZLinuxRosettaDirectoryShare, error)
Creates a new Rosetta directory share, or returns an error if Rosetta isn’t installed.
Discussion ¶
Check the status of Rosetta by examining the [Availability] class property before creating a new Rosetta directory share to ensure the capability is both supported and available on host Mac. For complete instructions on installing Rosetta see Running Intel Binaries in Linux VMs with Rosetta.
See: https://developer.apple.com/documentation/Virtualization/VZLinuxRosettaDirectoryShare/init()
func NewVZLinuxRosettaDirectoryShare ¶
func NewVZLinuxRosettaDirectoryShare() VZLinuxRosettaDirectoryShare
NewVZLinuxRosettaDirectoryShare creates a new VZLinuxRosettaDirectoryShare instance.
func VZLinuxRosettaDirectoryShareFromID ¶
func VZLinuxRosettaDirectoryShareFromID(id objc.ID) VZLinuxRosettaDirectoryShare
VZLinuxRosettaDirectoryShareFromID constructs a VZLinuxRosettaDirectoryShare from an objc.ID.
The Linux directory share for Rosetta.
func (VZLinuxRosettaDirectoryShare) Autorelease ¶
func (l VZLinuxRosettaDirectoryShare) Autorelease() VZLinuxRosettaDirectoryShare
Autorelease adds the receiver to the current autorelease pool.
func (VZLinuxRosettaDirectoryShare) CachingOptions ¶
func (l VZLinuxRosettaDirectoryShare) CachingOptions() uint
The value that enables translation caching and configures the socket communication type for Rosetta.
func (VZLinuxRosettaDirectoryShare) Init ¶
func (l VZLinuxRosettaDirectoryShare) Init() VZLinuxRosettaDirectoryShare
Init initializes the instance.
func (VZLinuxRosettaDirectoryShare) InitWithError ¶
func (l VZLinuxRosettaDirectoryShare) InitWithError() (VZLinuxRosettaDirectoryShare, error)
Creates a new Rosetta directory share, or returns an error if Rosetta isn’t installed.
Discussion ¶
Check the status of Rosetta by examining the [Availability] class property before creating a new Rosetta directory share to ensure the capability is both supported and available on host Mac. For complete instructions on installing Rosetta see Running Intel Binaries in Linux VMs with Rosetta.
See: https://developer.apple.com/documentation/Virtualization/VZLinuxRosettaDirectoryShare/init()
func (VZLinuxRosettaDirectoryShare) Options ¶
func (l VZLinuxRosettaDirectoryShare) Options() IVZLinuxRosettaCachingOptions
The value that enables translation caching and configures the socket communication type for Rosetta.
See: https://developer.apple.com/documentation/Virtualization/VZLinuxRosettaDirectoryShare/options
func (VZLinuxRosettaDirectoryShare) SetCachingOptions ¶
func (l VZLinuxRosettaDirectoryShare) SetCachingOptions(value uint)
func (VZLinuxRosettaDirectoryShare) SetOptions ¶
func (l VZLinuxRosettaDirectoryShare) SetOptions(value IVZLinuxRosettaCachingOptions)
type VZLinuxRosettaDirectoryShareClass ¶
type VZLinuxRosettaDirectoryShareClass struct {
// contains filtered or unexported fields
}
func GetVZLinuxRosettaDirectoryShareClass ¶
func GetVZLinuxRosettaDirectoryShareClass() VZLinuxRosettaDirectoryShareClass
GetVZLinuxRosettaDirectoryShareClass returns the class object for VZLinuxRosettaDirectoryShare.
func (VZLinuxRosettaDirectoryShareClass) Alloc ¶
func (vc VZLinuxRosettaDirectoryShareClass) Alloc() VZLinuxRosettaDirectoryShare
Alloc allocates memory for a new instance of the class.
func (VZLinuxRosettaDirectoryShareClass) Availability ¶
func (_VZLinuxRosettaDirectoryShareClass VZLinuxRosettaDirectoryShareClass) Availability() VZLinuxRosettaAvailability
A value that indicates the current state of Rosetta’s availability.
Discussion ¶
The value is one of the possible VZLinuxRosettaAvailability values.
See: https://developer.apple.com/documentation/Virtualization/VZLinuxRosettaDirectoryShare/availability
func (VZLinuxRosettaDirectoryShareClass) InstallRosetta ¶
func (lc VZLinuxRosettaDirectoryShareClass) InstallRosetta(ctx context.Context) error
InstallRosetta is a synchronous wrapper around [VZLinuxRosettaDirectoryShare.InstallRosettaWithCompletionHandler]. It blocks until the completion handler fires or the context is cancelled.
func (VZLinuxRosettaDirectoryShareClass) InstallRosettaWithCompletionHandler ¶
func (_VZLinuxRosettaDirectoryShareClass VZLinuxRosettaDirectoryShareClass) InstallRosettaWithCompletionHandler(completionHandler ErrorHandler)
Starts the installation of Rosetta.
completionHandler: The completion handler the framework invokes after the request finishes processing.
Discussion ¶
The completion handler returns an error object that contains information about a problem, or `nil` if the installation completed successfully.
type VZLinuxRosettaUnixSocketCachingOptions ¶
type VZLinuxRosettaUnixSocketCachingOptions struct {
VZLinuxRosettaCachingOptions
}
An object that represents caching options for a UNIX domain socket.
Overview ¶
This object configures Rosetta to communicate with the Rosetta daemon using a UNIX domain socket.
Initializers ¶
- VZLinuxRosettaUnixSocketCachingOptions.InitWithPathError: Creates a new Rosetta caching options object for a UNIX domain socket with the path you specify.
Accessing the socket path ¶
- VZLinuxRosettaUnixSocketCachingOptions.Path: The path to the UNIX domain socket that Rosetta uses.
See: https://developer.apple.com/documentation/Virtualization/VZLinuxRosettaUnixSocketCachingOptions
func NewLinuxRosettaUnixSocketCachingOptionsWithPathError ¶
func NewLinuxRosettaUnixSocketCachingOptionsWithPathError(path string) (VZLinuxRosettaUnixSocketCachingOptions, error)
Creates a new Rosetta caching options object for a UNIX domain socket with the path you specify.
path: The path of the UNIX Domain Socket that Rosetta uses.
error: If not `nil`, assigned with the error if the initialization fails.
Discussion ¶
You can optionally configure Rosetta to use cached translations from the Rosetta translation daemon communicating through a UNIX domain socket.
If `path` length exceeds [MaximumPathLength] in UTF-8 bytes, the framework returns `nil` and sets the `error` value, if available.
func NewVZLinuxRosettaUnixSocketCachingOptions ¶
func NewVZLinuxRosettaUnixSocketCachingOptions() VZLinuxRosettaUnixSocketCachingOptions
NewVZLinuxRosettaUnixSocketCachingOptions creates a new VZLinuxRosettaUnixSocketCachingOptions instance.
func VZLinuxRosettaUnixSocketCachingOptionsFromID ¶
func VZLinuxRosettaUnixSocketCachingOptionsFromID(id objc.ID) VZLinuxRosettaUnixSocketCachingOptions
VZLinuxRosettaUnixSocketCachingOptionsFromID constructs a VZLinuxRosettaUnixSocketCachingOptions from an objc.ID.
An object that represents caching options for a UNIX domain socket.
func (VZLinuxRosettaUnixSocketCachingOptions) Autorelease ¶
func (l VZLinuxRosettaUnixSocketCachingOptions) Autorelease() VZLinuxRosettaUnixSocketCachingOptions
Autorelease adds the receiver to the current autorelease pool.
func (VZLinuxRosettaUnixSocketCachingOptions) InitWithPathError ¶
func (l VZLinuxRosettaUnixSocketCachingOptions) InitWithPathError(path string) (VZLinuxRosettaUnixSocketCachingOptions, error)
Creates a new Rosetta caching options object for a UNIX domain socket with the path you specify.
path: The path of the UNIX Domain Socket that Rosetta uses.
error: If not `nil`, assigned with the error if the initialization fails.
Discussion ¶
You can optionally configure Rosetta to use cached translations from the Rosetta translation daemon communicating through a UNIX domain socket.
If `path` length exceeds [MaximumPathLength] in UTF-8 bytes, the framework returns `nil` and sets the `error` value, if available.
func (VZLinuxRosettaUnixSocketCachingOptions) Path ¶
func (l VZLinuxRosettaUnixSocketCachingOptions) Path() string
The path to the UNIX domain socket that Rosetta uses.
See: https://developer.apple.com/documentation/Virtualization/VZLinuxRosettaUnixSocketCachingOptions/path
type VZLinuxRosettaUnixSocketCachingOptionsClass ¶
type VZLinuxRosettaUnixSocketCachingOptionsClass struct {
// contains filtered or unexported fields
}
func GetVZLinuxRosettaUnixSocketCachingOptionsClass ¶
func GetVZLinuxRosettaUnixSocketCachingOptionsClass() VZLinuxRosettaUnixSocketCachingOptionsClass
GetVZLinuxRosettaUnixSocketCachingOptionsClass returns the class object for VZLinuxRosettaUnixSocketCachingOptions.
func (VZLinuxRosettaUnixSocketCachingOptionsClass) Alloc ¶
func (vc VZLinuxRosettaUnixSocketCachingOptionsClass) Alloc() VZLinuxRosettaUnixSocketCachingOptions
Alloc allocates memory for a new instance of the class.
func (VZLinuxRosettaUnixSocketCachingOptionsClass) MaximumPathLength ¶
func (_VZLinuxRosettaUnixSocketCachingOptionsClass VZLinuxRosettaUnixSocketCachingOptionsClass) MaximumPathLength() uint
The maximum allowed length of the path to the UNIX domain socket.
Discussion ¶
The `sockaddr_un` structure in Linux defines the maximum length for this path.
type VZMACAddress ¶
type VZMACAddress struct {
objectivec.Object
}
The media access control (MAC) address for a network interface in your virtual machine.
Overview ¶
A VZMACAddress object contains the hardware address of your network interface. Every network device has a unique 48-bit MAC address that the system uses to route network packets to that device.
Call the [VZMACAddress.RandomLocallyAdministeredAddress] method to get a local MAC address suitable for use with your network interfaces. Alternatively, you can create a VZMACAddress object yourself from a string or `ether_addr_t` structure.
Creating a MAC address ¶
- VZMACAddress.InitWithString: Creates a MAC address object from a specially formatted string.
- VZMACAddress.InitWithEthernetAddress: Creates a MAC address from the specified 48-bit Ethernet address.
Getting the address ¶
- VZMACAddress.String: The MAC address as a formatted string.
- VZMACAddress.EthernetAddress: The MAC address as an Ethernet data structure.
Getting address attributes ¶
- VZMACAddress.IsBroadcastAddress: A Boolean value that indicates whether the address is a broadcast address.
- VZMACAddress.IsMulticastAddress: A Boolean value that indicates whether the address is a multicast address.
- VZMACAddress.IsUnicastAddress: A Boolean value that indicates whether the address is a unicast address.
- VZMACAddress.IsLocallyAdministeredAddress: A Boolean value that indicates whether the address is a locally administered address (LAA).
- VZMACAddress.IsUniversallyAdministeredAddress: A Boolean value that indicates whether the address is a universally adminstered address (UAA).
See: https://developer.apple.com/documentation/Virtualization/VZMACAddress
func NewMACAddressWithEthernetAddress ¶
func NewMACAddressWithEthernetAddress(ethernetAddress unsafe.Pointer) VZMACAddress
Creates a MAC address from the specified 48-bit Ethernet address.
ethernetAddress: A 48-bit Ethernet address.
Return Value ¶
A MAC address object with the specified Ethernet address.
See: https://developer.apple.com/documentation/Virtualization/VZMACAddress/init(ethernetAddress:)
func NewMACAddressWithString ¶
func NewMACAddressWithString(string_ string) VZMACAddress
Creates a MAC address object from a specially formatted string.
string: A string that contains the 6 hexadecimal bytes of the MAC address separated by colon characters. An example string is `01:23:45:ef`. The string is case-insensitive, so you may use uppercase or lowercase for alphabetical characters.
Return Value ¶
A MAC address object with the specified value, or `nil` if the string is formatted incorrectly.
See: https://developer.apple.com/documentation/Virtualization/VZMACAddress/init(string:)
func NewVZMACAddress ¶
func NewVZMACAddress() VZMACAddress
NewVZMACAddress creates a new VZMACAddress instance.
func VZMACAddressFromID ¶
func VZMACAddressFromID(id objc.ID) VZMACAddress
VZMACAddressFromID constructs a VZMACAddress from an objc.ID.
The media access control (MAC) address for a network interface in your virtual machine.
func (VZMACAddress) Autorelease ¶
func (m VZMACAddress) Autorelease() VZMACAddress
Autorelease adds the receiver to the current autorelease pool.
func (VZMACAddress) EthernetAddress ¶
func (m VZMACAddress) EthernetAddress() [6]byte
The MAC address as an Ethernet data structure.
Discussion ¶
Use this property to obtain the individual octets of the Ethernet address. For more information, see `ether_addr_t`.
See: https://developer.apple.com/documentation/Virtualization/VZMACAddress/ethernetAddress
func (VZMACAddress) InitWithEthernetAddress ¶
func (m VZMACAddress) InitWithEthernetAddress(ethernetAddress unsafe.Pointer) VZMACAddress
Creates a MAC address from the specified 48-bit Ethernet address.
ethernetAddress: A 48-bit Ethernet address.
Return Value ¶
A MAC address object with the specified Ethernet address.
See: https://developer.apple.com/documentation/Virtualization/VZMACAddress/init(ethernetAddress:)
func (VZMACAddress) InitWithString ¶
func (m VZMACAddress) InitWithString(string_ string) VZMACAddress
Creates a MAC address object from a specially formatted string.
string: A string that contains the 6 hexadecimal bytes of the MAC address separated by colon characters. An example string is `01:23:45:ef`. The string is case-insensitive, so you may use uppercase or lowercase for alphabetical characters.
Return Value ¶
A MAC address object with the specified value, or `nil` if the string is formatted incorrectly.
See: https://developer.apple.com/documentation/Virtualization/VZMACAddress/init(string:)
func (VZMACAddress) IsBroadcastAddress ¶
func (m VZMACAddress) IsBroadcastAddress() bool
A Boolean value that indicates whether the address is a broadcast address.
Discussion ¶
The value of this property is true if the address is a broadcast address, or false if it isn’t.
See: https://developer.apple.com/documentation/Virtualization/VZMACAddress/isBroadcastAddress
func (VZMACAddress) IsLocallyAdministeredAddress ¶
func (m VZMACAddress) IsLocallyAdministeredAddress() bool
A Boolean value that indicates whether the address is a locally administered address (LAA).
Discussion ¶
The value of this property is true if the address is locally administered, or false if it isn’t. A locally administered address different than the address burned in to the physical network interface.
See: https://developer.apple.com/documentation/Virtualization/VZMACAddress/isLocallyAdministeredAddress
func (VZMACAddress) IsMulticastAddress ¶
func (m VZMACAddress) IsMulticastAddress() bool
A Boolean value that indicates whether the address is a multicast address.
Discussion ¶
The value of this property is true if the address is a multicast address, or false if it isn’t.
See: https://developer.apple.com/documentation/Virtualization/VZMACAddress/isMulticastAddress
func (VZMACAddress) IsUnicastAddress ¶
func (m VZMACAddress) IsUnicastAddress() bool
A Boolean value that indicates whether the address is a unicast address.
Discussion ¶
The value of this property is true if the address is a unicast address, or false if it isn’t.
See: https://developer.apple.com/documentation/Virtualization/VZMACAddress/isUnicastAddress
func (VZMACAddress) IsUniversallyAdministeredAddress ¶
func (m VZMACAddress) IsUniversallyAdministeredAddress() bool
A Boolean value that indicates whether the address is a universally adminstered address (UAA).
Discussion ¶
The value of this property is true if the address is universally administered, or false if it isn’t. The manufacturer of a device assigns an address of this type, and the address includes the organization’s unique identification code.
func (VZMACAddress) String ¶
func (m VZMACAddress) String() string
The MAC address as a formatted string.
Discussion ¶
The string contains the 6 hexadecimal bytes of the MAC address, separated by colon characters. Alphabetical characters are lowercase in the string. An example string is `01:23:45:ef`.
See: https://developer.apple.com/documentation/Virtualization/VZMACAddress/string
type VZMACAddressClass ¶
type VZMACAddressClass struct {
// contains filtered or unexported fields
}
func GetVZMACAddressClass ¶
func GetVZMACAddressClass() VZMACAddressClass
GetVZMACAddressClass returns the class object for VZMACAddress.
func (VZMACAddressClass) Alloc ¶
func (vc VZMACAddressClass) Alloc() VZMACAddress
Alloc allocates memory for a new instance of the class.
func (VZMACAddressClass) RandomLocallyAdministeredAddress ¶
func (_VZMACAddressClass VZMACAddressClass) RandomLocallyAdministeredAddress() VZMACAddress
Returns a valid, random, locally administered, unicast MAC address.
Return Value ¶
A MAC address suitable for use in your network devices.
Discussion ¶
This method doesn’t guarantee the generation of a unique MAC address.
See: https://developer.apple.com/documentation/Virtualization/VZMACAddress/randomLocallyAdministered()
type VZMacAuxiliaryStorage ¶
type VZMacAuxiliaryStorage struct {
objectivec.Object
}
An object that contains information the boot loader needs for booting macOS as a guest operating system.
Overview ¶
The Mac auxiliary storage contains data used by the boot loader and the guest operating system. It’s necessary to boot a macOS guest OS.
When creating a new VM, use VZMacAuxiliaryStorage.InitCreatingStorageAtURLHardwareModelOptionsError to create a default initialized auxiliary storage.
The hardware model you use when creating the new auxiliary storage depends on the restore image that you’ll use for installation. From the restore image, use VZMacAuxiliaryStorage.MostFeaturefulSupportedConfiguration to get a supported configuration. A configuration has a VZMacHardwareModel associated with it.
After initializing the new auxiliary storage, set it on VZMacPlatformConfiguration.VZMacAuxiliaryStorage.AuxiliaryStorage.
The hardware model in VZMacPlatformConfiguration.VZMacAuxiliaryStorage.HardwareModel must be identical to the one used to create the empty auxiliary storage., otherwise the behavior isn’t defined.
When installing macOS, the VZMacOSInstaller lays out data on the auxiliary storage. After installation, the macOS guest uses the auxiliary storage for every subsequent boot.
When moving or performing a backup of a VM, you must move or copy the file containing the auxiliary storage along with the main disk image.
To boot a VM created with VZMacOSInstaller, use init(contentsOfURL:) to set up the auxiliary storage from the existing file used during installation.
When using an existing file, the hardware model of the VZMacPlatformConfiguration.VZMacAuxiliaryStorage.HardwareModel must match the hardware model used when creating the original file.
Creating the auxiliary storage ¶
- VZMacAuxiliaryStorage.InitWithURL: Initializes an auxiliary storage object with data from the location at the URL you provide.
- VZMacAuxiliaryStorage.InitCreatingStorageAtURLHardwareModelOptionsError: Creates an initialized Mac auxiliary storage instance that describes a specific hardware model at a URL you specify.
Configuring the auxiliary storage location ¶
- VZMacAuxiliaryStorage.URL: The URL of the auxiliary storage on the local file system.
See: https://developer.apple.com/documentation/Virtualization/VZMacAuxiliaryStorage
func NewMacAuxiliaryStorageCreatingStorageAtURLHardwareModelOptionsError ¶
func NewMacAuxiliaryStorageCreatingStorageAtURLHardwareModelOptionsError(URL foundation.INSURL, hardwareModel IVZMacHardwareModel, options VZMacAuxiliaryStorageInitializationOptions) (VZMacAuxiliaryStorage, error)
Creates an initialized Mac auxiliary storage instance that describes a specific hardware model at a URL you specify.
URL: The [URL] to write the auxiliary storage to on the local file system.
hardwareModel: The VZMacHardwareModel model to use. The auxiliary storage can have different layouts for different hardware models.
options: Initialization options from the available [VZMacAuxiliaryStorage.InitializationOptions]. // [VZMacAuxiliaryStorage.InitializationOptions]: https://developer.apple.com/documentation/Virtualization/VZMacAuxiliaryStorage/InitializationOptions
Return Value ¶
Returns a newly initialized VZMacAuxiliaryStorage object on success or `nil` if there was an error. On failure, `error` contains the [NSError] that describes reason for the failure.
Discussion ¶
Use this method to create a new auxiliary storage object that describes a specific hardware model. To restore data from a previously saved existing auxiliary storage object, use init(contentsOfURL:).
func NewMacAuxiliaryStorageWithContentsOfURL ¶
func NewMacAuxiliaryStorageWithContentsOfURL(URL foundation.INSURL) VZMacAuxiliaryStorage
See: https://developer.apple.com/documentation/Virtualization/VZMacAuxiliaryStorage/init(contentsOf:)
func NewMacAuxiliaryStorageWithURL ¶
func NewMacAuxiliaryStorageWithURL(URL foundation.INSURL) VZMacAuxiliaryStorage
Initializes an auxiliary storage object with data from the location at the URL you provide.
URL: The URL of the auxiliary storage on the local file system.
See: https://developer.apple.com/documentation/Virtualization/VZMacAuxiliaryStorage/init(url:)
func NewVZMacAuxiliaryStorage ¶
func NewVZMacAuxiliaryStorage() VZMacAuxiliaryStorage
NewVZMacAuxiliaryStorage creates a new VZMacAuxiliaryStorage instance.
func VZMacAuxiliaryStorageFromID ¶
func VZMacAuxiliaryStorageFromID(id objc.ID) VZMacAuxiliaryStorage
VZMacAuxiliaryStorageFromID constructs a VZMacAuxiliaryStorage from an objc.ID.
An object that contains information the boot loader needs for booting macOS as a guest operating system.
func (VZMacAuxiliaryStorage) Autorelease ¶
func (m VZMacAuxiliaryStorage) Autorelease() VZMacAuxiliaryStorage
Autorelease adds the receiver to the current autorelease pool.
func (VZMacAuxiliaryStorage) AuxiliaryStorage ¶
func (m VZMacAuxiliaryStorage) AuxiliaryStorage() IVZMacAuxiliaryStorage
The Mac auxiliary storage.
See: https://developer.apple.com/documentation/virtualization/vzmacplatformconfiguration/auxiliarystorage
func (VZMacAuxiliaryStorage) HardwareModel ¶
func (m VZMacAuxiliaryStorage) HardwareModel() IVZMacHardwareModel
The Mac hardware model.
See: https://developer.apple.com/documentation/virtualization/vzmacplatformconfiguration/hardwaremodel
func (VZMacAuxiliaryStorage) Init ¶
func (m VZMacAuxiliaryStorage) Init() VZMacAuxiliaryStorage
Init initializes the instance.
func (VZMacAuxiliaryStorage) InitCreatingStorageAtURLHardwareModelOptionsError ¶
func (m VZMacAuxiliaryStorage) InitCreatingStorageAtURLHardwareModelOptionsError(URL foundation.INSURL, hardwareModel IVZMacHardwareModel, options VZMacAuxiliaryStorageInitializationOptions) (VZMacAuxiliaryStorage, error)
Creates an initialized Mac auxiliary storage instance that describes a specific hardware model at a URL you specify.
URL: The [URL] to write the auxiliary storage to on the local file system.
hardwareModel: The VZMacHardwareModel model to use. The auxiliary storage can have different layouts for different hardware models.
options: Initialization options from the available [VZMacAuxiliaryStorage.InitializationOptions]. // [VZMacAuxiliaryStorage.InitializationOptions]: https://developer.apple.com/documentation/Virtualization/VZMacAuxiliaryStorage/InitializationOptions
Return Value ¶
Returns a newly initialized VZMacAuxiliaryStorage object on success or `nil` if there was an error. On failure, `error` contains the [NSError] that describes reason for the failure.
Discussion ¶
Use this method to create a new auxiliary storage object that describes a specific hardware model. To restore data from a previously saved existing auxiliary storage object, use init(contentsOfURL:).
func (VZMacAuxiliaryStorage) InitWithURL ¶
func (m VZMacAuxiliaryStorage) InitWithURL(URL foundation.INSURL) VZMacAuxiliaryStorage
Initializes an auxiliary storage object with data from the location at the URL you provide.
URL: The URL of the auxiliary storage on the local file system.
See: https://developer.apple.com/documentation/Virtualization/VZMacAuxiliaryStorage/init(url:)
func (VZMacAuxiliaryStorage) MostFeaturefulSupportedConfiguration ¶
func (m VZMacAuxiliaryStorage) MostFeaturefulSupportedConfiguration() IVZMacOSConfigurationRequirements
This object represents the most fully featured configuration that’s supported by both the current host and by this restore image.
func (VZMacAuxiliaryStorage) SetAuxiliaryStorage ¶
func (m VZMacAuxiliaryStorage) SetAuxiliaryStorage(value IVZMacAuxiliaryStorage)
func (VZMacAuxiliaryStorage) SetHardwareModel ¶
func (m VZMacAuxiliaryStorage) SetHardwareModel(value IVZMacHardwareModel)
func (VZMacAuxiliaryStorage) SetMostFeaturefulSupportedConfiguration ¶
func (m VZMacAuxiliaryStorage) SetMostFeaturefulSupportedConfiguration(value IVZMacOSConfigurationRequirements)
func (VZMacAuxiliaryStorage) URL ¶
func (m VZMacAuxiliaryStorage) URL() foundation.INSURL
The URL of the auxiliary storage on the local file system.
See: https://developer.apple.com/documentation/Virtualization/VZMacAuxiliaryStorage/url
type VZMacAuxiliaryStorageClass ¶
type VZMacAuxiliaryStorageClass struct {
// contains filtered or unexported fields
}
func GetVZMacAuxiliaryStorageClass ¶
func GetVZMacAuxiliaryStorageClass() VZMacAuxiliaryStorageClass
GetVZMacAuxiliaryStorageClass returns the class object for VZMacAuxiliaryStorage.
func (VZMacAuxiliaryStorageClass) Alloc ¶
func (vc VZMacAuxiliaryStorageClass) Alloc() VZMacAuxiliaryStorage
Alloc allocates memory for a new instance of the class.
type VZMacAuxiliaryStorageInitializationOptions ¶
type VZMacAuxiliaryStorageInitializationOptions int
See: https://developer.apple.com/documentation/Virtualization/VZMacAuxiliaryStorage/InitializationOptions
const ( // VZMacAuxiliaryStorageInitializationOptionAllowOverwrite: A Boolean value that indicates whether the VM can overwrite an existing auxiliary storage file. VZMacAuxiliaryStorageInitializationOptionAllowOverwrite VZMacAuxiliaryStorageInitializationOptions = 1 )
func (VZMacAuxiliaryStorageInitializationOptions) String ¶
func (e VZMacAuxiliaryStorageInitializationOptions) String() string
type VZMacGraphicsDevice ¶
type VZMacGraphicsDevice struct {
VZGraphicsDevice
}
An object that represents a Mac graphics device.
Overview ¶
You don’t instantiate a VZMacGraphicsDevice directly. Graphics devices are first configured on the VZVirtualMachineConfiguration through a subclass of VZMacGraphicsDeviceConfiguration. When the framework creates a VZVirtualMachine from the configuration, the graphics devices are available through the `graphicsDevices` property.
See: https://developer.apple.com/documentation/Virtualization/VZMacGraphicsDevice
func NewVZMacGraphicsDevice ¶
func NewVZMacGraphicsDevice() VZMacGraphicsDevice
NewVZMacGraphicsDevice creates a new VZMacGraphicsDevice instance.
func VZMacGraphicsDeviceFromID ¶
func VZMacGraphicsDeviceFromID(id objc.ID) VZMacGraphicsDevice
VZMacGraphicsDeviceFromID constructs a VZMacGraphicsDevice from an objc.ID.
An object that represents a Mac graphics device.
func (VZMacGraphicsDevice) Autorelease ¶
func (m VZMacGraphicsDevice) Autorelease() VZMacGraphicsDevice
Autorelease adds the receiver to the current autorelease pool.
func (VZMacGraphicsDevice) Init ¶
func (m VZMacGraphicsDevice) Init() VZMacGraphicsDevice
Init initializes the instance.
type VZMacGraphicsDeviceClass ¶
type VZMacGraphicsDeviceClass struct {
// contains filtered or unexported fields
}
func GetVZMacGraphicsDeviceClass ¶
func GetVZMacGraphicsDeviceClass() VZMacGraphicsDeviceClass
GetVZMacGraphicsDeviceClass returns the class object for VZMacGraphicsDevice.
func (VZMacGraphicsDeviceClass) Alloc ¶
func (vc VZMacGraphicsDeviceClass) Alloc() VZMacGraphicsDevice
Alloc allocates memory for a new instance of the class.
type VZMacGraphicsDeviceConfiguration ¶
type VZMacGraphicsDeviceConfiguration struct {
VZGraphicsDeviceConfiguration
}
Configuration for a display attached to a Mac graphics device.
Overview ¶
Use this device to attach a display that’s shown in a VZVirtualMachineView.
Configuring displays ¶
- VZMacGraphicsDeviceConfiguration.Displays: The displays associated with this graphics device.
- VZMacGraphicsDeviceConfiguration.SetDisplays
See: https://developer.apple.com/documentation/Virtualization/VZMacGraphicsDeviceConfiguration
func NewVZMacGraphicsDeviceConfiguration ¶
func NewVZMacGraphicsDeviceConfiguration() VZMacGraphicsDeviceConfiguration
NewVZMacGraphicsDeviceConfiguration creates a new VZMacGraphicsDeviceConfiguration instance.
func VZMacGraphicsDeviceConfigurationFromID ¶
func VZMacGraphicsDeviceConfigurationFromID(id objc.ID) VZMacGraphicsDeviceConfiguration
VZMacGraphicsDeviceConfigurationFromID constructs a VZMacGraphicsDeviceConfiguration from an objc.ID.
Configuration for a display attached to a Mac graphics device.
func (VZMacGraphicsDeviceConfiguration) Autorelease ¶
func (m VZMacGraphicsDeviceConfiguration) Autorelease() VZMacGraphicsDeviceConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZMacGraphicsDeviceConfiguration) Displays ¶
func (m VZMacGraphicsDeviceConfiguration) Displays() []VZMacGraphicsDisplayConfiguration
The displays associated with this graphics device.
See: https://developer.apple.com/documentation/Virtualization/VZMacGraphicsDeviceConfiguration/displays
func (VZMacGraphicsDeviceConfiguration) Init ¶
func (m VZMacGraphicsDeviceConfiguration) Init() VZMacGraphicsDeviceConfiguration
Init initializes the instance.
func (VZMacGraphicsDeviceConfiguration) SetDisplays ¶
func (m VZMacGraphicsDeviceConfiguration) SetDisplays(value []VZMacGraphicsDisplayConfiguration)
type VZMacGraphicsDeviceConfigurationClass ¶
type VZMacGraphicsDeviceConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZMacGraphicsDeviceConfigurationClass ¶
func GetVZMacGraphicsDeviceConfigurationClass() VZMacGraphicsDeviceConfigurationClass
GetVZMacGraphicsDeviceConfigurationClass returns the class object for VZMacGraphicsDeviceConfiguration.
func (VZMacGraphicsDeviceConfigurationClass) Alloc ¶
func (vc VZMacGraphicsDeviceConfigurationClass) Alloc() VZMacGraphicsDeviceConfiguration
Alloc allocates memory for a new instance of the class.
type VZMacGraphicsDisplay ¶
type VZMacGraphicsDisplay struct {
VZGraphicsDisplay
}
An object that represents the graphics display on a Mac.
Getting the display’s pixel density ¶
- VZMacGraphicsDisplay.PixelsPerInch: Returns the pixel density of the display in pixels per inch.
See: https://developer.apple.com/documentation/Virtualization/VZMacGraphicsDisplay
func NewVZMacGraphicsDisplay ¶
func NewVZMacGraphicsDisplay() VZMacGraphicsDisplay
NewVZMacGraphicsDisplay creates a new VZMacGraphicsDisplay instance.
func VZMacGraphicsDisplayFromID ¶
func VZMacGraphicsDisplayFromID(id objc.ID) VZMacGraphicsDisplay
VZMacGraphicsDisplayFromID constructs a VZMacGraphicsDisplay from an objc.ID.
An object that represents the graphics display on a Mac.
func (VZMacGraphicsDisplay) Autorelease ¶
func (m VZMacGraphicsDisplay) Autorelease() VZMacGraphicsDisplay
Autorelease adds the receiver to the current autorelease pool.
func (VZMacGraphicsDisplay) Init ¶
func (m VZMacGraphicsDisplay) Init() VZMacGraphicsDisplay
Init initializes the instance.
func (VZMacGraphicsDisplay) PixelsPerInch ¶
func (m VZMacGraphicsDisplay) PixelsPerInch() int
Returns the pixel density of the display in pixels per inch.
See: https://developer.apple.com/documentation/Virtualization/VZMacGraphicsDisplay/pixelsPerInch
type VZMacGraphicsDisplayClass ¶
type VZMacGraphicsDisplayClass struct {
// contains filtered or unexported fields
}
func GetVZMacGraphicsDisplayClass ¶
func GetVZMacGraphicsDisplayClass() VZMacGraphicsDisplayClass
GetVZMacGraphicsDisplayClass returns the class object for VZMacGraphicsDisplay.
func (VZMacGraphicsDisplayClass) Alloc ¶
func (vc VZMacGraphicsDisplayClass) Alloc() VZMacGraphicsDisplay
Alloc allocates memory for a new instance of the class.
type VZMacGraphicsDisplayConfiguration ¶
type VZMacGraphicsDisplayConfiguration struct {
VZGraphicsDisplayConfiguration
}
The configuration for a Mac graphics device.
Overview ¶
Use this device to attach a display that’s shown in a VZVirtualMachineView.
Creating the display configuration ¶
- VZMacGraphicsDisplayConfiguration.InitForScreenSizeInPoints: Create a display configuration suitable for showing on the specified screen.
- VZMacGraphicsDisplayConfiguration.InitWithWidthInPixelsHeightInPixelsPixelsPerInch: Create a display configuration with the specified pixel dimensions and pixel density.
Configuring the display properties ¶
- VZMacGraphicsDisplayConfiguration.HeightInPixels: The height of the display, in pixels.
- VZMacGraphicsDisplayConfiguration.SetHeightInPixels
- VZMacGraphicsDisplayConfiguration.WidthInPixels: The width of the display, in pixels.
- VZMacGraphicsDisplayConfiguration.SetWidthInPixels
- VZMacGraphicsDisplayConfiguration.PixelsPerInch: The pixel density in pixels per inch.
- VZMacGraphicsDisplayConfiguration.SetPixelsPerInch
See: https://developer.apple.com/documentation/Virtualization/VZMacGraphicsDisplayConfiguration
func NewMacGraphicsDisplayConfigurationForScreenSizeInPoints ¶
func NewMacGraphicsDisplayConfigurationForScreenSizeInPoints(screen appkit.NSScreen, sizeInPoints corefoundation.CGSize) VZMacGraphicsDisplayConfiguration
Create a display configuration suitable for showing on the specified screen.
screen: The screen on which you intend to present the VZVirtualMachineView for the display.
sizeInPoints: The intended logical size of the display.
Discussion ¶
The framework initializes the pixel dimensions and pixel density based on the specified screen and size. An instance of macOS running in the VM may not necessarily provide a display mode with a backing scale factor matching the specified screen.
func NewMacGraphicsDisplayConfigurationWithWidthInPixelsHeightInPixelsPixelsPerInch ¶
func NewMacGraphicsDisplayConfigurationWithWidthInPixelsHeightInPixelsPixelsPerInch(widthInPixels int, heightInPixels int, pixelsPerInch int) VZMacGraphicsDisplayConfiguration
Create a display configuration with the specified pixel dimensions and pixel density.
widthInPixels: The width of the display, in pixels.
heightInPixels: The height of the display, in pixels.
pixelsPerInch: The pixel density as a number of pixels per inch.
func NewVZMacGraphicsDisplayConfiguration ¶
func NewVZMacGraphicsDisplayConfiguration() VZMacGraphicsDisplayConfiguration
NewVZMacGraphicsDisplayConfiguration creates a new VZMacGraphicsDisplayConfiguration instance.
func VZMacGraphicsDisplayConfigurationFromID ¶
func VZMacGraphicsDisplayConfigurationFromID(id objc.ID) VZMacGraphicsDisplayConfiguration
VZMacGraphicsDisplayConfigurationFromID constructs a VZMacGraphicsDisplayConfiguration from an objc.ID.
The configuration for a Mac graphics device.
func (VZMacGraphicsDisplayConfiguration) Autorelease ¶
func (m VZMacGraphicsDisplayConfiguration) Autorelease() VZMacGraphicsDisplayConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZMacGraphicsDisplayConfiguration) HeightInPixels ¶
func (m VZMacGraphicsDisplayConfiguration) HeightInPixels() int
The height of the display, in pixels.
func (VZMacGraphicsDisplayConfiguration) Init ¶
func (m VZMacGraphicsDisplayConfiguration) Init() VZMacGraphicsDisplayConfiguration
Init initializes the instance.
func (VZMacGraphicsDisplayConfiguration) InitForScreenSizeInPoints ¶
func (m VZMacGraphicsDisplayConfiguration) InitForScreenSizeInPoints(screen appkit.NSScreen, sizeInPoints corefoundation.CGSize) VZMacGraphicsDisplayConfiguration
Create a display configuration suitable for showing on the specified screen.
screen: The screen on which you intend to present the VZVirtualMachineView for the display.
sizeInPoints: The intended logical size of the display.
Discussion ¶
The framework initializes the pixel dimensions and pixel density based on the specified screen and size. An instance of macOS running in the VM may not necessarily provide a display mode with a backing scale factor matching the specified screen.
func (VZMacGraphicsDisplayConfiguration) InitWithWidthInPixelsHeightInPixelsPixelsPerInch ¶
func (m VZMacGraphicsDisplayConfiguration) InitWithWidthInPixelsHeightInPixelsPixelsPerInch(widthInPixels int, heightInPixels int, pixelsPerInch int) VZMacGraphicsDisplayConfiguration
Create a display configuration with the specified pixel dimensions and pixel density.
widthInPixels: The width of the display, in pixels.
heightInPixels: The height of the display, in pixels.
pixelsPerInch: The pixel density as a number of pixels per inch.
func (VZMacGraphicsDisplayConfiguration) PixelsPerInch ¶
func (m VZMacGraphicsDisplayConfiguration) PixelsPerInch() int
The pixel density in pixels per inch.
func (VZMacGraphicsDisplayConfiguration) SetHeightInPixels ¶
func (m VZMacGraphicsDisplayConfiguration) SetHeightInPixels(value int)
func (VZMacGraphicsDisplayConfiguration) SetPixelsPerInch ¶
func (m VZMacGraphicsDisplayConfiguration) SetPixelsPerInch(value int)
func (VZMacGraphicsDisplayConfiguration) SetWidthInPixels ¶
func (m VZMacGraphicsDisplayConfiguration) SetWidthInPixels(value int)
func (VZMacGraphicsDisplayConfiguration) WidthInPixels ¶
func (m VZMacGraphicsDisplayConfiguration) WidthInPixels() int
The width of the display, in pixels.
type VZMacGraphicsDisplayConfigurationClass ¶
type VZMacGraphicsDisplayConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZMacGraphicsDisplayConfigurationClass ¶
func GetVZMacGraphicsDisplayConfigurationClass() VZMacGraphicsDisplayConfigurationClass
GetVZMacGraphicsDisplayConfigurationClass returns the class object for VZMacGraphicsDisplayConfiguration.
func (VZMacGraphicsDisplayConfigurationClass) Alloc ¶
func (vc VZMacGraphicsDisplayConfigurationClass) Alloc() VZMacGraphicsDisplayConfiguration
Alloc allocates memory for a new instance of the class.
type VZMacHardwareModel ¶
type VZMacHardwareModel struct {
objectivec.Object
}
A specification for the hardware elements and configurations present in a particular Mac hardware model.
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 VZMacHardwareModel.Supported 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 VZMacHardwareModel.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 VZMacHardwareModel.HardwareModel to configure the Mac platform object and use [InitCreatingStorageAtURLHardwareModelOptionsError] 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 VZMacHardwareModel.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 VZMacHardwareModel.InitWithDataRepresentation.
Creating the hardware model ¶
- VZMacHardwareModel.InitWithDataRepresentation: Creates an instance of the hardware model described by the specified data representation.
Configuring the hardware model ¶
- VZMacHardwareModel.DataRepresentation: Returns the opaque data representation of the hardware model.
- VZMacHardwareModel.Supported: A Boolean value that indicates whether the host supports this hardware model.
See: https://developer.apple.com/documentation/Virtualization/VZMacHardwareModel
func NewMacHardwareModelWithDataRepresentation ¶
func NewMacHardwareModelWithDataRepresentation(dataRepresentation foundation.INSData) VZMacHardwareModel
Creates an instance of the hardware model described by the specified data representation.
dataRepresentation: The opaque data representation of the hardware model.
func NewVZMacHardwareModel ¶
func NewVZMacHardwareModel() VZMacHardwareModel
NewVZMacHardwareModel creates a new VZMacHardwareModel instance.
func VZMacHardwareModelFromID ¶
func VZMacHardwareModelFromID(id objc.ID) VZMacHardwareModel
VZMacHardwareModelFromID constructs a VZMacHardwareModel from an objc.ID.
A specification for the hardware elements and configurations present in a particular Mac hardware model.
func (VZMacHardwareModel) Autorelease ¶
func (m VZMacHardwareModel) Autorelease() VZMacHardwareModel
Autorelease adds the receiver to the current autorelease pool.
func (VZMacHardwareModel) DataRepresentation ¶
func (m VZMacHardwareModel) DataRepresentation() foundation.INSData
Returns the opaque data representation of the hardware model.
Discussion ¶
You can use this to recreate the same hardware model with [InitWithDataRepresentation].
See: https://developer.apple.com/documentation/Virtualization/VZMacHardwareModel/dataRepresentation
func (VZMacHardwareModel) HardwareModel ¶
func (m VZMacHardwareModel) HardwareModel() IVZMacHardwareModel
The Mac hardware model.
See: https://developer.apple.com/documentation/virtualization/vzmacplatformconfiguration/hardwaremodel
func (VZMacHardwareModel) Init ¶
func (m VZMacHardwareModel) Init() VZMacHardwareModel
Init initializes the instance.
func (VZMacHardwareModel) InitWithDataRepresentation ¶
func (m VZMacHardwareModel) InitWithDataRepresentation(dataRepresentation foundation.INSData) VZMacHardwareModel
Creates an instance of the hardware model described by the specified data representation.
dataRepresentation: The opaque data representation of the hardware model.
func (VZMacHardwareModel) MostFeaturefulSupportedConfiguration ¶
func (m VZMacHardwareModel) MostFeaturefulSupportedConfiguration() IVZMacOSConfigurationRequirements
This object represents the most fully featured configuration that’s supported by both the current host and by this restore image.
func (VZMacHardwareModel) SetHardwareModel ¶
func (m VZMacHardwareModel) SetHardwareModel(value IVZMacHardwareModel)
func (VZMacHardwareModel) SetMostFeaturefulSupportedConfiguration ¶
func (m VZMacHardwareModel) SetMostFeaturefulSupportedConfiguration(value IVZMacOSConfigurationRequirements)
func (VZMacHardwareModel) Supported ¶
func (m VZMacHardwareModel) Supported() bool
A Boolean value that indicates whether the host supports this hardware model.
Discussion ¶
If this hardware model isn’t supported by the host, the VZVirtualMachineConfiguration won’t validate.
The validation error of the VZVirtualMachineConfiguration provides more information about why the hardware model isn’t supported.
See: https://developer.apple.com/documentation/Virtualization/VZMacHardwareModel/isSupported
type VZMacHardwareModelClass ¶
type VZMacHardwareModelClass struct {
// contains filtered or unexported fields
}
func GetVZMacHardwareModelClass ¶
func GetVZMacHardwareModelClass() VZMacHardwareModelClass
GetVZMacHardwareModelClass returns the class object for VZMacHardwareModel.
func (VZMacHardwareModelClass) Alloc ¶
func (vc VZMacHardwareModelClass) Alloc() VZMacHardwareModel
Alloc allocates memory for a new instance of the class.
type VZMacKeyboardConfiguration ¶
type VZMacKeyboardConfiguration struct {
VZKeyboardConfiguration
}
A device that defines the configuration for a Mac keyboard.
Overview ¶
Use this configuration to attach a Mac keyboard configuration to a VM. A VZVirtualMachineView can use this device to send key events to the VM, including the Mac-specific key events, such as the Globe key.
See: https://developer.apple.com/documentation/Virtualization/VZMacKeyboardConfiguration
func NewVZMacKeyboardConfiguration ¶
func NewVZMacKeyboardConfiguration() VZMacKeyboardConfiguration
NewVZMacKeyboardConfiguration creates a new VZMacKeyboardConfiguration instance.
func VZMacKeyboardConfigurationFromID ¶
func VZMacKeyboardConfigurationFromID(id objc.ID) VZMacKeyboardConfiguration
VZMacKeyboardConfigurationFromID constructs a VZMacKeyboardConfiguration from an objc.ID.
A device that defines the configuration for a Mac keyboard.
func (VZMacKeyboardConfiguration) Autorelease ¶
func (m VZMacKeyboardConfiguration) Autorelease() VZMacKeyboardConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZMacKeyboardConfiguration) Init ¶
func (m VZMacKeyboardConfiguration) Init() VZMacKeyboardConfiguration
Init initializes the instance.
type VZMacKeyboardConfigurationClass ¶
type VZMacKeyboardConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZMacKeyboardConfigurationClass ¶
func GetVZMacKeyboardConfigurationClass() VZMacKeyboardConfigurationClass
GetVZMacKeyboardConfigurationClass returns the class object for VZMacKeyboardConfiguration.
func (VZMacKeyboardConfigurationClass) Alloc ¶
func (vc VZMacKeyboardConfigurationClass) Alloc() VZMacKeyboardConfiguration
Alloc allocates memory for a new instance of the class.
type VZMacMachineIdentifier ¶
type VZMacMachineIdentifier struct {
objectivec.Object
}
A unique identifier for a VM.
Overview ¶
This value uniquely identifies a virtual Mac hardware instance. Two VMs running concurrently shouldn’t use the same identifier.
When serializing the VM to disk, you can preserve the identifier in a binary representation by serializing the data in the VZMacMachineIdentifier.VZMacMachineIdentifier.DataRepresentation property. Conversely, you can recreate the identifier with VZMacMachineIdentifier.InitWithDataRepresentation from the binary representation.
You can compare the contents of two identifiers with isEqual(to:).
Creating a machine identifier ¶
- VZMacMachineIdentifier.InitWithDataRepresentation: Create a machine identifier described by the specified data representation.
Machine data representation ¶
- VZMacMachineIdentifier.DataRepresentation: Returns the opaque data representation of the machine identifier.
See: https://developer.apple.com/documentation/Virtualization/VZMacMachineIdentifier
func NewMacMachineIdentifierWithDataRepresentation ¶
func NewMacMachineIdentifierWithDataRepresentation(dataRepresentation foundation.INSData) VZMacMachineIdentifier
Create a machine identifier described by the specified data representation.
dataRepresentation: The opaque data representation of the machine identifier.
func NewVZMacMachineIdentifier ¶
func NewVZMacMachineIdentifier() VZMacMachineIdentifier
NewVZMacMachineIdentifier creates a new VZMacMachineIdentifier instance.
func VZMacMachineIdentifierFromID ¶
func VZMacMachineIdentifierFromID(id objc.ID) VZMacMachineIdentifier
VZMacMachineIdentifierFromID constructs a VZMacMachineIdentifier from an objc.ID.
A unique identifier for a VM.
func (VZMacMachineIdentifier) Autorelease ¶
func (m VZMacMachineIdentifier) Autorelease() VZMacMachineIdentifier
Autorelease adds the receiver to the current autorelease pool.
func (VZMacMachineIdentifier) DataRepresentation ¶
func (m VZMacMachineIdentifier) DataRepresentation() foundation.INSData
Returns the opaque data representation of the machine identifier.
Discussion ¶
You can use this to recreate the same machine identifier with [InitWithDataRepresentation].
See: https://developer.apple.com/documentation/Virtualization/VZMacMachineIdentifier/dataRepresentation
func (VZMacMachineIdentifier) Init ¶
func (m VZMacMachineIdentifier) Init() VZMacMachineIdentifier
Init initializes the instance.
func (VZMacMachineIdentifier) InitWithDataRepresentation ¶
func (m VZMacMachineIdentifier) InitWithDataRepresentation(dataRepresentation foundation.INSData) VZMacMachineIdentifier
Create a machine identifier described by the specified data representation.
dataRepresentation: The opaque data representation of the machine identifier.
type VZMacMachineIdentifierClass ¶
type VZMacMachineIdentifierClass struct {
// contains filtered or unexported fields
}
func GetVZMacMachineIdentifierClass ¶
func GetVZMacMachineIdentifierClass() VZMacMachineIdentifierClass
GetVZMacMachineIdentifierClass returns the class object for VZMacMachineIdentifier.
func (VZMacMachineIdentifierClass) Alloc ¶
func (vc VZMacMachineIdentifierClass) Alloc() VZMacMachineIdentifier
Alloc allocates memory for a new instance of the class.
type VZMacOSBootLoader ¶
type VZMacOSBootLoader struct {
VZBootLoader
}
An object that loads and configures a boot loader for running macOS on Apple silicon as a guest system of your VM.
Overview ¶
You must use a VZMacPlatformConfiguration in conjunction with the macOS boot loader. It’s invalid to use it with any other platform configuration.
See: https://developer.apple.com/documentation/Virtualization/VZMacOSBootLoader
func NewVZMacOSBootLoader ¶
func NewVZMacOSBootLoader() VZMacOSBootLoader
NewVZMacOSBootLoader creates a new VZMacOSBootLoader instance.
func VZMacOSBootLoaderFromID ¶
func VZMacOSBootLoaderFromID(id objc.ID) VZMacOSBootLoader
VZMacOSBootLoaderFromID constructs a VZMacOSBootLoader from an objc.ID.
An object that loads and configures a boot loader for running macOS on Apple silicon as a guest system of your VM.
func (VZMacOSBootLoader) Autorelease ¶
func (m VZMacOSBootLoader) Autorelease() VZMacOSBootLoader
Autorelease adds the receiver to the current autorelease pool.
func (VZMacOSBootLoader) Init ¶
func (m VZMacOSBootLoader) Init() VZMacOSBootLoader
Init initializes the instance.
func (VZMacOSBootLoader) Platform ¶
func (m VZMacOSBootLoader) Platform() IVZPlatformConfiguration
The hardware platform to use.
See: https://developer.apple.com/documentation/virtualization/vzvirtualmachineconfiguration/platform
func (VZMacOSBootLoader) SetPlatform ¶
func (m VZMacOSBootLoader) SetPlatform(value IVZPlatformConfiguration)
type VZMacOSBootLoaderClass ¶
type VZMacOSBootLoaderClass struct {
// contains filtered or unexported fields
}
func GetVZMacOSBootLoaderClass ¶
func GetVZMacOSBootLoaderClass() VZMacOSBootLoaderClass
GetVZMacOSBootLoaderClass returns the class object for VZMacOSBootLoader.
func (VZMacOSBootLoaderClass) Alloc ¶
func (vc VZMacOSBootLoaderClass) Alloc() VZMacOSBootLoader
Alloc allocates memory for a new instance of the class.
type VZMacOSConfigurationRequirements ¶
type VZMacOSConfigurationRequirements struct {
objectivec.Object
}
An object that describes the parameter constraints required by a specific configuration of macOS.
Configuration Requirements ¶
- VZMacOSConfigurationRequirements.HardwareModel: The hardware model for this configuration.
- VZMacOSConfigurationRequirements.MinimumSupportedCPUCount: The minimum supported number of CPUs for this configuration.
- VZMacOSConfigurationRequirements.MinimumSupportedMemorySize: The minimum supported memory size for this configuration.
See: https://developer.apple.com/documentation/Virtualization/VZMacOSConfigurationRequirements
func NewVZMacOSConfigurationRequirements ¶
func NewVZMacOSConfigurationRequirements() VZMacOSConfigurationRequirements
NewVZMacOSConfigurationRequirements creates a new VZMacOSConfigurationRequirements instance.
func VZMacOSConfigurationRequirementsFromID ¶
func VZMacOSConfigurationRequirementsFromID(id objc.ID) VZMacOSConfigurationRequirements
VZMacOSConfigurationRequirementsFromID constructs a VZMacOSConfigurationRequirements from an objc.ID.
An object that describes the parameter constraints required by a specific configuration of macOS.
func (VZMacOSConfigurationRequirements) Autorelease ¶
func (m VZMacOSConfigurationRequirements) Autorelease() VZMacOSConfigurationRequirements
Autorelease adds the receiver to the current autorelease pool.
func (VZMacOSConfigurationRequirements) HardwareModel ¶
func (m VZMacOSConfigurationRequirements) HardwareModel() IVZMacHardwareModel
The hardware model for this configuration.
Discussion ¶
Use a hardware model to configure a new VM that meets a set of specific requirements.
After creating the hardware model, use VZMacPlatformConfiguration [HardwareModel] to configure the Mac platform, and [InitCreatingStorageAtURLHardwareModelOptionsError] to create its auxiliary storage.
func (VZMacOSConfigurationRequirements) Init ¶
func (m VZMacOSConfigurationRequirements) Init() VZMacOSConfigurationRequirements
Init initializes the instance.
func (VZMacOSConfigurationRequirements) MinimumSupportedCPUCount ¶
func (m VZMacOSConfigurationRequirements) MinimumSupportedCPUCount() uint
The minimum supported number of CPUs for this configuration.
Discussion ¶
This property specifies the minimum number of CPUs required by the associated macOS configuration.
You associate a VZMacOSConfigurationRequirements with a specific VZMacOSRestoreImage object, which results in a specific macOS configuration.
Installing or running the associated configuration of macOS on a virtual machine with fewer than the specified number of CPUs results in undefined behavior.
func (VZMacOSConfigurationRequirements) MinimumSupportedMemorySize ¶
func (m VZMacOSConfigurationRequirements) MinimumSupportedMemorySize() uint64
The minimum supported memory size for this configuration.
Discussion ¶
This property specifies the minimum amount of memory required by the associated macOS configuration.
You associate a VZMacOSConfigurationRequirements with a specific VZMacOSRestoreImage object, which results in a specific macOS configuration.
Installing or running the associated configuration of macOS on a VM with less than this amount of memory results in undefined behavior.
type VZMacOSConfigurationRequirementsClass ¶
type VZMacOSConfigurationRequirementsClass struct {
// contains filtered or unexported fields
}
func GetVZMacOSConfigurationRequirementsClass ¶
func GetVZMacOSConfigurationRequirementsClass() VZMacOSConfigurationRequirementsClass
GetVZMacOSConfigurationRequirementsClass returns the class object for VZMacOSConfigurationRequirements.
func (VZMacOSConfigurationRequirementsClass) Alloc ¶
func (vc VZMacOSConfigurationRequirementsClass) Alloc() VZMacOSConfigurationRequirements
Alloc allocates memory for a new instance of the class.
type VZMacOSInstaller ¶
type VZMacOSInstaller struct {
objectivec.Object
}
An object you use to install macOS on the specified virtual machine.
Overview ¶
Initialize a VZMacOSInstaller object with a VZVirtualMachine and a file URL that refers to a macOS restore image.
The following code example shows how to use a `VZMacOSInstaller:`
Creating a macOS Installer ¶
- VZMacOSInstaller.InitWithVirtualMachineRestoreImageURL: Creates a macOS installer object.
Getting Information About an Installation ¶
- VZMacOSInstaller.Progress: A progress object that you can use to observe or cancel an installation.
- VZMacOSInstaller.RestoreImageURL: The restore image URL used to initialize this installer.
- VZMacOSInstaller.VirtualMachine: The virtual machine used to initialize this installer.
Installing macOS ¶
- VZMacOSInstaller.InstallWithCompletionHandler: Start installing macOS.
See: https://developer.apple.com/documentation/Virtualization/VZMacOSInstaller
func NewMacOSInstallerWithVirtualMachineRestoreImageURL ¶
func NewMacOSInstallerWithVirtualMachineRestoreImageURL(virtualMachine IVZVirtualMachine, restoreImageFileURL foundation.INSURL) VZMacOSInstaller
Creates a macOS installer object.
virtualMachine: The virtual machine to install the operating system on.
restoreImageFileURL: A file URL that indicates the macOS restore image to install.
func NewVZMacOSInstaller ¶
func NewVZMacOSInstaller() VZMacOSInstaller
NewVZMacOSInstaller creates a new VZMacOSInstaller instance.
func VZMacOSInstallerFromID ¶
func VZMacOSInstallerFromID(id objc.ID) VZMacOSInstaller
VZMacOSInstallerFromID constructs a VZMacOSInstaller from an objc.ID.
An object you use to install macOS on the specified virtual machine.
func (VZMacOSInstaller) Autorelease ¶
func (m VZMacOSInstaller) Autorelease() VZMacOSInstaller
Autorelease adds the receiver to the current autorelease pool.
func (VZMacOSInstaller) Init ¶
func (m VZMacOSInstaller) Init() VZMacOSInstaller
Init initializes the instance.
func (VZMacOSInstaller) InitWithVirtualMachineRestoreImageURL ¶
func (m VZMacOSInstaller) InitWithVirtualMachineRestoreImageURL(virtualMachine IVZVirtualMachine, restoreImageFileURL foundation.INSURL) VZMacOSInstaller
Creates a macOS installer object.
virtualMachine: The virtual machine to install the operating system on.
restoreImageFileURL: A file URL that indicates the macOS restore image to install.
func (VZMacOSInstaller) Install ¶
func (m VZMacOSInstaller) Install(ctx context.Context) error
Install is a synchronous wrapper around VZMacOSInstaller.InstallWithCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (VZMacOSInstaller) InstallWithCompletionHandler ¶
func (m VZMacOSInstaller) InstallWithCompletionHandler(completionHandler ErrorHandler)
Start installing macOS.
Discussion ¶
This method starts the installation process. The VM must be in a stopped state. During the installation operation, pausing or stopping the VM results in an undefined behavior.
If you start the installation on the same VZMacOSInstaller object more than once, the framework raises an exception.
Call this method only on the VM’s queue.
See: https://developer.apple.com/documentation/Virtualization/VZMacOSInstaller/install()
func (VZMacOSInstaller) Progress ¶
func (m VZMacOSInstaller) Progress() foundation.NSProgress
A progress object that you can use to observe or cancel an installation.
Discussion ¶
Canceling the progress object before starting an installation raises an exception.
See: https://developer.apple.com/documentation/Virtualization/VZMacOSInstaller/progress
func (VZMacOSInstaller) RestoreImageURL ¶
func (m VZMacOSInstaller) RestoreImageURL() foundation.INSURL
The restore image URL used to initialize this installer.
See: https://developer.apple.com/documentation/Virtualization/VZMacOSInstaller/restoreImageURL
func (VZMacOSInstaller) VirtualMachine ¶
func (m VZMacOSInstaller) VirtualMachine() IVZVirtualMachine
The virtual machine used to initialize this installer.
See: https://developer.apple.com/documentation/Virtualization/VZMacOSInstaller/virtualMachine
type VZMacOSInstallerClass ¶
type VZMacOSInstallerClass struct {
// contains filtered or unexported fields
}
func GetVZMacOSInstallerClass ¶
func GetVZMacOSInstallerClass() VZMacOSInstallerClass
GetVZMacOSInstallerClass returns the class object for VZMacOSInstaller.
func (VZMacOSInstallerClass) Alloc ¶
func (vc VZMacOSInstallerClass) Alloc() VZMacOSInstaller
Alloc allocates memory for a new instance of the class.
type VZMacOSRestoreImage ¶
type VZMacOSRestoreImage struct {
objectivec.Object
}
An object that describes a version of macOS to install on to a virtual machine.
Overview ¶
To set up a new VM compatible with the restore image, use VZMacOSRestoreImage.MostFeaturefulSupportedConfiguration to obtain the VZMacOSRestoreImage.HardwareModel of the VZMacPlatformConfiguration. Then, create a VZMacOSRestoreImage object by loading an installation media file. Initialize a VZMacOSInstaller object with this VZMacOSRestoreImage object to install the operating system onto a VM.
Getting Information About the Restore Image ¶
- VZMacOSRestoreImage.BuildVersion: The build version this restore image contains.
- VZMacOSRestoreImage.Supported: A Boolean value that indicates whether the current host supports this restore image.
- VZMacOSRestoreImage.MostFeaturefulSupportedConfiguration: This object represents the most fully featured configuration that’s supported by both the current host and by this restore image.
- VZMacOSRestoreImage.OperatingSystemVersion: The operating system version this restore image contains.
- VZMacOSRestoreImage.URL: The URL of this restore image.
See: https://developer.apple.com/documentation/Virtualization/VZMacOSRestoreImage
func NewVZMacOSRestoreImage ¶
func NewVZMacOSRestoreImage() VZMacOSRestoreImage
NewVZMacOSRestoreImage creates a new VZMacOSRestoreImage instance.
func VZMacOSRestoreImageFromID ¶
func VZMacOSRestoreImageFromID(id objc.ID) VZMacOSRestoreImage
VZMacOSRestoreImageFromID constructs a VZMacOSRestoreImage from an objc.ID.
An object that describes a version of macOS to install on to a virtual machine.
func (VZMacOSRestoreImage) Autorelease ¶
func (m VZMacOSRestoreImage) Autorelease() VZMacOSRestoreImage
Autorelease adds the receiver to the current autorelease pool.
func (VZMacOSRestoreImage) BuildVersion ¶
func (m VZMacOSRestoreImage) BuildVersion() string
The build version this restore image contains.
See: https://developer.apple.com/documentation/Virtualization/VZMacOSRestoreImage/buildVersion
func (VZMacOSRestoreImage) HardwareModel ¶
func (m VZMacOSRestoreImage) HardwareModel() IVZMacHardwareModel
The Mac hardware model.
See: https://developer.apple.com/documentation/virtualization/vzmacplatformconfiguration/hardwaremodel
func (VZMacOSRestoreImage) Init ¶
func (m VZMacOSRestoreImage) Init() VZMacOSRestoreImage
Init initializes the instance.
func (VZMacOSRestoreImage) MostFeaturefulSupportedConfiguration ¶
func (m VZMacOSRestoreImage) MostFeaturefulSupportedConfiguration() IVZMacOSConfigurationRequirements
This object represents the most fully featured configuration that’s supported by both the current host and by this restore image.
func (VZMacOSRestoreImage) OperatingSystemVersion ¶
func (m VZMacOSRestoreImage) OperatingSystemVersion() foundation.NSOperatingSystemVersion
The operating system version this restore image contains.
See: https://developer.apple.com/documentation/Virtualization/VZMacOSRestoreImage/operatingSystemVersion
func (VZMacOSRestoreImage) SetHardwareModel ¶
func (m VZMacOSRestoreImage) SetHardwareModel(value IVZMacHardwareModel)
func (VZMacOSRestoreImage) Supported ¶
func (m VZMacOSRestoreImage) Supported() bool
A Boolean value that indicates whether the current host supports this restore image.
See: https://developer.apple.com/documentation/Virtualization/VZMacOSRestoreImage/isSupported
func (VZMacOSRestoreImage) URL ¶
func (m VZMacOSRestoreImage) URL() foundation.INSURL
The URL of this restore image.
Discussion ¶
If the restore image loaded using [LoadFileURLCompletionHandler], the value of this property is a file URL.
If you obtain the restore image by fetching it from a server, use [FetchLatestSupportedWithCompletionHandler] and set the value of this property to a network URL for the installation media file.
See: https://developer.apple.com/documentation/Virtualization/VZMacOSRestoreImage/url
type VZMacOSRestoreImageClass ¶
type VZMacOSRestoreImageClass struct {
// contains filtered or unexported fields
}
func GetVZMacOSRestoreImageClass ¶
func GetVZMacOSRestoreImageClass() VZMacOSRestoreImageClass
GetVZMacOSRestoreImageClass returns the class object for VZMacOSRestoreImage.
func (VZMacOSRestoreImageClass) Alloc ¶
func (vc VZMacOSRestoreImageClass) Alloc() VZMacOSRestoreImage
Alloc allocates memory for a new instance of the class.
func (VZMacOSRestoreImageClass) FetchLatestSupported ¶
func (mc VZMacOSRestoreImageClass) FetchLatestSupported(ctx context.Context) (*VZMacOSRestoreImage, error)
FetchLatestSupported is a synchronous wrapper around [VZMacOSRestoreImage.FetchLatestSupportedWithCompletionHandler]. It blocks until the completion handler fires or the context is cancelled.
func (VZMacOSRestoreImageClass) FetchLatestSupportedWithCompletionHandler ¶
func (_VZMacOSRestoreImageClass VZMacOSRestoreImageClass) FetchLatestSupportedWithCompletionHandler(completionHandler MacOSRestoreImageErrorHandler)
Fetches the latest restore image supported by this host from the network.
Discussion ¶
Construct a VZMacOSInstaller object with a VZMacOSRestoreImage loaded from a file on the local file system. A VZMacOSRestoreImage fetched with the [FetchLatestSupportedWithCompletionHandler] method has a URL property that refers to a restore image on the network.
To use a network restore image, download the file to disk (using URLSession or similar API). After downloading the restore image, you can initialize a VZMacOSInstaller using a URL referring to the local file.
See: https://developer.apple.com/documentation/Virtualization/VZMacOSRestoreImage/latestSupported
func (VZMacOSRestoreImageClass) LatestSupported ¶
func (_VZMacOSRestoreImageClass VZMacOSRestoreImageClass) LatestSupported() VZMacOSRestoreImage
Fetches the latest restore image supported by this host from the network.
See: https://developer.apple.com/documentation/virtualization/vzmacosrestoreimage/latestsupported
func (VZMacOSRestoreImageClass) LoadFileURL ¶
func (mc VZMacOSRestoreImageClass) LoadFileURL(ctx context.Context, fileURL foundation.INSURL) (*VZMacOSRestoreImage, error)
LoadFileURL is a synchronous wrapper around [VZMacOSRestoreImage.LoadFileURLCompletionHandler]. It blocks until the completion handler fires or the context is cancelled.
func (VZMacOSRestoreImageClass) LoadFileURLCompletionHandler ¶
func (_VZMacOSRestoreImageClass VZMacOSRestoreImageClass) LoadFileURLCompletionHandler(fileURL foundation.INSURL, completionHandler MacOSRestoreImageErrorHandler)
Load a restore image from a file on the local file system.
fileURL: A file URL that indicates the macOS restore image to load.
Discussion ¶
VZMacOSRestoreImage can load macOS installation media from a local file. If the `fileURL` parameter doesn’t refer to a local file, the system raises an exception.
See: https://developer.apple.com/documentation/Virtualization/VZMacOSRestoreImage/image(from:)
func (VZMacOSRestoreImageClass) SetLatestSupported ¶
func (_VZMacOSRestoreImageClass VZMacOSRestoreImageClass) SetLatestSupported(value VZMacOSRestoreImage)
type VZMacOSVirtualMachineStartOptions ¶
type VZMacOSVirtualMachineStartOptions struct {
VZVirtualMachineStartOptions
}
A class that describes start options for macOS VMs.
Setting recovery mode ¶
- VZMacOSVirtualMachineStartOptions.StartUpFromMacOSRecovery: A Boolean value that indicates whether the macOS guest should start in recovery mode.
- VZMacOSVirtualMachineStartOptions.SetStartUpFromMacOSRecovery
See: https://developer.apple.com/documentation/Virtualization/VZMacOSVirtualMachineStartOptions
func NewVZMacOSVirtualMachineStartOptions ¶
func NewVZMacOSVirtualMachineStartOptions() VZMacOSVirtualMachineStartOptions
NewVZMacOSVirtualMachineStartOptions creates a new VZMacOSVirtualMachineStartOptions instance.
func VZMacOSVirtualMachineStartOptionsFromID ¶
func VZMacOSVirtualMachineStartOptionsFromID(id objc.ID) VZMacOSVirtualMachineStartOptions
VZMacOSVirtualMachineStartOptionsFromID constructs a VZMacOSVirtualMachineStartOptions from an objc.ID.
A class that describes start options for macOS VMs.
func (VZMacOSVirtualMachineStartOptions) Autorelease ¶
func (m VZMacOSVirtualMachineStartOptions) Autorelease() VZMacOSVirtualMachineStartOptions
Autorelease adds the receiver to the current autorelease pool.
func (VZMacOSVirtualMachineStartOptions) Init ¶
func (m VZMacOSVirtualMachineStartOptions) Init() VZMacOSVirtualMachineStartOptions
Init initializes the instance.
func (VZMacOSVirtualMachineStartOptions) SetStartUpFromMacOSRecovery ¶
func (m VZMacOSVirtualMachineStartOptions) SetStartUpFromMacOSRecovery(value bool)
func (VZMacOSVirtualMachineStartOptions) StartUpFromMacOSRecovery ¶
func (m VZMacOSVirtualMachineStartOptions) StartUpFromMacOSRecovery() bool
A Boolean value that indicates whether the macOS guest should start in recovery mode.
type VZMacOSVirtualMachineStartOptionsClass ¶
type VZMacOSVirtualMachineStartOptionsClass struct {
// contains filtered or unexported fields
}
func GetVZMacOSVirtualMachineStartOptionsClass ¶
func GetVZMacOSVirtualMachineStartOptionsClass() VZMacOSVirtualMachineStartOptionsClass
GetVZMacOSVirtualMachineStartOptionsClass returns the class object for VZMacOSVirtualMachineStartOptions.
func (VZMacOSVirtualMachineStartOptionsClass) Alloc ¶
func (vc VZMacOSVirtualMachineStartOptionsClass) Alloc() VZMacOSVirtualMachineStartOptions
Alloc allocates memory for a new instance of the class.
type VZMacPlatformConfiguration ¶
type VZMacPlatformConfiguration struct {
VZPlatformConfiguration
}
The platform configuration for booting macOS on Apple silicon.
Overview ¶
When creating a VM, the VZMacPlatformConfiguration.HardwareModel and VZMacPlatformConfiguration.AuxiliaryStorage depend on the restore image that you use to install macOS.
To choose the hardware model, start from VZMacOSRestoreImage.VZMacPlatformConfiguration.MostFeaturefulSupportedConfiguration to get a supported configuration, then use its VZMacOSConfigurationRequirements.VZMacPlatformConfiguration.HardwareModel property to get the hardware model.
Use the hardware model to set up VZMacPlatformConfiguration and to initialize a new auxiliary storage with [InitCreatingStorageAtURLHardwareModelOptionsError].
When you save a VM to disk and load it again, you must restore the VZMacPlatformConfiguration.HardwareModel, VZMacPlatformConfiguration.MachineIdentifier and VZMacPlatformConfiguration.AuxiliaryStorage properties to their original values.
If you create multiple VMs from the same configuration, each should have a unique `auxiliaryStorage` and `machineIdentifier`.
Getting platform properties ¶
- VZMacPlatformConfiguration.AuxiliaryStorage: The Mac auxiliary storage.
- VZMacPlatformConfiguration.SetAuxiliaryStorage
- VZMacPlatformConfiguration.HardwareModel: The Mac hardware model.
- VZMacPlatformConfiguration.SetHardwareModel
- VZMacPlatformConfiguration.MachineIdentifier: The Mac machine identifier.
- VZMacPlatformConfiguration.SetMachineIdentifier
See: https://developer.apple.com/documentation/Virtualization/VZMacPlatformConfiguration
func NewVZMacPlatformConfiguration ¶
func NewVZMacPlatformConfiguration() VZMacPlatformConfiguration
NewVZMacPlatformConfiguration creates a new VZMacPlatformConfiguration instance.
func VZMacPlatformConfigurationFromID ¶
func VZMacPlatformConfigurationFromID(id objc.ID) VZMacPlatformConfiguration
VZMacPlatformConfigurationFromID constructs a VZMacPlatformConfiguration from an objc.ID.
The platform configuration for booting macOS on Apple silicon.
func (VZMacPlatformConfiguration) Autorelease ¶
func (m VZMacPlatformConfiguration) Autorelease() VZMacPlatformConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZMacPlatformConfiguration) AuxiliaryStorage ¶
func (m VZMacPlatformConfiguration) AuxiliaryStorage() IVZMacAuxiliaryStorage
The Mac auxiliary storage.
Discussion ¶
When creating a VM, the hardware model of the `auxiliaryStorage` must match the hardware model of the `hardwareModel` property. Defaults to `nil`, but you must set a value for a configuration to be valid.
See: https://developer.apple.com/documentation/Virtualization/VZMacPlatformConfiguration/auxiliaryStorage
func (VZMacPlatformConfiguration) HardwareModel ¶
func (m VZMacPlatformConfiguration) HardwareModel() IVZMacHardwareModel
The Mac hardware model.
Discussion ¶
When creating a VM, the [HardwareModel] depends on the restore image that you use to install macOS.
To choose the hardware model, start from VZMacOSRestoreImage.[MostFeaturefulSupportedConfiguration] to get a supported configuration, then use its VZMacOSConfigurationRequirements.[HardwareModel] property to get the hardware model.
See: https://developer.apple.com/documentation/Virtualization/VZMacPlatformConfiguration/hardwareModel
func (VZMacPlatformConfiguration) Init ¶
func (m VZMacPlatformConfiguration) Init() VZMacPlatformConfiguration
Init initializes the instance.
func (VZMacPlatformConfiguration) MachineIdentifier ¶
func (m VZMacPlatformConfiguration) MachineIdentifier() IVZMacMachineIdentifier
The Mac machine identifier.
Discussion ¶
This value uniquely identifies an instance of a VM. Running two VMs concurrently with the same identifier results in undefined behavior in the guest operating system.
func (VZMacPlatformConfiguration) MostFeaturefulSupportedConfiguration ¶
func (m VZMacPlatformConfiguration) MostFeaturefulSupportedConfiguration() IVZMacOSConfigurationRequirements
This object represents the most fully featured configuration that’s supported by both the current host and by this restore image.
func (VZMacPlatformConfiguration) SetAuxiliaryStorage ¶
func (m VZMacPlatformConfiguration) SetAuxiliaryStorage(value IVZMacAuxiliaryStorage)
func (VZMacPlatformConfiguration) SetHardwareModel ¶
func (m VZMacPlatformConfiguration) SetHardwareModel(value IVZMacHardwareModel)
func (VZMacPlatformConfiguration) SetMachineIdentifier ¶
func (m VZMacPlatformConfiguration) SetMachineIdentifier(value IVZMacMachineIdentifier)
func (VZMacPlatformConfiguration) SetMostFeaturefulSupportedConfiguration ¶
func (m VZMacPlatformConfiguration) SetMostFeaturefulSupportedConfiguration(value IVZMacOSConfigurationRequirements)
type VZMacPlatformConfigurationClass ¶
type VZMacPlatformConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZMacPlatformConfigurationClass ¶
func GetVZMacPlatformConfigurationClass() VZMacPlatformConfigurationClass
GetVZMacPlatformConfigurationClass returns the class object for VZMacPlatformConfiguration.
func (VZMacPlatformConfigurationClass) Alloc ¶
func (vc VZMacPlatformConfigurationClass) Alloc() VZMacPlatformConfiguration
Alloc allocates memory for a new instance of the class.
type VZMacTrackpadConfiguration ¶
type VZMacTrackpadConfiguration struct {
VZPointingDeviceConfiguration
}
The class that represents the configuration for a Mac trackpad.
Overview ¶
The VZVirtualMachineView uses this device to send pointer events and multi-touch trackpad gestures to the virtual machine. In macOS 13 and later, guests use the multi-touch trackpad device, while earlier versions of macOS uses the USB pointing device.
See: https://developer.apple.com/documentation/Virtualization/VZMacTrackpadConfiguration
func NewVZMacTrackpadConfiguration ¶
func NewVZMacTrackpadConfiguration() VZMacTrackpadConfiguration
NewVZMacTrackpadConfiguration creates a new VZMacTrackpadConfiguration instance.
func VZMacTrackpadConfigurationFromID ¶
func VZMacTrackpadConfigurationFromID(id objc.ID) VZMacTrackpadConfiguration
VZMacTrackpadConfigurationFromID constructs a VZMacTrackpadConfiguration from an objc.ID.
The class that represents the configuration for a Mac trackpad.
func (VZMacTrackpadConfiguration) Autorelease ¶
func (m VZMacTrackpadConfiguration) Autorelease() VZMacTrackpadConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZMacTrackpadConfiguration) Init ¶
func (m VZMacTrackpadConfiguration) Init() VZMacTrackpadConfiguration
Init initializes the instance.
func (VZMacTrackpadConfiguration) PointingDevices ¶
func (m VZMacTrackpadConfiguration) PointingDevices() IVZPointingDeviceConfiguration
The list of pointing devices.
func (VZMacTrackpadConfiguration) SetPointingDevices ¶
func (m VZMacTrackpadConfiguration) SetPointingDevices(value IVZPointingDeviceConfiguration)
type VZMacTrackpadConfigurationClass ¶
type VZMacTrackpadConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZMacTrackpadConfigurationClass ¶
func GetVZMacTrackpadConfigurationClass() VZMacTrackpadConfigurationClass
GetVZMacTrackpadConfigurationClass returns the class object for VZMacTrackpadConfiguration.
func (VZMacTrackpadConfigurationClass) Alloc ¶
func (vc VZMacTrackpadConfigurationClass) Alloc() VZMacTrackpadConfiguration
Alloc allocates memory for a new instance of the class.
type VZMemoryBalloonDevice ¶
type VZMemoryBalloonDevice struct {
objectivec.Object
}
The common behavior for memory devices.
Overview ¶
Don’t instantiate this class directly. To request a memory ballon device, add an appropriate configuration object to the VZMemoryBalloonDevice.MemoryBalloonDevices property of the VZVirtualMachineConfiguration object that you use to configure the virtual machine. In response, the system instantiates the subclass of VZMemoryBalloonDevice that matches your request. For example, if you supply a VZVirtioTraditionalMemoryBalloonDeviceConfiguration object in your configuration, the system creates a VZVirtioTraditionalMemoryBalloonDevice object.
See: https://developer.apple.com/documentation/Virtualization/VZMemoryBalloonDevice
func NewVZMemoryBalloonDevice ¶
func NewVZMemoryBalloonDevice() VZMemoryBalloonDevice
NewVZMemoryBalloonDevice creates a new VZMemoryBalloonDevice instance.
func VZMemoryBalloonDeviceFromID ¶
func VZMemoryBalloonDeviceFromID(id objc.ID) VZMemoryBalloonDevice
VZMemoryBalloonDeviceFromID constructs a VZMemoryBalloonDevice from an objc.ID.
The common behavior for memory devices.
func (VZMemoryBalloonDevice) Autorelease ¶
func (m VZMemoryBalloonDevice) Autorelease() VZMemoryBalloonDevice
Autorelease adds the receiver to the current autorelease pool.
func (VZMemoryBalloonDevice) Init ¶
func (m VZMemoryBalloonDevice) Init() VZMemoryBalloonDevice
Init initializes the instance.
func (VZMemoryBalloonDevice) MemoryBalloonDevices ¶
func (m VZMemoryBalloonDevice) MemoryBalloonDevices() IVZMemoryBalloonDeviceConfiguration
An array that you configure with a memory balloon device, used to update the memory in the VM.
func (VZMemoryBalloonDevice) SetMemoryBalloonDevices ¶
func (m VZMemoryBalloonDevice) SetMemoryBalloonDevices(value IVZMemoryBalloonDeviceConfiguration)
type VZMemoryBalloonDeviceClass ¶
type VZMemoryBalloonDeviceClass struct {
// contains filtered or unexported fields
}
func GetVZMemoryBalloonDeviceClass ¶
func GetVZMemoryBalloonDeviceClass() VZMemoryBalloonDeviceClass
GetVZMemoryBalloonDeviceClass returns the class object for VZMemoryBalloonDevice.
func (VZMemoryBalloonDeviceClass) Alloc ¶
func (vc VZMemoryBalloonDeviceClass) Alloc() VZMemoryBalloonDevice
Alloc allocates memory for a new instance of the class.
type VZMemoryBalloonDeviceConfiguration ¶
type VZMemoryBalloonDeviceConfiguration struct {
objectivec.Object
}
The common configuration traits for memory balloon devices.
Overview ¶
Don’t instantiate this abstract class directly. Instead, instantiate one of its subclasses such as VZVirtioTraditionalMemoryBalloonDeviceConfiguration.
See: https://developer.apple.com/documentation/Virtualization/VZMemoryBalloonDeviceConfiguration
func NewVZMemoryBalloonDeviceConfiguration ¶
func NewVZMemoryBalloonDeviceConfiguration() VZMemoryBalloonDeviceConfiguration
NewVZMemoryBalloonDeviceConfiguration creates a new VZMemoryBalloonDeviceConfiguration instance.
func VZMemoryBalloonDeviceConfigurationFromID ¶
func VZMemoryBalloonDeviceConfigurationFromID(id objc.ID) VZMemoryBalloonDeviceConfiguration
VZMemoryBalloonDeviceConfigurationFromID constructs a VZMemoryBalloonDeviceConfiguration from an objc.ID.
The common configuration traits for memory balloon devices.
func (VZMemoryBalloonDeviceConfiguration) Autorelease ¶
func (m VZMemoryBalloonDeviceConfiguration) Autorelease() VZMemoryBalloonDeviceConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZMemoryBalloonDeviceConfiguration) Init ¶
func (m VZMemoryBalloonDeviceConfiguration) Init() VZMemoryBalloonDeviceConfiguration
Init initializes the instance.
type VZMemoryBalloonDeviceConfigurationClass ¶
type VZMemoryBalloonDeviceConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZMemoryBalloonDeviceConfigurationClass ¶
func GetVZMemoryBalloonDeviceConfigurationClass() VZMemoryBalloonDeviceConfigurationClass
GetVZMemoryBalloonDeviceConfigurationClass returns the class object for VZMemoryBalloonDeviceConfiguration.
func (VZMemoryBalloonDeviceConfigurationClass) Alloc ¶
func (vc VZMemoryBalloonDeviceConfigurationClass) Alloc() VZMemoryBalloonDeviceConfiguration
Alloc allocates memory for a new instance of the class.
type VZMultipleDirectoryShare ¶
type VZMultipleDirectoryShare struct {
}
An object that describes a directory share for multiple directories.
Overview ¶
This directory share exposes multiple directories from the host file system to the guest VM.
Creating a directory share ¶
- VZMultipleDirectoryShare.InitWithDirectories: Creates the directory share with a set of directories on the host.
Accessing the shared directories ¶
- VZMultipleDirectoryShare.Directories: The directories on the host to expose to the guest.
See: https://developer.apple.com/documentation/Virtualization/VZMultipleDirectoryShare
func NewMultipleDirectoryShareWithDirectories ¶
func NewMultipleDirectoryShareWithDirectories(directories foundation.INSDictionary) VZMultipleDirectoryShare
Creates the directory share with a set of directories on the host.
directories: Directories on the host to expose to the guest VM by name.
Discussion ¶
The dictionary string keys are the names for the directory. The keys must be valid names or the system raises an exception and the app exits.
See: https://developer.apple.com/documentation/Virtualization/VZMultipleDirectoryShare/init(directories:)
func NewVZMultipleDirectoryShare ¶
func NewVZMultipleDirectoryShare() VZMultipleDirectoryShare
NewVZMultipleDirectoryShare creates a new VZMultipleDirectoryShare instance.
func VZMultipleDirectoryShareFromID ¶
func VZMultipleDirectoryShareFromID(id objc.ID) VZMultipleDirectoryShare
VZMultipleDirectoryShareFromID constructs a VZMultipleDirectoryShare from an objc.ID.
An object that describes a directory share for multiple directories.
func (VZMultipleDirectoryShare) Autorelease ¶
func (m VZMultipleDirectoryShare) Autorelease() VZMultipleDirectoryShare
Autorelease adds the receiver to the current autorelease pool.
func (VZMultipleDirectoryShare) Directories ¶
func (m VZMultipleDirectoryShare) Directories() foundation.INSDictionary
The directories on the host to expose to the guest.
Discussion ¶
The dictionary string keys are the names for the directory. The keys must be valid names or the system raises an exception.
See: https://developer.apple.com/documentation/Virtualization/VZMultipleDirectoryShare/directories
func (VZMultipleDirectoryShare) Init ¶
func (m VZMultipleDirectoryShare) Init() VZMultipleDirectoryShare
Init initializes the instance.
func (VZMultipleDirectoryShare) InitWithDirectories ¶
func (m VZMultipleDirectoryShare) InitWithDirectories(directories foundation.INSDictionary) VZMultipleDirectoryShare
Creates the directory share with a set of directories on the host.
directories: Directories on the host to expose to the guest VM by name.
Discussion ¶
The dictionary string keys are the names for the directory. The keys must be valid names or the system raises an exception and the app exits.
See: https://developer.apple.com/documentation/Virtualization/VZMultipleDirectoryShare/init(directories:)
type VZMultipleDirectoryShareClass ¶
type VZMultipleDirectoryShareClass struct {
// contains filtered or unexported fields
}
func GetVZMultipleDirectoryShareClass ¶
func GetVZMultipleDirectoryShareClass() VZMultipleDirectoryShareClass
GetVZMultipleDirectoryShareClass returns the class object for VZMultipleDirectoryShare.
func (VZMultipleDirectoryShareClass) Alloc ¶
func (vc VZMultipleDirectoryShareClass) Alloc() VZMultipleDirectoryShare
Alloc allocates memory for a new instance of the class.
func (VZMultipleDirectoryShareClass) CanonicalizedNameFromName ¶
func (_VZMultipleDirectoryShareClass VZMultipleDirectoryShareClass) CanonicalizedNameFromName(name string) string
Transforms a string to be a valid directory name.
name: The name to transform.
Return Value ¶
Returns a String with the canonicalized name, or `nil` if there was an error.
func (VZMultipleDirectoryShareClass) ValidateNameError ¶
func (_VZMultipleDirectoryShareClass VZMultipleDirectoryShareClass) ValidateNameError(name string) (bool, error)
Check if a name is a valid directory name.
name: The name to validate.
Discussion ¶
The name must not be empty, have characters unsafe for file systems, be longer than `NAME_MAX`, or using a reserved name such as the Unix “.” or “..” current and parent directory filenames.
See: https://developer.apple.com/documentation/Virtualization/VZMultipleDirectoryShare/validateName(_:)
type VZNATNetworkDeviceAttachment ¶
type VZNATNetworkDeviceAttachment struct {
VZNetworkDeviceAttachment
}
A device that routes network requests through the host computer and performs network address translation on the resulting packets.
Overview ¶
A VZNATNetworkDeviceAttachment works with the host computer to perform network address translation (NAT) on the guest system’s network packets, and then route those packets to outside networks. Use this attachment to give the guest system indirect access to external networks, instead of direct access through a shared physical network interface.
To configure a network device with a NAT attachment:
- Create the VZNATNetworkDeviceAttachment object. - Assign the attachment object to the VZNATNetworkDeviceAttachment.Attachment property of a VZVirtioNetworkDeviceConfiguration object. - Add the VZVirtioNetworkDeviceConfiguration object to the VZNATNetworkDeviceAttachment.NetworkDevices property of your VZVirtualMachineConfiguration.
This attachment doesn’t require your app to have the com.apple.vm.networking entitlement.
See: https://developer.apple.com/documentation/Virtualization/VZNATNetworkDeviceAttachment
func NewVZNATNetworkDeviceAttachment ¶
func NewVZNATNetworkDeviceAttachment() VZNATNetworkDeviceAttachment
NewVZNATNetworkDeviceAttachment creates a new VZNATNetworkDeviceAttachment instance.
func VZNATNetworkDeviceAttachmentFromID ¶
func VZNATNetworkDeviceAttachmentFromID(id objc.ID) VZNATNetworkDeviceAttachment
VZNATNetworkDeviceAttachmentFromID constructs a VZNATNetworkDeviceAttachment from an objc.ID.
A device that routes network requests through the host computer and performs network address translation on the resulting packets.
func (VZNATNetworkDeviceAttachment) Attachment ¶
func (n VZNATNetworkDeviceAttachment) Attachment() IVZNetworkDeviceAttachment
The object that defines how the virtual network device communicates with the host system.
See: https://developer.apple.com/documentation/virtualization/vznetworkdeviceconfiguration/attachment
func (VZNATNetworkDeviceAttachment) Autorelease ¶
func (n VZNATNetworkDeviceAttachment) Autorelease() VZNATNetworkDeviceAttachment
Autorelease adds the receiver to the current autorelease pool.
func (VZNATNetworkDeviceAttachment) Init ¶
func (n VZNATNetworkDeviceAttachment) Init() VZNATNetworkDeviceAttachment
Init initializes the instance.
func (VZNATNetworkDeviceAttachment) NetworkDevices ¶
func (n VZNATNetworkDeviceAttachment) NetworkDevices() IVZNetworkDeviceConfiguration
The array of network devices that you expose to the guest operating system.
func (VZNATNetworkDeviceAttachment) SetAttachment ¶
func (n VZNATNetworkDeviceAttachment) SetAttachment(value IVZNetworkDeviceAttachment)
func (VZNATNetworkDeviceAttachment) SetNetworkDevices ¶
func (n VZNATNetworkDeviceAttachment) SetNetworkDevices(value IVZNetworkDeviceConfiguration)
type VZNATNetworkDeviceAttachmentClass ¶
type VZNATNetworkDeviceAttachmentClass struct {
// contains filtered or unexported fields
}
func GetVZNATNetworkDeviceAttachmentClass ¶
func GetVZNATNetworkDeviceAttachmentClass() VZNATNetworkDeviceAttachmentClass
GetVZNATNetworkDeviceAttachmentClass returns the class object for VZNATNetworkDeviceAttachment.
func (VZNATNetworkDeviceAttachmentClass) Alloc ¶
func (vc VZNATNetworkDeviceAttachmentClass) Alloc() VZNATNetworkDeviceAttachment
Alloc allocates memory for a new instance of the class.
type VZNVMExpressControllerDeviceConfiguration ¶
type VZNVMExpressControllerDeviceConfiguration struct {
VZStorageDeviceConfiguration
}
The configuration object that represents an NVM Express Controller storage device.
Overview ¶
This device configuration creates a storage device that conforms to the NVM Express specification revision 1.1b.
The device configuration is valid only if used with VZGenericPlatformConfiguration.
Creating a new device configuration ¶
- VZNVMExpressControllerDeviceConfiguration.InitWithAttachment: Creates a new NVM Express controller configuration with the storage device attachment you provide.
See: https://developer.apple.com/documentation/Virtualization/VZNVMExpressControllerDeviceConfiguration
func NewNVMExpressControllerDeviceConfigurationWithAttachment ¶
func NewNVMExpressControllerDeviceConfigurationWithAttachment(attachment IVZStorageDeviceAttachment) VZNVMExpressControllerDeviceConfiguration
Creates a new NVM Express controller configuration with the storage device attachment you provide.
attachment: The storage device attachment. This defines how the virtualized device operates on the host side.
func NewVZNVMExpressControllerDeviceConfiguration ¶
func NewVZNVMExpressControllerDeviceConfiguration() VZNVMExpressControllerDeviceConfiguration
NewVZNVMExpressControllerDeviceConfiguration creates a new VZNVMExpressControllerDeviceConfiguration instance.
func VZNVMExpressControllerDeviceConfigurationFromID ¶
func VZNVMExpressControllerDeviceConfigurationFromID(id objc.ID) VZNVMExpressControllerDeviceConfiguration
VZNVMExpressControllerDeviceConfigurationFromID constructs a VZNVMExpressControllerDeviceConfiguration from an objc.ID.
The configuration object that represents an NVM Express Controller storage device.
func (VZNVMExpressControllerDeviceConfiguration) Autorelease ¶
func (n VZNVMExpressControllerDeviceConfiguration) Autorelease() VZNVMExpressControllerDeviceConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZNVMExpressControllerDeviceConfiguration) InitWithAttachment ¶
func (n VZNVMExpressControllerDeviceConfiguration) InitWithAttachment(attachment IVZStorageDeviceAttachment) VZNVMExpressControllerDeviceConfiguration
Creates a new NVM Express controller configuration with the storage device attachment you provide.
attachment: The storage device attachment. This defines how the virtualized device operates on the host side.
type VZNVMExpressControllerDeviceConfigurationClass ¶
type VZNVMExpressControllerDeviceConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZNVMExpressControllerDeviceConfigurationClass ¶
func GetVZNVMExpressControllerDeviceConfigurationClass() VZNVMExpressControllerDeviceConfigurationClass
GetVZNVMExpressControllerDeviceConfigurationClass returns the class object for VZNVMExpressControllerDeviceConfiguration.
func (VZNVMExpressControllerDeviceConfigurationClass) Alloc ¶
func (vc VZNVMExpressControllerDeviceConfigurationClass) Alloc() VZNVMExpressControllerDeviceConfiguration
Alloc allocates memory for a new instance of the class.
type VZNetworkBlockDeviceStorageDeviceAttachment ¶
type VZNetworkBlockDeviceStorageDeviceAttachment struct {
VZStorageDeviceAttachment
}
A storage device attachment backed by a Network Block Device (NBD) client.
Overview ¶
This storage device attachment provides a Network Block Device (NBD) client implementation. The NBD client connects to an NBD server referred to by an NBD Uniform Resource Indicator (URI), represented as an URL in this API. The NBD server runs outside of and isn’t controlled by the Virtualization framework. The NBD client forwards the guest’s I/O operations to the NBD server, which handles the I/O operations.
The NBD client attempts to connect to the NBD server referred to by the URL used when you started the VM with [StartWithCompletionHandler]. However, it’s important to note that a connection attempt isn’t made when the framework initializes the attachment object.
Reconnection attempts take place throughout the life cycle of the VM when the NBD client encounters a recoverable error such as connection timeout and unexpected connection errors. The NBD client disconnects from the server when the VM shuts down.
Using this attachment requires the app to have the com.apple.security.network.client entitlement because this attachment opens an outgoing network connection.
To create a device that uses an NBD service, first initialize a VZNetworkBlockDeviceStorageDeviceAttachment with the URI of an NBD server, then use the attachment to configure a VZStorageDeviceConfiguration as shown in the example below (the attachment works with any subclass of VZStorageDeviceConfiguration, not just VZVirtioBlockDeviceConfiguration):
For more information about Network Block Devices, see the Network Block Device Specification on GitHub.
For more information about the NBD URL format, see the Network Block Device URL specification on GitHub.
Creating network block device attachments ¶
- VZNetworkBlockDeviceStorageDeviceAttachment.InitWithURLError: Creates a new network block device (NBD) storage attachment from an NDB Uniform Resource Indicator (URI) represented as a URL that you provide.
- VZNetworkBlockDeviceStorageDeviceAttachment.InitWithURLTimeoutForcedReadOnlySynchronizationModeError: Creates a new network block device storage attachment from an NBD Uniform Resource Indicator (URI) represented as a URL, timeout value, and read-only and synchronization modes that you provide.
Getting information about the attachment point ¶
- VZNetworkBlockDeviceStorageDeviceAttachment.ForcedReadOnly: Returns a Boolean value that indicates whether the underlying disk attachment network is in a read-only state.
- VZNetworkBlockDeviceStorageDeviceAttachment.SynchronizationMode: The mode in which the NBD client synchronizes data with the NBD server.
- VZNetworkBlockDeviceStorageDeviceAttachment.Timeout: The timeout value in seconds for the connection between the client and server.
- VZNetworkBlockDeviceStorageDeviceAttachment.URL: The URL that refers to the NBD server to which the NBD client will connect.
Observing changes to the network block device ¶
- VZNetworkBlockDeviceStorageDeviceAttachment.Delegate: The object that receives messages about changes to the network block device attachment.
- VZNetworkBlockDeviceStorageDeviceAttachment.SetDelegate
See: https://developer.apple.com/documentation/Virtualization/VZNetworkBlockDeviceStorageDeviceAttachment
func NewNetworkBlockDeviceStorageDeviceAttachmentWithURLError ¶
func NewNetworkBlockDeviceStorageDeviceAttachmentWithURLError(URL foundation.INSURL) (VZNetworkBlockDeviceStorageDeviceAttachment, error)
Creates a new network block device (NBD) storage attachment from an NDB Uniform Resource Indicator (URI) represented as a URL that you provide.
URL: The NBD’s URI represented as a URL.
func NewNetworkBlockDeviceStorageDeviceAttachmentWithURLTimeoutForcedReadOnlySynchronizationModeError ¶
func NewNetworkBlockDeviceStorageDeviceAttachmentWithURLTimeoutForcedReadOnlySynchronizationModeError(URL foundation.INSURL, timeout float64, forcedReadOnly bool, synchronizationMode VZDiskSynchronizationMode) (VZNetworkBlockDeviceStorageDeviceAttachment, error)
Creates a new network block device storage attachment from an NBD Uniform Resource Indicator (URI) represented as a URL, timeout value, and read-only and synchronization modes that you provide.
URL: The NBD’s URI represented as a URL.
timeout: The timeout value in seconds for the connection between the client and server. When the timeout expires, an attempt to reconnect with the server takes place.
forcedReadOnly: If true, the framework forces the disk attachment to be read-only, regardless of whether or not the NBD server supports write requests. // true: https://developer.apple.com/documentation/Swift/true
synchronizationMode: The mode in which the disk attachment synchronizes data with the underlying storage device.
Discussion ¶
The `forcedReadOnly` parameter affects how framework exposes the NBD client to the guest operating system by the storage controller. As part of the NBD protocol, the NBD server advertises whether or not the disk exposed by the NBD client is read-only during the handshake phase of the protocol. Setting `forcedReadOnly` to true forces the NBD client to show up as read-only to the guest regardless of whether or not the NBD server advertises itself as read-only.
func NewVZNetworkBlockDeviceStorageDeviceAttachment ¶
func NewVZNetworkBlockDeviceStorageDeviceAttachment() VZNetworkBlockDeviceStorageDeviceAttachment
NewVZNetworkBlockDeviceStorageDeviceAttachment creates a new VZNetworkBlockDeviceStorageDeviceAttachment instance.
func VZNetworkBlockDeviceStorageDeviceAttachmentFromID ¶
func VZNetworkBlockDeviceStorageDeviceAttachmentFromID(id objc.ID) VZNetworkBlockDeviceStorageDeviceAttachment
VZNetworkBlockDeviceStorageDeviceAttachmentFromID constructs a VZNetworkBlockDeviceStorageDeviceAttachment from an objc.ID.
A storage device attachment backed by a Network Block Device (NBD) client.
func (VZNetworkBlockDeviceStorageDeviceAttachment) Autorelease ¶
func (n VZNetworkBlockDeviceStorageDeviceAttachment) Autorelease() VZNetworkBlockDeviceStorageDeviceAttachment
Autorelease adds the receiver to the current autorelease pool.
func (VZNetworkBlockDeviceStorageDeviceAttachment) Delegate ¶
func (n VZNetworkBlockDeviceStorageDeviceAttachment) Delegate() VZNetworkBlockDeviceStorageDeviceAttachmentDelegate
The object that receives messages about changes to the network block device attachment.
func (VZNetworkBlockDeviceStorageDeviceAttachment) ForcedReadOnly ¶
func (n VZNetworkBlockDeviceStorageDeviceAttachment) ForcedReadOnly() bool
Returns a Boolean value that indicates whether the underlying disk attachment network is in a read-only state.
Discussion ¶
The `forcedReadOnly` parameter affects how the Virtualization framework exposes the network block device (NBD) client to the guest operating system by the storage controller.
As part of the NBD protocol, during the handshake phase, the server advertises whether or not the disk the server exposes is read-only. Setting `forcedReadOnly` to true forces the NBD client to show up as read-only to the guest regardless of whether or not the NBD server advertises itself as read-only.
func (VZNetworkBlockDeviceStorageDeviceAttachment) Init ¶
func (n VZNetworkBlockDeviceStorageDeviceAttachment) Init() VZNetworkBlockDeviceStorageDeviceAttachment
Init initializes the instance.
func (VZNetworkBlockDeviceStorageDeviceAttachment) InitWithURLError ¶
func (n VZNetworkBlockDeviceStorageDeviceAttachment) InitWithURLError(URL foundation.INSURL) (VZNetworkBlockDeviceStorageDeviceAttachment, error)
Creates a new network block device (NBD) storage attachment from an NDB Uniform Resource Indicator (URI) represented as a URL that you provide.
URL: The NBD’s URI represented as a URL.
func (VZNetworkBlockDeviceStorageDeviceAttachment) InitWithURLTimeoutForcedReadOnlySynchronizationModeError ¶
func (n VZNetworkBlockDeviceStorageDeviceAttachment) InitWithURLTimeoutForcedReadOnlySynchronizationModeError(URL foundation.INSURL, timeout float64, forcedReadOnly bool, synchronizationMode VZDiskSynchronizationMode) (VZNetworkBlockDeviceStorageDeviceAttachment, error)
Creates a new network block device storage attachment from an NBD Uniform Resource Indicator (URI) represented as a URL, timeout value, and read-only and synchronization modes that you provide.
URL: The NBD’s URI represented as a URL.
timeout: The timeout value in seconds for the connection between the client and server. When the timeout expires, an attempt to reconnect with the server takes place.
forcedReadOnly: If true, the framework forces the disk attachment to be read-only, regardless of whether or not the NBD server supports write requests. // true: https://developer.apple.com/documentation/Swift/true
synchronizationMode: The mode in which the disk attachment synchronizes data with the underlying storage device.
Discussion ¶
The `forcedReadOnly` parameter affects how framework exposes the NBD client to the guest operating system by the storage controller. As part of the NBD protocol, the NBD server advertises whether or not the disk exposed by the NBD client is read-only during the handshake phase of the protocol. Setting `forcedReadOnly` to true forces the NBD client to show up as read-only to the guest regardless of whether or not the NBD server advertises itself as read-only.
func (VZNetworkBlockDeviceStorageDeviceAttachment) SetDelegate ¶
func (n VZNetworkBlockDeviceStorageDeviceAttachment) SetDelegate(value VZNetworkBlockDeviceStorageDeviceAttachmentDelegate)
func (VZNetworkBlockDeviceStorageDeviceAttachment) SynchronizationMode ¶
func (n VZNetworkBlockDeviceStorageDeviceAttachment) SynchronizationMode() VZDiskSynchronizationMode
The mode in which the NBD client synchronizes data with the NBD server.
Discussion ¶
See VZDiskSynchronizationMode for details on how the specific mode affects data synchronization between the NBD client and server.
func (VZNetworkBlockDeviceStorageDeviceAttachment) Timeout ¶
func (n VZNetworkBlockDeviceStorageDeviceAttachment) Timeout() float64
The timeout value in seconds for the connection between the client and server.
Discussion ¶
When the timeout expires, the client attempts to reconnect with the server. If after several retries, the client can’t reestablish a connection to the server, the framework invokes the [AttachmentDidEncounterError] delegate method.
func (VZNetworkBlockDeviceStorageDeviceAttachment) URL ¶
func (n VZNetworkBlockDeviceStorageDeviceAttachment) URL() foundation.INSURL
The URL that refers to the NBD server to which the NBD client will connect.
type VZNetworkBlockDeviceStorageDeviceAttachmentClass ¶
type VZNetworkBlockDeviceStorageDeviceAttachmentClass struct {
// contains filtered or unexported fields
}
func GetVZNetworkBlockDeviceStorageDeviceAttachmentClass ¶
func GetVZNetworkBlockDeviceStorageDeviceAttachmentClass() VZNetworkBlockDeviceStorageDeviceAttachmentClass
GetVZNetworkBlockDeviceStorageDeviceAttachmentClass returns the class object for VZNetworkBlockDeviceStorageDeviceAttachment.
func (VZNetworkBlockDeviceStorageDeviceAttachmentClass) Alloc ¶
func (vc VZNetworkBlockDeviceStorageDeviceAttachmentClass) Alloc() VZNetworkBlockDeviceStorageDeviceAttachment
Alloc allocates memory for a new instance of the class.
func (VZNetworkBlockDeviceStorageDeviceAttachmentClass) ValidateURLError ¶
func (_VZNetworkBlockDeviceStorageDeviceAttachmentClass VZNetworkBlockDeviceStorageDeviceAttachmentClass) ValidateURLError(URL foundation.INSURL) (bool, error)
Checks if the URL is a valid network block device URL.
URL: The NBD URL to validate.
Discussion ¶
This method checks that the URL is well-formed; however, it doesn’t attempt to access the URL. See the NBD URL specification on GitHub for more detailed descriptions of valid URIs.
type VZNetworkBlockDeviceStorageDeviceAttachmentDelegate ¶
type VZNetworkBlockDeviceStorageDeviceAttachmentDelegate interface {
objectivec.IObject
}
Methods you implement to respond to changes to a network block device attachment.
type VZNetworkBlockDeviceStorageDeviceAttachmentDelegateConfig ¶
type VZNetworkBlockDeviceStorageDeviceAttachmentDelegateConfig struct {
// Responding to connectivity changes
// AttachmentDidEncounterError — The method the attachment object calls when the NBD client encounters a nonrecoverable error.
AttachmentDidEncounterError func(attachment VZNetworkBlockDeviceStorageDeviceAttachment, error_ foundation.NSError)
// AttachmentWasConnected — The method the attachment object calls when the NBD client successfully connects or reconnects with the server.
AttachmentWasConnected func(attachment VZNetworkBlockDeviceStorageDeviceAttachment)
}
VZNetworkBlockDeviceStorageDeviceAttachmentDelegateConfig holds optional typed callbacks for VZNetworkBlockDeviceStorageDeviceAttachmentDelegate methods. Set non-nil fields to register the corresponding Objective-C delegate method. Methods with nil callbacks are not registered, so [NSObject.RespondsToSelector] returns false for them — matching the Objective-C delegate pattern exactly.
See Apple Documentation for protocol details.
type VZNetworkBlockDeviceStorageDeviceAttachmentDelegateObject ¶
type VZNetworkBlockDeviceStorageDeviceAttachmentDelegateObject struct {
objectivec.Object
}
VZNetworkBlockDeviceStorageDeviceAttachmentDelegateObject wraps an existing Objective-C object that conforms to the VZNetworkBlockDeviceStorageDeviceAttachmentDelegate protocol.
func NewVZNetworkBlockDeviceStorageDeviceAttachmentDelegate ¶
func NewVZNetworkBlockDeviceStorageDeviceAttachmentDelegate(config VZNetworkBlockDeviceStorageDeviceAttachmentDelegateConfig) VZNetworkBlockDeviceStorageDeviceAttachmentDelegateObject
NewVZNetworkBlockDeviceStorageDeviceAttachmentDelegate creates an Objective-C object implementing the VZNetworkBlockDeviceStorageDeviceAttachmentDelegate protocol.
Each call registers a unique Objective-C class containing only the methods set in config. This means [NSObject.RespondsToSelector] works correctly for optional delegate methods — only non-nil callbacks are registered.
The returned VZNetworkBlockDeviceStorageDeviceAttachmentDelegateObject satisfies the VZNetworkBlockDeviceStorageDeviceAttachmentDelegate interface and can be passed directly to SetDelegate and similar methods.
See Apple Documentation for protocol details.
func VZNetworkBlockDeviceStorageDeviceAttachmentDelegateObjectFromID ¶
func VZNetworkBlockDeviceStorageDeviceAttachmentDelegateObjectFromID(id objc.ID) VZNetworkBlockDeviceStorageDeviceAttachmentDelegateObject
VZNetworkBlockDeviceStorageDeviceAttachmentDelegateObjectFromID constructs a VZNetworkBlockDeviceStorageDeviceAttachmentDelegateObject from an objc.ID. The object is determined to conform to the protocol at runtime.
func (VZNetworkBlockDeviceStorageDeviceAttachmentDelegateObject) AttachmentDidEncounterError ¶
func (o VZNetworkBlockDeviceStorageDeviceAttachmentDelegateObject) AttachmentDidEncounterError(attachment IVZNetworkBlockDeviceStorageDeviceAttachment, error_ foundation.INSError)
The method the attachment object calls when the NBD client encounters a nonrecoverable error.
attachment: The attachment object calling the delegate method.
error: An [NSError] that describes the nonrecoverable error. // [NSError]: https://developer.apple.com/documentation/Foundation/NSError
Discussion ¶
After the attachment object calls this method, the NBD client is in a nonfunctional state.
func (VZNetworkBlockDeviceStorageDeviceAttachmentDelegateObject) AttachmentWasConnected ¶
func (o VZNetworkBlockDeviceStorageDeviceAttachmentDelegateObject) AttachmentWasConnected(attachment IVZNetworkBlockDeviceStorageDeviceAttachment)
The method the attachment object calls when the NBD client successfully connects or reconnects with the server.
attachment: The attachment object calling the delegate method.
Discussion ¶
Connection with the server takes place when the VM is first started, and reconnection attempts take place when the connection times out or when the NBD client has encountered a recoverable error, such as an I/O error from the server. The Virtualization framework may call this method multiple times during a VM’s life cycle. Reconnections are transparent to the guest.
func (VZNetworkBlockDeviceStorageDeviceAttachmentDelegateObject) BaseObject ¶
func (o VZNetworkBlockDeviceStorageDeviceAttachmentDelegateObject) BaseObject() objectivec.Object
type VZNetworkDevice ¶
type VZNetworkDevice struct {
objectivec.Object
}
A base class that represents a network device in a virtual machine.
Overview ¶
Don’t instantiate a VZNetworkDevice directly. When you create a VZVirtualMachineConfiguration instance with a VZVirtualMachineConfiguration the system creates the number of network devices based on the number of VZVirtioNetworkDeviceConfiguration objects you specify in the VM configuration. Before initializing the virtual machine (VM), validate the configuration using [ValidateWithError] to ensure the user’s computer supports the number of network and other devices you’ve specified.
For many purposes, a single network that uses a Network Address Translation (NAT) attachment and connects the VM to the host computer’s network is sufficient. You can use additional network interfaces for purposes of your own design, such as:
- Bridging several physical interfaces to connect to multiple networks. - Using the file descriptor attachment to create specialized connections for different purposes.
You access the network devices through the VZVirtualMachine.VZNetworkDevice.NetworkDevices property. The network devices map to their respective configurations in a one to one relationship, where index `i` of `VZVirtualMachine.NetworkDevices()` corresponds to the network device configuration at index `i` set on VZVirtualMachineConfiguration.VZNetworkDevice.NetworkDevices.
Getting the network attachment point ¶
- VZNetworkDevice.Attachment: The network attachment that’s connected to this network device.
- VZNetworkDevice.SetAttachment
See: https://developer.apple.com/documentation/Virtualization/VZNetworkDevice
func NewVZNetworkDevice ¶
func NewVZNetworkDevice() VZNetworkDevice
NewVZNetworkDevice creates a new VZNetworkDevice instance.
func VZNetworkDeviceFromID ¶
func VZNetworkDeviceFromID(id objc.ID) VZNetworkDevice
VZNetworkDeviceFromID constructs a VZNetworkDevice from an objc.ID.
A base class that represents a network device in a virtual machine.
func (VZNetworkDevice) Attachment ¶
func (n VZNetworkDevice) Attachment() IVZNetworkDeviceAttachment
The network attachment that’s connected to this network device.
Discussion ¶
Setting this property results in an attempt to change the network device attachment which may fail. If the devices fails to attach, the system invokes [VirtualMachineNetworkDeviceAttachmentWasDisconnectedWithError] and sets this property to `nil`. This property may change at any time while the VM is running based on the state of the host network.
See: https://developer.apple.com/documentation/Virtualization/VZNetworkDevice/attachment
func (VZNetworkDevice) Autorelease ¶
func (n VZNetworkDevice) Autorelease() VZNetworkDevice
Autorelease adds the receiver to the current autorelease pool.
func (VZNetworkDevice) Init ¶
func (n VZNetworkDevice) Init() VZNetworkDevice
Init initializes the instance.
func (VZNetworkDevice) NetworkDevices ¶
func (n VZNetworkDevice) NetworkDevices() IVZNetworkDevice
The list of configured network devices on the VM.
See: https://developer.apple.com/documentation/virtualization/vzvirtualmachine/networkdevices
func (VZNetworkDevice) SetAttachment ¶
func (n VZNetworkDevice) SetAttachment(value IVZNetworkDeviceAttachment)
func (VZNetworkDevice) SetNetworkDevices ¶
func (n VZNetworkDevice) SetNetworkDevices(value IVZNetworkDevice)
type VZNetworkDeviceAttachment ¶
type VZNetworkDeviceAttachment struct {
objectivec.Object
}
The common behaviors for the network attachment points of your virtual machine.
Overview ¶
Don’t create a VZNetworkDeviceAttachment object directly. Instead, instantiate one of its concrete subclasses and use that object to configure your network devices. Each concrete subclass represents a specific type of network interface on the host computer.
See: https://developer.apple.com/documentation/Virtualization/VZNetworkDeviceAttachment
func NewVZNetworkDeviceAttachment ¶
func NewVZNetworkDeviceAttachment() VZNetworkDeviceAttachment
NewVZNetworkDeviceAttachment creates a new VZNetworkDeviceAttachment instance.
func VZNetworkDeviceAttachmentFromID ¶
func VZNetworkDeviceAttachmentFromID(id objc.ID) VZNetworkDeviceAttachment
VZNetworkDeviceAttachmentFromID constructs a VZNetworkDeviceAttachment from an objc.ID.
The common behaviors for the network attachment points of your virtual machine.
func (VZNetworkDeviceAttachment) Autorelease ¶
func (n VZNetworkDeviceAttachment) Autorelease() VZNetworkDeviceAttachment
Autorelease adds the receiver to the current autorelease pool.
func (VZNetworkDeviceAttachment) Init ¶
func (n VZNetworkDeviceAttachment) Init() VZNetworkDeviceAttachment
Init initializes the instance.
type VZNetworkDeviceAttachmentClass ¶
type VZNetworkDeviceAttachmentClass struct {
// contains filtered or unexported fields
}
func GetVZNetworkDeviceAttachmentClass ¶
func GetVZNetworkDeviceAttachmentClass() VZNetworkDeviceAttachmentClass
GetVZNetworkDeviceAttachmentClass returns the class object for VZNetworkDeviceAttachment.
func (VZNetworkDeviceAttachmentClass) Alloc ¶
func (vc VZNetworkDeviceAttachmentClass) Alloc() VZNetworkDeviceAttachment
Alloc allocates memory for a new instance of the class.
type VZNetworkDeviceClass ¶
type VZNetworkDeviceClass struct {
// contains filtered or unexported fields
}
func GetVZNetworkDeviceClass ¶
func GetVZNetworkDeviceClass() VZNetworkDeviceClass
GetVZNetworkDeviceClass returns the class object for VZNetworkDevice.
func (VZNetworkDeviceClass) Alloc ¶
func (vc VZNetworkDeviceClass) Alloc() VZNetworkDevice
Alloc allocates memory for a new instance of the class.
type VZNetworkDeviceConfiguration ¶
type VZNetworkDeviceConfiguration struct {
objectivec.Object
}
The common configuration traits for network devices.
Overview ¶
Don’t instantiate the VZNetworkDeviceConfiguration class directly. Instead, instantiate one of its subclasses, such as VZVirtioNetworkDeviceConfiguration. Then use the properties of this class to configure the network device.
Setting configuration attributes ¶
- VZNetworkDeviceConfiguration.Attachment: The object that defines how the virtual network device communicates with the host system.
- VZNetworkDeviceConfiguration.SetAttachment
- VZNetworkDeviceConfiguration.MACAddress: The media access control (MAC) address to assign to the network device.
- VZNetworkDeviceConfiguration.SetMACAddress
See: https://developer.apple.com/documentation/Virtualization/VZNetworkDeviceConfiguration
func NewVZNetworkDeviceConfiguration ¶
func NewVZNetworkDeviceConfiguration() VZNetworkDeviceConfiguration
NewVZNetworkDeviceConfiguration creates a new VZNetworkDeviceConfiguration instance.
func VZNetworkDeviceConfigurationFromID ¶
func VZNetworkDeviceConfigurationFromID(id objc.ID) VZNetworkDeviceConfiguration
VZNetworkDeviceConfigurationFromID constructs a VZNetworkDeviceConfiguration from an objc.ID.
The common configuration traits for network devices.
func (VZNetworkDeviceConfiguration) Attachment ¶
func (n VZNetworkDeviceConfiguration) Attachment() IVZNetworkDeviceAttachment
The object that defines how the virtual network device communicates with the host system.
Discussion ¶
The default value of this property is `nil`. Assign an appropriate value to specify the type of network interface you want to make available to the guest operating system. For example, assign a VZBridgedNetworkDeviceAttachment object to grant access to one of the host computer’s physical network interfaces.
See: https://developer.apple.com/documentation/Virtualization/VZNetworkDeviceConfiguration/attachment
func (VZNetworkDeviceConfiguration) Autorelease ¶
func (n VZNetworkDeviceConfiguration) Autorelease() VZNetworkDeviceConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZNetworkDeviceConfiguration) Init ¶
func (n VZNetworkDeviceConfiguration) Init() VZNetworkDeviceConfiguration
Init initializes the instance.
func (VZNetworkDeviceConfiguration) MACAddress ¶
func (n VZNetworkDeviceConfiguration) MACAddress() IVZMACAddress
The media access control (MAC) address to assign to the network device.
Discussion ¶
The default value of this property is a random, locally administered, unicast address. Assign a custom value to this property if you want your network device to have a specific MAC address.
See: https://developer.apple.com/documentation/Virtualization/VZNetworkDeviceConfiguration/macAddress
func (VZNetworkDeviceConfiguration) SetAttachment ¶
func (n VZNetworkDeviceConfiguration) SetAttachment(value IVZNetworkDeviceAttachment)
func (VZNetworkDeviceConfiguration) SetMACAddress ¶
func (n VZNetworkDeviceConfiguration) SetMACAddress(value IVZMACAddress)
type VZNetworkDeviceConfigurationClass ¶
type VZNetworkDeviceConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZNetworkDeviceConfigurationClass ¶
func GetVZNetworkDeviceConfigurationClass() VZNetworkDeviceConfigurationClass
GetVZNetworkDeviceConfigurationClass returns the class object for VZNetworkDeviceConfiguration.
func (VZNetworkDeviceConfigurationClass) Alloc ¶
func (vc VZNetworkDeviceConfigurationClass) Alloc() VZNetworkDeviceConfiguration
Alloc allocates memory for a new instance of the class.
type VZPlatformConfiguration ¶
type VZPlatformConfiguration struct {
objectivec.Object
}
The base class for a platform configuration.
Overview ¶
Don’t instantiate directly VZPlatformConfiguration, use one of its subclasses, such as VZGenericPlatformConfiguration or VZMacPlatformConfiguration instead.
See: https://developer.apple.com/documentation/Virtualization/VZPlatformConfiguration
func NewVZPlatformConfiguration ¶
func NewVZPlatformConfiguration() VZPlatformConfiguration
NewVZPlatformConfiguration creates a new VZPlatformConfiguration instance.
func VZPlatformConfigurationFromID ¶
func VZPlatformConfigurationFromID(id objc.ID) VZPlatformConfiguration
VZPlatformConfigurationFromID constructs a VZPlatformConfiguration from an objc.ID.
The base class for a platform configuration.
func (VZPlatformConfiguration) Autorelease ¶
func (p VZPlatformConfiguration) Autorelease() VZPlatformConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZPlatformConfiguration) Init ¶
func (p VZPlatformConfiguration) Init() VZPlatformConfiguration
Init initializes the instance.
type VZPlatformConfigurationClass ¶
type VZPlatformConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZPlatformConfigurationClass ¶
func GetVZPlatformConfigurationClass() VZPlatformConfigurationClass
GetVZPlatformConfigurationClass returns the class object for VZPlatformConfiguration.
func (VZPlatformConfigurationClass) Alloc ¶
func (vc VZPlatformConfigurationClass) Alloc() VZPlatformConfiguration
Alloc allocates memory for a new instance of the class.
type VZPointingDeviceConfiguration ¶
type VZPointingDeviceConfiguration struct {
objectivec.Object
}
The base class for a pointing device configuration.
Overview ¶
Don’t instantiate a VZPointingDeviceConfiguration directly, use one of its subclasses like VZUSBScreenCoordinatePointingDeviceConfiguration instead.
See: https://developer.apple.com/documentation/Virtualization/VZPointingDeviceConfiguration
func NewVZPointingDeviceConfiguration ¶
func NewVZPointingDeviceConfiguration() VZPointingDeviceConfiguration
NewVZPointingDeviceConfiguration creates a new VZPointingDeviceConfiguration instance.
func VZPointingDeviceConfigurationFromID ¶
func VZPointingDeviceConfigurationFromID(id objc.ID) VZPointingDeviceConfiguration
VZPointingDeviceConfigurationFromID constructs a VZPointingDeviceConfiguration from an objc.ID.
The base class for a pointing device configuration.
func (VZPointingDeviceConfiguration) Autorelease ¶
func (p VZPointingDeviceConfiguration) Autorelease() VZPointingDeviceConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZPointingDeviceConfiguration) Init ¶
func (p VZPointingDeviceConfiguration) Init() VZPointingDeviceConfiguration
Init initializes the instance.
type VZPointingDeviceConfigurationClass ¶
type VZPointingDeviceConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZPointingDeviceConfigurationClass ¶
func GetVZPointingDeviceConfigurationClass() VZPointingDeviceConfigurationClass
GetVZPointingDeviceConfigurationClass returns the class object for VZPointingDeviceConfiguration.
func (VZPointingDeviceConfigurationClass) Alloc ¶
func (vc VZPointingDeviceConfigurationClass) Alloc() VZPointingDeviceConfiguration
Alloc allocates memory for a new instance of the class.
type VZSerialPortAttachment ¶
type VZSerialPortAttachment struct {
objectivec.Object
}
The common behaviors for the serial attachment points of your virtual machine.
Overview ¶
Don’t create a VZSerialPortAttachment object directly. Instead, instantiate a concrete subclass such as VZFileHandleSerialPortAttachment to configure how the virtual machine’s serial port connects with the host computer.
See: https://developer.apple.com/documentation/Virtualization/VZSerialPortAttachment
func NewVZSerialPortAttachment ¶
func NewVZSerialPortAttachment() VZSerialPortAttachment
NewVZSerialPortAttachment creates a new VZSerialPortAttachment instance.
func VZSerialPortAttachmentFromID ¶
func VZSerialPortAttachmentFromID(id objc.ID) VZSerialPortAttachment
VZSerialPortAttachmentFromID constructs a VZSerialPortAttachment from an objc.ID.
The common behaviors for the serial attachment points of your virtual machine.
func (VZSerialPortAttachment) Autorelease ¶
func (s VZSerialPortAttachment) Autorelease() VZSerialPortAttachment
Autorelease adds the receiver to the current autorelease pool.
func (VZSerialPortAttachment) Init ¶
func (s VZSerialPortAttachment) Init() VZSerialPortAttachment
Init initializes the instance.
type VZSerialPortAttachmentClass ¶
type VZSerialPortAttachmentClass struct {
// contains filtered or unexported fields
}
func GetVZSerialPortAttachmentClass ¶
func GetVZSerialPortAttachmentClass() VZSerialPortAttachmentClass
GetVZSerialPortAttachmentClass returns the class object for VZSerialPortAttachment.
func (VZSerialPortAttachmentClass) Alloc ¶
func (vc VZSerialPortAttachmentClass) Alloc() VZSerialPortAttachment
Alloc allocates memory for a new instance of the class.
type VZSerialPortConfiguration ¶
type VZSerialPortConfiguration struct {
objectivec.Object
}
The common configuration traits for serial port requests.
Overview ¶
Don’t create a VZSerialPortConfiguration object directly. Instead, instantiate a concrete instance of one of its subclasses, such as VZVirtioConsoleDeviceConfiguration. Use the VZSerialPortConfiguration.Attachment property of this class to configure the medium through which serial communication happens.
Configuring the Attachment Point ¶
- VZSerialPortConfiguration.Attachment: The object that defines how the configuration of the virtual machine’s serial port interfaces.
- VZSerialPortConfiguration.SetAttachment
See: https://developer.apple.com/documentation/Virtualization/VZSerialPortConfiguration
func NewVZSerialPortConfiguration ¶
func NewVZSerialPortConfiguration() VZSerialPortConfiguration
NewVZSerialPortConfiguration creates a new VZSerialPortConfiguration instance.
func VZSerialPortConfigurationFromID ¶
func VZSerialPortConfigurationFromID(id objc.ID) VZSerialPortConfiguration
VZSerialPortConfigurationFromID constructs a VZSerialPortConfiguration from an objc.ID.
The common configuration traits for serial port requests.
func (VZSerialPortConfiguration) Attachment ¶
func (s VZSerialPortConfiguration) Attachment() IVZSerialPortAttachment
The object that defines how the configuration of the virtual machine’s serial port interfaces.
Discussion ¶
Assign an appropriate attachment object to this property, such as a VZFileHandleSerialPortAttachment or VZFileSerialPortAttachment object. When configuring the serial ports, the virtual machine uses the attachment to set up the serial port communications.
See: https://developer.apple.com/documentation/Virtualization/VZSerialPortConfiguration/attachment
func (VZSerialPortConfiguration) Autorelease ¶
func (s VZSerialPortConfiguration) Autorelease() VZSerialPortConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZSerialPortConfiguration) Init ¶
func (s VZSerialPortConfiguration) Init() VZSerialPortConfiguration
Init initializes the instance.
func (VZSerialPortConfiguration) SetAttachment ¶
func (s VZSerialPortConfiguration) SetAttachment(value IVZSerialPortAttachment)
type VZSerialPortConfigurationClass ¶
type VZSerialPortConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZSerialPortConfigurationClass ¶
func GetVZSerialPortConfigurationClass() VZSerialPortConfigurationClass
GetVZSerialPortConfigurationClass returns the class object for VZSerialPortConfiguration.
func (VZSerialPortConfigurationClass) Alloc ¶
func (vc VZSerialPortConfigurationClass) Alloc() VZSerialPortConfiguration
Alloc allocates memory for a new instance of the class.
type VZSharedDirectory ¶
type VZSharedDirectory struct {
}
A directory on the host that you can expose to a guest.
Overview ¶
This exposes a directory from the host file system to the guest.
Creating a Shared Directory ¶
- VZSharedDirectory.InitWithURLReadOnly: Initialize with a host directory.
Accessing Directory Properties ¶
- VZSharedDirectory.URL: A file URL to a directory on the host system to expose to the guest.
- VZSharedDirectory.ReadOnly: A Boolean value that indicates whether the directory is read-only to the guest.
See: https://developer.apple.com/documentation/Virtualization/VZSharedDirectory
func NewSharedDirectoryWithURLReadOnly ¶
func NewSharedDirectoryWithURLReadOnly(url foundation.INSURL, readOnly bool) VZSharedDirectory
Initialize with a host directory.
url: A local file URL to expose to the guest.
readOnly: A Boolean value that indicates whether to expose the directory as read-only to the guest.
Discussion ¶
See: https://developer.apple.com/documentation/Virtualization/VZSharedDirectory/init(url:readOnly:)
func NewVZSharedDirectory ¶
func NewVZSharedDirectory() VZSharedDirectory
NewVZSharedDirectory creates a new VZSharedDirectory instance.
func VZSharedDirectoryFromID ¶
func VZSharedDirectoryFromID(id objc.ID) VZSharedDirectory
VZSharedDirectoryFromID constructs a VZSharedDirectory from an objc.ID.
A directory on the host that you can expose to a guest.
func (VZSharedDirectory) Autorelease ¶
func (s VZSharedDirectory) Autorelease() VZSharedDirectory
Autorelease adds the receiver to the current autorelease pool.
func (VZSharedDirectory) Init ¶
func (s VZSharedDirectory) Init() VZSharedDirectory
Init initializes the instance.
func (VZSharedDirectory) InitWithURLReadOnly ¶
func (s VZSharedDirectory) InitWithURLReadOnly(url foundation.INSURL, readOnly bool) VZSharedDirectory
Initialize with a host directory.
url: A local file URL to expose to the guest.
readOnly: A Boolean value that indicates whether to expose the directory as read-only to the guest.
Discussion ¶
See: https://developer.apple.com/documentation/Virtualization/VZSharedDirectory/init(url:readOnly:)
func (VZSharedDirectory) ReadOnly ¶
func (s VZSharedDirectory) ReadOnly() bool
A Boolean value that indicates whether the directory is read-only to the guest.
See: https://developer.apple.com/documentation/Virtualization/VZSharedDirectory/isReadOnly
func (VZSharedDirectory) URL ¶
func (s VZSharedDirectory) URL() foundation.INSURL
A file URL to a directory on the host system to expose to the guest.
Discussion ¶
The URL must point to an existing directory path in the host file system.
See: https://developer.apple.com/documentation/Virtualization/VZSharedDirectory/url
type VZSharedDirectoryClass ¶
type VZSharedDirectoryClass struct {
// contains filtered or unexported fields
}
func GetVZSharedDirectoryClass ¶
func GetVZSharedDirectoryClass() VZSharedDirectoryClass
GetVZSharedDirectoryClass returns the class object for VZSharedDirectory.
func (VZSharedDirectoryClass) Alloc ¶
func (vc VZSharedDirectoryClass) Alloc() VZSharedDirectory
Alloc allocates memory for a new instance of the class.
type VZSingleDirectoryShare ¶
type VZSingleDirectoryShare struct {
}
An object that defines the directory share for a single directory.
Overview ¶
This directory share exposes a single directory from the host file system to the guest.
Creating a directory share ¶
- VZSingleDirectoryShare.InitWithDirectory: Creates a directory share with a directory that you specify on the host.
Accessing directory properties ¶
- VZSingleDirectoryShare.Directory: The directory on the host to share with the guest VM.
See: https://developer.apple.com/documentation/Virtualization/VZSingleDirectoryShare
func NewSingleDirectoryShareWithDirectory ¶
func NewSingleDirectoryShareWithDirectory(directory IVZSharedDirectory) VZSingleDirectoryShare
Creates a directory share with a directory that you specify on the host.
directory: The directory to share.
Discussion ¶
Use this method to share a directory on the host system with the guest VM.
See: https://developer.apple.com/documentation/Virtualization/VZSingleDirectoryShare/init(directory:)
func NewVZSingleDirectoryShare ¶
func NewVZSingleDirectoryShare() VZSingleDirectoryShare
NewVZSingleDirectoryShare creates a new VZSingleDirectoryShare instance.
func VZSingleDirectoryShareFromID ¶
func VZSingleDirectoryShareFromID(id objc.ID) VZSingleDirectoryShare
VZSingleDirectoryShareFromID constructs a VZSingleDirectoryShare from an objc.ID.
An object that defines the directory share for a single directory.
func (VZSingleDirectoryShare) Autorelease ¶
func (s VZSingleDirectoryShare) Autorelease() VZSingleDirectoryShare
Autorelease adds the receiver to the current autorelease pool.
func (VZSingleDirectoryShare) Directory ¶
func (s VZSingleDirectoryShare) Directory() IVZSharedDirectory
The directory on the host to share with the guest VM.
See: https://developer.apple.com/documentation/Virtualization/VZSingleDirectoryShare/directory
func (VZSingleDirectoryShare) Init ¶
func (s VZSingleDirectoryShare) Init() VZSingleDirectoryShare
Init initializes the instance.
func (VZSingleDirectoryShare) InitWithDirectory ¶
func (s VZSingleDirectoryShare) InitWithDirectory(directory IVZSharedDirectory) VZSingleDirectoryShare
Creates a directory share with a directory that you specify on the host.
directory: The directory to share.
Discussion ¶
Use this method to share a directory on the host system with the guest VM.
See: https://developer.apple.com/documentation/Virtualization/VZSingleDirectoryShare/init(directory:)
type VZSingleDirectoryShareClass ¶
type VZSingleDirectoryShareClass struct {
// contains filtered or unexported fields
}
func GetVZSingleDirectoryShareClass ¶
func GetVZSingleDirectoryShareClass() VZSingleDirectoryShareClass
GetVZSingleDirectoryShareClass returns the class object for VZSingleDirectoryShare.
func (VZSingleDirectoryShareClass) Alloc ¶
func (vc VZSingleDirectoryShareClass) Alloc() VZSingleDirectoryShare
Alloc allocates memory for a new instance of the class.
type VZSocketDevice ¶
type VZSocketDevice struct {
objectivec.Object
}
The common behavior of socket devices.
Overview ¶
Don’t create or use a VZSocketDevice object directly. If your virtual machine’s configuration includes a VZVirtioSocketDeviceConfiguration object, the virtual machine returns a VZVirtioSocketDevice object in its VZSocketDevice.SocketDevices property. Use that object to configure the port-based communications for your virtual machine.
See: https://developer.apple.com/documentation/Virtualization/VZSocketDevice
func NewVZSocketDevice ¶
func NewVZSocketDevice() VZSocketDevice
NewVZSocketDevice creates a new VZSocketDevice instance.
func VZSocketDeviceFromID ¶
func VZSocketDeviceFromID(id objc.ID) VZSocketDevice
VZSocketDeviceFromID constructs a VZSocketDevice from an objc.ID.
The common behavior of socket devices.
func (VZSocketDevice) Autorelease ¶
func (s VZSocketDevice) Autorelease() VZSocketDevice
Autorelease adds the receiver to the current autorelease pool.
func (VZSocketDevice) Init ¶
func (s VZSocketDevice) Init() VZSocketDevice
Init initializes the instance.
func (VZSocketDevice) SetSocketDevices ¶
func (s VZSocketDevice) SetSocketDevices(value IVZSocketDevice)
func (VZSocketDevice) SocketDevices ¶
func (s VZSocketDevice) SocketDevices() IVZSocketDevice
The array of socket devices that the VM configures for use ports in the guest VM.
See: https://developer.apple.com/documentation/virtualization/vzvirtualmachine/socketdevices
type VZSocketDeviceClass ¶
type VZSocketDeviceClass struct {
// contains filtered or unexported fields
}
func GetVZSocketDeviceClass ¶
func GetVZSocketDeviceClass() VZSocketDeviceClass
GetVZSocketDeviceClass returns the class object for VZSocketDevice.
func (VZSocketDeviceClass) Alloc ¶
func (vc VZSocketDeviceClass) Alloc() VZSocketDevice
Alloc allocates memory for a new instance of the class.
type VZSocketDeviceConfiguration ¶
type VZSocketDeviceConfiguration struct {
objectivec.Object
}
The common configuration traits for socket device requests.
Overview ¶
Don’t create a VZSocketDeviceConfiguration object directly. Instead, create a VZVirtioSocketDeviceConfiguration object and add it to your virtual machine’s configuration.
See: https://developer.apple.com/documentation/Virtualization/VZSocketDeviceConfiguration
func NewVZSocketDeviceConfiguration ¶
func NewVZSocketDeviceConfiguration() VZSocketDeviceConfiguration
NewVZSocketDeviceConfiguration creates a new VZSocketDeviceConfiguration instance.
func VZSocketDeviceConfigurationFromID ¶
func VZSocketDeviceConfigurationFromID(id objc.ID) VZSocketDeviceConfiguration
VZSocketDeviceConfigurationFromID constructs a VZSocketDeviceConfiguration from an objc.ID.
The common configuration traits for socket device requests.
func (VZSocketDeviceConfiguration) Autorelease ¶
func (s VZSocketDeviceConfiguration) Autorelease() VZSocketDeviceConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZSocketDeviceConfiguration) Init ¶
func (s VZSocketDeviceConfiguration) Init() VZSocketDeviceConfiguration
Init initializes the instance.
type VZSocketDeviceConfigurationClass ¶
type VZSocketDeviceConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZSocketDeviceConfigurationClass ¶
func GetVZSocketDeviceConfigurationClass() VZSocketDeviceConfigurationClass
GetVZSocketDeviceConfigurationClass returns the class object for VZSocketDeviceConfiguration.
func (VZSocketDeviceConfigurationClass) Alloc ¶
func (vc VZSocketDeviceConfigurationClass) Alloc() VZSocketDeviceConfiguration
Alloc allocates memory for a new instance of the class.
type VZSpiceAgentPortAttachment ¶
type VZSpiceAgentPortAttachment struct {
VZSerialPortAttachment
}
An attachment point that enables the Spice clipboard sharing capability.
Enabling clipboard sharing between the host and the VM ¶
- VZSpiceAgentPortAttachment.SharesClipboard: A Boolean value that indicates whether the framework needs to share the clipboard between the host and the VM.
- VZSpiceAgentPortAttachment.SetSharesClipboard
See: https://developer.apple.com/documentation/Virtualization/VZSpiceAgentPortAttachment
func NewVZSpiceAgentPortAttachment ¶
func NewVZSpiceAgentPortAttachment() VZSpiceAgentPortAttachment
NewVZSpiceAgentPortAttachment creates a new VZSpiceAgentPortAttachment instance.
func VZSpiceAgentPortAttachmentFromID ¶
func VZSpiceAgentPortAttachmentFromID(id objc.ID) VZSpiceAgentPortAttachment
VZSpiceAgentPortAttachmentFromID constructs a VZSpiceAgentPortAttachment from an objc.ID.
An attachment point that enables the Spice clipboard sharing capability.
func (VZSpiceAgentPortAttachment) Autorelease ¶
func (s VZSpiceAgentPortAttachment) Autorelease() VZSpiceAgentPortAttachment
Autorelease adds the receiver to the current autorelease pool.
func (VZSpiceAgentPortAttachment) Init ¶
func (s VZSpiceAgentPortAttachment) Init() VZSpiceAgentPortAttachment
Init initializes the instance.
func (VZSpiceAgentPortAttachment) SetSharesClipboard ¶
func (s VZSpiceAgentPortAttachment) SetSharesClipboard(value bool)
func (VZSpiceAgentPortAttachment) SharesClipboard ¶
func (s VZSpiceAgentPortAttachment) SharesClipboard() bool
A Boolean value that indicates whether the framework needs to share the clipboard between the host and the VM.
See: https://developer.apple.com/documentation/Virtualization/VZSpiceAgentPortAttachment/sharesClipboard
type VZSpiceAgentPortAttachmentClass ¶
type VZSpiceAgentPortAttachmentClass struct {
// contains filtered or unexported fields
}
func GetVZSpiceAgentPortAttachmentClass ¶
func GetVZSpiceAgentPortAttachmentClass() VZSpiceAgentPortAttachmentClass
GetVZSpiceAgentPortAttachmentClass returns the class object for VZSpiceAgentPortAttachment.
func (VZSpiceAgentPortAttachmentClass) Alloc ¶
func (vc VZSpiceAgentPortAttachmentClass) Alloc() VZSpiceAgentPortAttachment
Alloc allocates memory for a new instance of the class.
func (VZSpiceAgentPortAttachmentClass) SpiceAgentPortName ¶
func (_VZSpiceAgentPortAttachmentClass VZSpiceAgentPortAttachmentClass) SpiceAgentPortName() string
The name of the Virtio console port for the Spice guest agent.
type VZStorageDevice ¶
type VZStorageDevice struct {
objectivec.Object
}
A class that represents a storage device in a VM.
Overview ¶
Don’t create a VZStorageDevice directly. Use one of its subclasses, such as VZUSBMassStorageDevice, instead.
See: https://developer.apple.com/documentation/Virtualization/VZStorageDevice
func NewVZStorageDevice ¶
func NewVZStorageDevice() VZStorageDevice
NewVZStorageDevice creates a new VZStorageDevice instance.
func VZStorageDeviceFromID ¶
func VZStorageDeviceFromID(id objc.ID) VZStorageDevice
VZStorageDeviceFromID constructs a VZStorageDevice from an objc.ID.
A class that represents a storage device in a VM.
func (VZStorageDevice) Autorelease ¶
func (s VZStorageDevice) Autorelease() VZStorageDevice
Autorelease adds the receiver to the current autorelease pool.
func (VZStorageDevice) Init ¶
func (s VZStorageDevice) Init() VZStorageDevice
Init initializes the instance.
type VZStorageDeviceAttachment ¶
type VZStorageDeviceAttachment struct {
objectivec.Object
}
The common behaviors for storage devices in the guest system.
Overview ¶
A VZStorageDeviceAttachment object defines the implementation of a storage interface in a virtual machine. You use the attachment object to specify the source of the storage on the host computer.
Don’t create VZStorageDeviceAttachment objects directly. Instead, instantiate an appropriate subclass such as VZDiskImageStorageDeviceAttachment, which provides storage using a disk image.
See: https://developer.apple.com/documentation/Virtualization/VZStorageDeviceAttachment
func NewVZStorageDeviceAttachment ¶
func NewVZStorageDeviceAttachment() VZStorageDeviceAttachment
NewVZStorageDeviceAttachment creates a new VZStorageDeviceAttachment instance.
func VZStorageDeviceAttachmentFromID ¶
func VZStorageDeviceAttachmentFromID(id objc.ID) VZStorageDeviceAttachment
VZStorageDeviceAttachmentFromID constructs a VZStorageDeviceAttachment from an objc.ID.
The common behaviors for storage devices in the guest system.
func (VZStorageDeviceAttachment) Autorelease ¶
func (s VZStorageDeviceAttachment) Autorelease() VZStorageDeviceAttachment
Autorelease adds the receiver to the current autorelease pool.
func (VZStorageDeviceAttachment) Init ¶
func (s VZStorageDeviceAttachment) Init() VZStorageDeviceAttachment
Init initializes the instance.
type VZStorageDeviceAttachmentClass ¶
type VZStorageDeviceAttachmentClass struct {
// contains filtered or unexported fields
}
func GetVZStorageDeviceAttachmentClass ¶
func GetVZStorageDeviceAttachmentClass() VZStorageDeviceAttachmentClass
GetVZStorageDeviceAttachmentClass returns the class object for VZStorageDeviceAttachment.
func (VZStorageDeviceAttachmentClass) Alloc ¶
func (vc VZStorageDeviceAttachmentClass) Alloc() VZStorageDeviceAttachment
Alloc allocates memory for a new instance of the class.
type VZStorageDeviceClass ¶
type VZStorageDeviceClass struct {
// contains filtered or unexported fields
}
func GetVZStorageDeviceClass ¶
func GetVZStorageDeviceClass() VZStorageDeviceClass
GetVZStorageDeviceClass returns the class object for VZStorageDevice.
func (VZStorageDeviceClass) Alloc ¶
func (vc VZStorageDeviceClass) Alloc() VZStorageDevice
Alloc allocates memory for a new instance of the class.
type VZStorageDeviceConfiguration ¶
type VZStorageDeviceConfiguration struct {
objectivec.Object
}
The common configuration traits for storage device requests.
Overview ¶
Don’t create a VZStorageDeviceConfiguration object directly. Instead, instantiate one of its subclasses, such as VZVirtioBlockDeviceConfiguration. Use the VZStorageDeviceConfiguration.Attachment property of this class to access the device’s underlying storage.
Getting the attachment point ¶
- VZStorageDeviceConfiguration.Attachment: The attachment object that provides the underlying storage for the device.
See: https://developer.apple.com/documentation/Virtualization/VZStorageDeviceConfiguration
func NewVZStorageDeviceConfiguration ¶
func NewVZStorageDeviceConfiguration() VZStorageDeviceConfiguration
NewVZStorageDeviceConfiguration creates a new VZStorageDeviceConfiguration instance.
func VZStorageDeviceConfigurationFromID ¶
func VZStorageDeviceConfigurationFromID(id objc.ID) VZStorageDeviceConfiguration
VZStorageDeviceConfigurationFromID constructs a VZStorageDeviceConfiguration from an objc.ID.
The common configuration traits for storage device requests.
func (VZStorageDeviceConfiguration) Attachment ¶
func (s VZStorageDeviceConfiguration) Attachment() IVZStorageDeviceAttachment
The attachment object that provides the underlying storage for the device.
Discussion ¶
The attachment object defines which local resource on the host computer appears as a disk in the virtual machine.
See: https://developer.apple.com/documentation/Virtualization/VZStorageDeviceConfiguration/attachment
func (VZStorageDeviceConfiguration) Autorelease ¶
func (s VZStorageDeviceConfiguration) Autorelease() VZStorageDeviceConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZStorageDeviceConfiguration) Init ¶
func (s VZStorageDeviceConfiguration) Init() VZStorageDeviceConfiguration
Init initializes the instance.
type VZStorageDeviceConfigurationClass ¶
type VZStorageDeviceConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZStorageDeviceConfigurationClass ¶
func GetVZStorageDeviceConfigurationClass() VZStorageDeviceConfigurationClass
GetVZStorageDeviceConfigurationClass returns the class object for VZStorageDeviceConfiguration.
func (VZStorageDeviceConfigurationClass) Alloc ¶
func (vc VZStorageDeviceConfigurationClass) Alloc() VZStorageDeviceConfiguration
Alloc allocates memory for a new instance of the class.
type VZUSBController ¶
type VZUSBController struct {
objectivec.Object
}
A class that represents a USB controller in a VM.
Overview ¶
Don’t create a VZUSBController directly. You need to first configure USB controllers on a VZVirtualMachineConfiguration through a subclass of VZUSBControllerConfiguration. When you create a VZVirtualMachine from the configuration, the USB controllers are available through the VZUSBController.UsbControllers property.
The concrete type of a VZUSBController corresponds to the type the configuration uses. For example, a VZXHCIControllerConfiguration leads to a device of type VZXHCIController.
Instance properties ¶
- VZUSBController.UsbDevices: The list of attached USB devices for the controller.
Attaching and detaching devices ¶
- VZUSBController.AttachDeviceCompletionHandler: Attaches a USB device to the controller.
- VZUSBController.DetachDeviceCompletionHandler: Detaches a USB device from the controller.
See: https://developer.apple.com/documentation/Virtualization/VZUSBController
func NewVZUSBController ¶
func NewVZUSBController() VZUSBController
NewVZUSBController creates a new VZUSBController instance.
func VZUSBControllerFromID ¶
func VZUSBControllerFromID(id objc.ID) VZUSBController
VZUSBControllerFromID constructs a VZUSBController from an objc.ID.
A class that represents a USB controller in a VM.
func (VZUSBController) AttachDevice ¶
func (u VZUSBController) AttachDevice(ctx context.Context, device VZUSBDevice) error
AttachDevice is a synchronous wrapper around VZUSBController.AttachDeviceCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (VZUSBController) AttachDeviceCompletionHandler ¶
func (u VZUSBController) AttachDeviceCompletionHandler(device VZUSBDevice, completionHandler ErrorHandler)
Attaches a USB device to the controller.
device: The USB device to attach.
completionHandler: A block the framework calls after the device attaches, or on an error. The error parameter that passes to the block is `nil` if attaching is successful. The framework calls the block on a VM’s queue.
Discussion ¶
If the device successfully attaches to the controller, it appears in the [UsbDevices] property, the framework sets its [UsbController] property to point to the attached USB controller, and the completion handler returns `nil`.
If the device has a previous attachment to the current USB controller, or to another USB controller, the attach function fails with [ErrorDeviceAlreadyAttached]. If the controller can’t initialize the device correctly, the attach function fails with [ErrorDeviceInitializationFailure].
You need to call this method on the virtual machine’s queue.
func (VZUSBController) Autorelease ¶
func (u VZUSBController) Autorelease() VZUSBController
Autorelease adds the receiver to the current autorelease pool.
func (VZUSBController) DetachDevice ¶
func (u VZUSBController) DetachDevice(ctx context.Context, device VZUSBDevice) error
DetachDevice is a synchronous wrapper around VZUSBController.DetachDeviceCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (VZUSBController) DetachDeviceCompletionHandler ¶
func (u VZUSBController) DetachDeviceCompletionHandler(device VZUSBDevice, completionHandler ErrorHandler)
Detaches a USB device from the controller.
device: The USB device to detach.
completionHandler: A block the framework calls after the device detaches, or on an error. The error parameter that passes to the block is `nil` if detaching the device is successful. The framework calls the block on a VM’s queue.
Discussion ¶
If the device successfully detaches from the controller, it disappears from the [UsbDevices] property, the framework sets its [UsbController] property to `nil,` and the completion handler returns `nil`.
If the device doesn’t have an attachment to the controller at the time of calling the detach method, the process fails with [ErrorDeviceNotFound].
You need to call this method on the virtual machine’s queue.
func (VZUSBController) Init ¶
func (u VZUSBController) Init() VZUSBController
Init initializes the instance.
func (VZUSBController) SetUsbControllers ¶
func (u VZUSBController) SetUsbControllers(value IVZUSBController)
func (VZUSBController) UsbControllers ¶
func (u VZUSBController) UsbControllers() IVZUSBController
The list of runtime USB controller objects.
See: https://developer.apple.com/documentation/virtualization/vzvirtualmachine/usbcontrollers
func (VZUSBController) UsbDevices ¶
func (u VZUSBController) UsbDevices() []objectivec.IObject
The list of attached USB devices for the controller.
Discussion ¶
If a VZVirtualMachineConfiguration contains a USB controller configuration that contains USB devices, those devices appear in the list when you start the virtual machine.
See: https://developer.apple.com/documentation/Virtualization/VZUSBController/usbDevices
type VZUSBControllerClass ¶
type VZUSBControllerClass struct {
// contains filtered or unexported fields
}
func GetVZUSBControllerClass ¶
func GetVZUSBControllerClass() VZUSBControllerClass
GetVZUSBControllerClass returns the class object for VZUSBController.
func (VZUSBControllerClass) Alloc ¶
func (vc VZUSBControllerClass) Alloc() VZUSBController
Alloc allocates memory for a new instance of the class.
type VZUSBControllerConfiguration ¶
type VZUSBControllerConfiguration struct {
objectivec.Object
}
The base class for a USB controller configuration.
Overview ¶
Don’t create VZUSBControllerConfiguration objects directly. Use one of its subclasses, such as VZXHCIControllerConfiguration, instead.
Instance properties ¶
- VZUSBControllerConfiguration.UsbDevices: The list of USB devices.
- VZUSBControllerConfiguration.SetUsbDevices
See: https://developer.apple.com/documentation/Virtualization/VZUSBControllerConfiguration
func NewVZUSBControllerConfiguration ¶
func NewVZUSBControllerConfiguration() VZUSBControllerConfiguration
NewVZUSBControllerConfiguration creates a new VZUSBControllerConfiguration instance.
func VZUSBControllerConfigurationFromID ¶
func VZUSBControllerConfigurationFromID(id objc.ID) VZUSBControllerConfiguration
VZUSBControllerConfigurationFromID constructs a VZUSBControllerConfiguration from an objc.ID.
The base class for a USB controller configuration.
func (VZUSBControllerConfiguration) Autorelease ¶
func (u VZUSBControllerConfiguration) Autorelease() VZUSBControllerConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZUSBControllerConfiguration) Init ¶
func (u VZUSBControllerConfiguration) Init() VZUSBControllerConfiguration
Init initializes the instance.
func (VZUSBControllerConfiguration) SetUsbDevices ¶
func (u VZUSBControllerConfiguration) SetUsbDevices(value []objectivec.IObject)
func (VZUSBControllerConfiguration) UsbDevices ¶
func (u VZUSBControllerConfiguration) UsbDevices() []objectivec.IObject
The list of USB devices.
Discussion ¶
This list represents a set of USB devices that a VM starts with. For each entry in the list, the system creates a corresponding runtime object in the [UsbDevices] property.
The list is empty by default.
See: https://developer.apple.com/documentation/Virtualization/VZUSBControllerConfiguration/usbDevices
type VZUSBControllerConfigurationClass ¶
type VZUSBControllerConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZUSBControllerConfigurationClass ¶
func GetVZUSBControllerConfigurationClass() VZUSBControllerConfigurationClass
GetVZUSBControllerConfigurationClass returns the class object for VZUSBControllerConfiguration.
func (VZUSBControllerConfigurationClass) Alloc ¶
func (vc VZUSBControllerConfigurationClass) Alloc() VZUSBControllerConfiguration
Alloc allocates memory for a new instance of the class.
type VZUSBDevice ¶
type VZUSBDevice interface {
objectivec.IObject
// The USB controller that has an attachment to the device.
//
// See: https://developer.apple.com/documentation/Virtualization/VZUSBDevice/usbController
UsbController() IVZUSBController
// The device’s unique identifier.
//
// See: https://developer.apple.com/documentation/Virtualization/VZUSBDevice/uuid
Uuid() foundation.NSUUID
}
A protocol that represents a USB device in a VM.
See: https://developer.apple.com/documentation/Virtualization/VZUSBDevice
type VZUSBDeviceConfiguration ¶
type VZUSBDeviceConfiguration interface {
objectivec.IObject
// The device’s unique identifier.
//
// See: https://developer.apple.com/documentation/Virtualization/VZUSBDeviceConfiguration/uuid
Uuid() foundation.NSUUID
// The device’s unique identifier.
//
// See: https://developer.apple.com/documentation/Virtualization/VZUSBDeviceConfiguration/uuid
SetUuid(value foundation.NSUUID)
}
The protocol for configuring USB devices.
See: https://developer.apple.com/documentation/Virtualization/VZUSBDeviceConfiguration
type VZUSBDeviceConfigurationObject ¶
type VZUSBDeviceConfigurationObject struct {
objectivec.Object
}
VZUSBDeviceConfigurationObject wraps an existing Objective-C object that conforms to the VZUSBDeviceConfiguration protocol.
func VZUSBDeviceConfigurationObjectFromID ¶
func VZUSBDeviceConfigurationObjectFromID(id objc.ID) VZUSBDeviceConfigurationObject
VZUSBDeviceConfigurationObjectFromID constructs a VZUSBDeviceConfigurationObject from an objc.ID. The object is determined to conform to the protocol at runtime.
func (VZUSBDeviceConfigurationObject) BaseObject ¶
func (o VZUSBDeviceConfigurationObject) BaseObject() objectivec.Object
func (VZUSBDeviceConfigurationObject) SetUuid ¶
func (o VZUSBDeviceConfigurationObject) SetUuid(value foundation.NSUUID)
func (VZUSBDeviceConfigurationObject) Uuid ¶
func (o VZUSBDeviceConfigurationObject) Uuid() foundation.NSUUID
The device’s unique identifier.
See: https://developer.apple.com/documentation/Virtualization/VZUSBDeviceConfiguration/uuid
type VZUSBDeviceObject ¶
type VZUSBDeviceObject struct {
objectivec.Object
}
VZUSBDeviceObject wraps an existing Objective-C object that conforms to the VZUSBDevice protocol.
func VZUSBDeviceObjectFromID ¶
func VZUSBDeviceObjectFromID(id objc.ID) VZUSBDeviceObject
VZUSBDeviceObjectFromID constructs a VZUSBDeviceObject from an objc.ID. The object is determined to conform to the protocol at runtime.
func (VZUSBDeviceObject) BaseObject ¶
func (o VZUSBDeviceObject) BaseObject() objectivec.Object
func (VZUSBDeviceObject) UsbController ¶
func (o VZUSBDeviceObject) UsbController() IVZUSBController
The USB controller that has an attachment to the device.
See: https://developer.apple.com/documentation/Virtualization/VZUSBDevice/usbController
func (VZUSBDeviceObject) Uuid ¶
func (o VZUSBDeviceObject) Uuid() foundation.NSUUID
The device’s unique identifier.
See: https://developer.apple.com/documentation/Virtualization/VZUSBDevice/uuid
type VZUSBKeyboardConfiguration ¶
type VZUSBKeyboardConfiguration struct {
VZKeyboardConfiguration
}
A device that defines the configuration for a USB keyboard.
Overview ¶
A VZVirtualMachineView can use this device to send key events to the VM.
See: https://developer.apple.com/documentation/Virtualization/VZUSBKeyboardConfiguration
func NewVZUSBKeyboardConfiguration ¶
func NewVZUSBKeyboardConfiguration() VZUSBKeyboardConfiguration
NewVZUSBKeyboardConfiguration creates a new VZUSBKeyboardConfiguration instance.
func VZUSBKeyboardConfigurationFromID ¶
func VZUSBKeyboardConfigurationFromID(id objc.ID) VZUSBKeyboardConfiguration
VZUSBKeyboardConfigurationFromID constructs a VZUSBKeyboardConfiguration from an objc.ID.
A device that defines the configuration for a USB keyboard.
func (VZUSBKeyboardConfiguration) Autorelease ¶
func (u VZUSBKeyboardConfiguration) Autorelease() VZUSBKeyboardConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZUSBKeyboardConfiguration) Init ¶
func (u VZUSBKeyboardConfiguration) Init() VZUSBKeyboardConfiguration
Init initializes the instance.
type VZUSBKeyboardConfigurationClass ¶
type VZUSBKeyboardConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZUSBKeyboardConfigurationClass ¶
func GetVZUSBKeyboardConfigurationClass() VZUSBKeyboardConfigurationClass
GetVZUSBKeyboardConfigurationClass returns the class object for VZUSBKeyboardConfiguration.
func (VZUSBKeyboardConfigurationClass) Alloc ¶
func (vc VZUSBKeyboardConfigurationClass) Alloc() VZUSBKeyboardConfiguration
Alloc allocates memory for a new instance of the class.
type VZUSBMassStorageDevice ¶
type VZUSBMassStorageDevice struct {
VZStorageDevice
}
A class that represents a hot-pluggable USB mass storage device.
Overview ¶
Create this device either by instantiating it directly and passing VZUSBMassStorageDeviceConfiguration to its initializer, or instantiating a VZUSBMassStorageDeviceConfiguration in a VZVirtualMachineConfiguration. Direct instantiation creates an object that you can pass to [AttachDeviceCompletionHandler]. Instantiation through VZUSBMassStorageDeviceConfiguration makes the device available in the VZUSBMassStorageDevice.UsbDevices property.
Creating a USB mass storage device ¶
- VZUSBMassStorageDevice.InitWithConfiguration: Creates a USB mass storage device with the provided configuration.
See: https://developer.apple.com/documentation/Virtualization/VZUSBMassStorageDevice
func NewUSBMassStorageDeviceWithConfiguration ¶
func NewUSBMassStorageDeviceWithConfiguration(configuration IVZUSBMassStorageDeviceConfiguration) VZUSBMassStorageDevice
Creates a USB mass storage device with the provided configuration.
configuration: The USB mass storage configuration.
See: https://developer.apple.com/documentation/Virtualization/VZUSBMassStorageDevice/init(configuration:)
func NewVZUSBMassStorageDevice ¶
func NewVZUSBMassStorageDevice() VZUSBMassStorageDevice
NewVZUSBMassStorageDevice creates a new VZUSBMassStorageDevice instance.
func VZUSBMassStorageDeviceFromID ¶
func VZUSBMassStorageDeviceFromID(id objc.ID) VZUSBMassStorageDevice
VZUSBMassStorageDeviceFromID constructs a VZUSBMassStorageDevice from an objc.ID.
A class that represents a hot-pluggable USB mass storage device.
func (VZUSBMassStorageDevice) Autorelease ¶
func (u VZUSBMassStorageDevice) Autorelease() VZUSBMassStorageDevice
Autorelease adds the receiver to the current autorelease pool.
func (VZUSBMassStorageDevice) Init ¶
func (u VZUSBMassStorageDevice) Init() VZUSBMassStorageDevice
Init initializes the instance.
func (VZUSBMassStorageDevice) InitWithConfiguration ¶
func (u VZUSBMassStorageDevice) InitWithConfiguration(configuration IVZUSBMassStorageDeviceConfiguration) VZUSBMassStorageDevice
Creates a USB mass storage device with the provided configuration.
configuration: The USB mass storage configuration.
See: https://developer.apple.com/documentation/Virtualization/VZUSBMassStorageDevice/init(configuration:)
func (VZUSBMassStorageDevice) SetUsbDevices ¶
func (u VZUSBMassStorageDevice) SetUsbDevices(value VZUSBDevice)
func (VZUSBMassStorageDevice) UsbController ¶
func (u VZUSBMassStorageDevice) UsbController() IVZUSBController
The USB controller that has an attachment to the device.
Discussion ¶
If a USB device object that conforms to this protocol has a current attachment to a USB controller, this property includes a pointer to the device’s USB controller object. Otherwise, it’s `nil`.
See: https://developer.apple.com/documentation/Virtualization/VZUSBDevice/usbController
func (VZUSBMassStorageDevice) UsbDevices ¶
func (u VZUSBMassStorageDevice) UsbDevices() VZUSBDevice
The list of attached USB devices for the controller.
See: https://developer.apple.com/documentation/virtualization/vzusbcontroller/usbdevices
func (VZUSBMassStorageDevice) Uuid ¶
func (u VZUSBMassStorageDevice) Uuid() foundation.NSUUID
The device’s unique identifier.
Discussion ¶
This is the identifier the system creates from device configuration objects that conform to VZUSBDeviceConfiguration.
See: https://developer.apple.com/documentation/Virtualization/VZUSBDevice/uuid
type VZUSBMassStorageDeviceClass ¶
type VZUSBMassStorageDeviceClass struct {
// contains filtered or unexported fields
}
func GetVZUSBMassStorageDeviceClass ¶
func GetVZUSBMassStorageDeviceClass() VZUSBMassStorageDeviceClass
GetVZUSBMassStorageDeviceClass returns the class object for VZUSBMassStorageDevice.
func (VZUSBMassStorageDeviceClass) Alloc ¶
func (vc VZUSBMassStorageDeviceClass) Alloc() VZUSBMassStorageDevice
Alloc allocates memory for a new instance of the class.
type VZUSBMassStorageDeviceConfiguration ¶
type VZUSBMassStorageDeviceConfiguration struct {
VZStorageDeviceConfiguration
}
The configuration object that represents a USB Mass storage device.
Creating the configuration object ¶
- VZUSBMassStorageDeviceConfiguration.InitWithAttachment: Creates a new storage device configuration with the specified attachment.
See: https://developer.apple.com/documentation/Virtualization/VZUSBMassStorageDeviceConfiguration
func NewUSBMassStorageDeviceConfigurationWithAttachment ¶
func NewUSBMassStorageDeviceConfigurationWithAttachment(attachment IVZStorageDeviceAttachment) VZUSBMassStorageDeviceConfiguration
Creates a new storage device configuration with the specified attachment.
attachment: A VZStorageDeviceAttachment object.
func NewVZUSBMassStorageDeviceConfiguration ¶
func NewVZUSBMassStorageDeviceConfiguration() VZUSBMassStorageDeviceConfiguration
NewVZUSBMassStorageDeviceConfiguration creates a new VZUSBMassStorageDeviceConfiguration instance.
func VZUSBMassStorageDeviceConfigurationFromID ¶
func VZUSBMassStorageDeviceConfigurationFromID(id objc.ID) VZUSBMassStorageDeviceConfiguration
VZUSBMassStorageDeviceConfigurationFromID constructs a VZUSBMassStorageDeviceConfiguration from an objc.ID.
The configuration object that represents a USB Mass storage device.
func (VZUSBMassStorageDeviceConfiguration) Autorelease ¶
func (u VZUSBMassStorageDeviceConfiguration) Autorelease() VZUSBMassStorageDeviceConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZUSBMassStorageDeviceConfiguration) InitWithAttachment ¶
func (u VZUSBMassStorageDeviceConfiguration) InitWithAttachment(attachment IVZStorageDeviceAttachment) VZUSBMassStorageDeviceConfiguration
Creates a new storage device configuration with the specified attachment.
attachment: A VZStorageDeviceAttachment object.
func (VZUSBMassStorageDeviceConfiguration) SetUuid ¶
func (u VZUSBMassStorageDeviceConfiguration) SetUuid(value foundation.NSUUID)
func (VZUSBMassStorageDeviceConfiguration) Uuid ¶
func (u VZUSBMassStorageDeviceConfiguration) Uuid() foundation.NSUUID
The device’s unique identifier.
Discussion ¶
The framework autogenerates the device UUID.
Before restoring the VM, you need to set the device’s UUID to the UUID of the device with the attachment at the time of saving the VM’s state.
See: https://developer.apple.com/documentation/Virtualization/VZUSBDeviceConfiguration/uuid
type VZUSBMassStorageDeviceConfigurationClass ¶
type VZUSBMassStorageDeviceConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZUSBMassStorageDeviceConfigurationClass ¶
func GetVZUSBMassStorageDeviceConfigurationClass() VZUSBMassStorageDeviceConfigurationClass
GetVZUSBMassStorageDeviceConfigurationClass returns the class object for VZUSBMassStorageDeviceConfiguration.
func (VZUSBMassStorageDeviceConfigurationClass) Alloc ¶
func (vc VZUSBMassStorageDeviceConfigurationClass) Alloc() VZUSBMassStorageDeviceConfiguration
Alloc allocates memory for a new instance of the class.
type VZUSBScreenCoordinatePointingDeviceConfiguration ¶
type VZUSBScreenCoordinatePointingDeviceConfiguration struct {
VZPointingDeviceConfiguration
}
An object that defines the configuration for a USB pointing device that reports absolute coordinates.
Overview ¶
A VZVirtualMachineView can use this device to send pointer events to the VM.
func NewVZUSBScreenCoordinatePointingDeviceConfiguration ¶
func NewVZUSBScreenCoordinatePointingDeviceConfiguration() VZUSBScreenCoordinatePointingDeviceConfiguration
NewVZUSBScreenCoordinatePointingDeviceConfiguration creates a new VZUSBScreenCoordinatePointingDeviceConfiguration instance.
func VZUSBScreenCoordinatePointingDeviceConfigurationFromID ¶
func VZUSBScreenCoordinatePointingDeviceConfigurationFromID(id objc.ID) VZUSBScreenCoordinatePointingDeviceConfiguration
VZUSBScreenCoordinatePointingDeviceConfigurationFromID constructs a VZUSBScreenCoordinatePointingDeviceConfiguration from an objc.ID.
An object that defines the configuration for a USB pointing device that reports absolute coordinates.
func (VZUSBScreenCoordinatePointingDeviceConfiguration) Autorelease ¶
func (u VZUSBScreenCoordinatePointingDeviceConfiguration) Autorelease() VZUSBScreenCoordinatePointingDeviceConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZUSBScreenCoordinatePointingDeviceConfiguration) Init ¶
func (u VZUSBScreenCoordinatePointingDeviceConfiguration) Init() VZUSBScreenCoordinatePointingDeviceConfiguration
Init initializes the instance.
type VZUSBScreenCoordinatePointingDeviceConfigurationClass ¶
type VZUSBScreenCoordinatePointingDeviceConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZUSBScreenCoordinatePointingDeviceConfigurationClass ¶
func GetVZUSBScreenCoordinatePointingDeviceConfigurationClass() VZUSBScreenCoordinatePointingDeviceConfigurationClass
GetVZUSBScreenCoordinatePointingDeviceConfigurationClass returns the class object for VZUSBScreenCoordinatePointingDeviceConfiguration.
func (VZUSBScreenCoordinatePointingDeviceConfigurationClass) Alloc ¶
func (vc VZUSBScreenCoordinatePointingDeviceConfigurationClass) Alloc() VZUSBScreenCoordinatePointingDeviceConfiguration
Alloc allocates memory for a new instance of the class.
type VZVirtioBlockDeviceConfiguration ¶
type VZVirtioBlockDeviceConfiguration struct {
VZStorageDeviceConfiguration
}
The configuration object that requests the creation of a virtual storage device in the guest system.
Overview ¶
Use a VZVirtioBlockDeviceConfiguration object to create an emulated storage device in your virtual machine. When you add this object to your virtual machine configuration, the virtual machine creates an emulated disk for the guest operating system to use to read and write files. The emulated storage device conforms to the Virtio Block Device specification.
When you create a VZVirtioBlockDeviceConfiguration object, specify the attachment object that implements the underlying storage. For example, specify a VZDiskImageStorageDeviceAttachment object to configure the storage device using a disk image in the local file system. Assign your configuration object to the VZVirtioBlockDeviceConfiguration.StorageDevices property of your VZVirtualMachineConfiguration object before creating your virtual machine.
Creating the configuration object ¶
- VZVirtioBlockDeviceConfiguration.InitWithAttachment: Creates a block device configuration object that uses the specified storage medium.
Identifying a block device ¶
- VZVirtioBlockDeviceConfiguration.BlockDeviceIdentifier: The string that identifies the VIRTIO block device.
- VZVirtioBlockDeviceConfiguration.SetBlockDeviceIdentifier
See: https://developer.apple.com/documentation/Virtualization/VZVirtioBlockDeviceConfiguration
func NewVZVirtioBlockDeviceConfiguration ¶
func NewVZVirtioBlockDeviceConfiguration() VZVirtioBlockDeviceConfiguration
NewVZVirtioBlockDeviceConfiguration creates a new VZVirtioBlockDeviceConfiguration instance.
func NewVirtioBlockDeviceConfigurationWithAttachment ¶
func NewVirtioBlockDeviceConfigurationWithAttachment(attachment IVZStorageDeviceAttachment) VZVirtioBlockDeviceConfiguration
Creates a block device configuration object that uses the specified storage medium.
attachment: The attachment object that provides the storage for the device. For example, specify a VZDiskImageStorageDeviceAttachment object to implement the storage using a local disk image on the host computer.
Return Value ¶
A block storage device configuration object to include in your virtual machine’s configuration.
func VZVirtioBlockDeviceConfigurationFromID ¶
func VZVirtioBlockDeviceConfigurationFromID(id objc.ID) VZVirtioBlockDeviceConfiguration
VZVirtioBlockDeviceConfigurationFromID constructs a VZVirtioBlockDeviceConfiguration from an objc.ID.
The configuration object that requests the creation of a virtual storage device in the guest system.
func (VZVirtioBlockDeviceConfiguration) Autorelease ¶
func (v VZVirtioBlockDeviceConfiguration) Autorelease() VZVirtioBlockDeviceConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtioBlockDeviceConfiguration) BlockDeviceIdentifier ¶
func (v VZVirtioBlockDeviceConfiguration) BlockDeviceIdentifier() string
The string that identifies the VIRTIO block device.
Discussion ¶
Use `blockDeviceIdentifier` to name devices so they’re more discoverable in the Linux guest. The identifier must be an ASCII encodable string of 20 bytes or less.
Validate the identifier string using [ValidateBlockDeviceIdentifierError] before attempting to set this property, for example:
In a Linux guest, device identifiers are visible in the `/dev/disk/by-id/` directory.
func (VZVirtioBlockDeviceConfiguration) Init ¶
func (v VZVirtioBlockDeviceConfiguration) Init() VZVirtioBlockDeviceConfiguration
Init initializes the instance.
func (VZVirtioBlockDeviceConfiguration) InitWithAttachment ¶
func (v VZVirtioBlockDeviceConfiguration) InitWithAttachment(attachment IVZStorageDeviceAttachment) VZVirtioBlockDeviceConfiguration
Creates a block device configuration object that uses the specified storage medium.
attachment: The attachment object that provides the storage for the device. For example, specify a VZDiskImageStorageDeviceAttachment object to implement the storage using a local disk image on the host computer.
Return Value ¶
A block storage device configuration object to include in your virtual machine’s configuration.
func (VZVirtioBlockDeviceConfiguration) SetBlockDeviceIdentifier ¶
func (v VZVirtioBlockDeviceConfiguration) SetBlockDeviceIdentifier(value string)
func (VZVirtioBlockDeviceConfiguration) SetStorageDevices ¶
func (v VZVirtioBlockDeviceConfiguration) SetStorageDevices(value IVZStorageDeviceConfiguration)
func (VZVirtioBlockDeviceConfiguration) StorageDevices ¶
func (v VZVirtioBlockDeviceConfiguration) StorageDevices() IVZStorageDeviceConfiguration
The array of storage devices that you expose to the guest operating system.
type VZVirtioBlockDeviceConfigurationClass ¶
type VZVirtioBlockDeviceConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioBlockDeviceConfigurationClass ¶
func GetVZVirtioBlockDeviceConfigurationClass() VZVirtioBlockDeviceConfigurationClass
GetVZVirtioBlockDeviceConfigurationClass returns the class object for VZVirtioBlockDeviceConfiguration.
func (VZVirtioBlockDeviceConfigurationClass) Alloc ¶
func (vc VZVirtioBlockDeviceConfigurationClass) Alloc() VZVirtioBlockDeviceConfiguration
Alloc allocates memory for a new instance of the class.
func (VZVirtioBlockDeviceConfigurationClass) ValidateBlockDeviceIdentifierError ¶
func (_VZVirtioBlockDeviceConfigurationClass VZVirtioBlockDeviceConfigurationClass) ValidateBlockDeviceIdentifierError(blockDeviceIdentifier string) (bool, error)
Checks the validity of a block device identifier.
blockDeviceIdentifier: The device identifier to validate. In the case of an invalid identifier string, the method throws an error that describes why the device identifier isn’t valid.
Discussion ¶
Use [ValidateBlockDeviceIdentifierError] to validate an identifier string before trying to set the [BlockDeviceIdentifier] property. The identifier must be an ASCII encodable string of 20 bytes or less.
type VZVirtioConsoleDevice ¶
type VZVirtioConsoleDevice struct {
VZConsoleDevice
}
A class that represents a Virtio console device in a virtual machine.
Configuring the console ¶
- VZVirtioConsoleDevice.Ports: The array of console ports that a specific device uses.
- VZVirtioConsoleDevice.Delegate: The delegate object for the console device.
- VZVirtioConsoleDevice.SetDelegate
See: https://developer.apple.com/documentation/Virtualization/VZVirtioConsoleDevice
func NewVZVirtioConsoleDevice ¶
func NewVZVirtioConsoleDevice() VZVirtioConsoleDevice
NewVZVirtioConsoleDevice creates a new VZVirtioConsoleDevice instance.
func VZVirtioConsoleDeviceFromID ¶
func VZVirtioConsoleDeviceFromID(id objc.ID) VZVirtioConsoleDevice
VZVirtioConsoleDeviceFromID constructs a VZVirtioConsoleDevice from an objc.ID.
A class that represents a Virtio console device in a virtual machine.
func (VZVirtioConsoleDevice) Autorelease ¶
func (v VZVirtioConsoleDevice) Autorelease() VZVirtioConsoleDevice
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtioConsoleDevice) Delegate ¶
func (v VZVirtioConsoleDevice) Delegate() VZVirtioConsoleDeviceDelegate
The delegate object for the console device.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioConsoleDevice/delegate
func (VZVirtioConsoleDevice) Init ¶
func (v VZVirtioConsoleDevice) Init() VZVirtioConsoleDevice
Init initializes the instance.
func (VZVirtioConsoleDevice) Ports ¶
func (v VZVirtioConsoleDevice) Ports() IVZVirtioConsolePortArray
The array of console ports that a specific device uses.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioConsoleDevice/ports
func (VZVirtioConsoleDevice) SetDelegate ¶
func (v VZVirtioConsoleDevice) SetDelegate(value VZVirtioConsoleDeviceDelegate)
type VZVirtioConsoleDeviceClass ¶
type VZVirtioConsoleDeviceClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioConsoleDeviceClass ¶
func GetVZVirtioConsoleDeviceClass() VZVirtioConsoleDeviceClass
GetVZVirtioConsoleDeviceClass returns the class object for VZVirtioConsoleDevice.
func (VZVirtioConsoleDeviceClass) Alloc ¶
func (vc VZVirtioConsoleDeviceClass) Alloc() VZVirtioConsoleDevice
Alloc allocates memory for a new instance of the class.
type VZVirtioConsoleDeviceConfiguration ¶
type VZVirtioConsoleDeviceConfiguration struct {
VZConsoleDeviceConfiguration
}
A console device that enables communication between the host and the guest using console ports through a Virtio interface.
Overview ¶
A VZVirtioConsoleDeviceConfiguration object enables serial communication between the guest-operating system and host computer through the Virtio interface. The device sets up one or more ports through VZVirtioConsolePortConfiguration on the Virtio console device.
Configuring the console ports ¶
- VZVirtioConsoleDeviceConfiguration.Ports: The list of Virtio port configurations.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioConsoleDeviceConfiguration
func NewVZVirtioConsoleDeviceConfiguration ¶
func NewVZVirtioConsoleDeviceConfiguration() VZVirtioConsoleDeviceConfiguration
NewVZVirtioConsoleDeviceConfiguration creates a new VZVirtioConsoleDeviceConfiguration instance.
func VZVirtioConsoleDeviceConfigurationFromID ¶
func VZVirtioConsoleDeviceConfigurationFromID(id objc.ID) VZVirtioConsoleDeviceConfiguration
VZVirtioConsoleDeviceConfigurationFromID constructs a VZVirtioConsoleDeviceConfiguration from an objc.ID.
A console device that enables communication between the host and the guest using console ports through a Virtio interface.
func (VZVirtioConsoleDeviceConfiguration) Autorelease ¶
func (v VZVirtioConsoleDeviceConfiguration) Autorelease() VZVirtioConsoleDeviceConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtioConsoleDeviceConfiguration) ConsoleDevices ¶
func (v VZVirtioConsoleDeviceConfiguration) ConsoleDevices() IVZConsoleDeviceConfiguration
The array of console devices that you expose to the guest operating system.
func (VZVirtioConsoleDeviceConfiguration) Init ¶
func (v VZVirtioConsoleDeviceConfiguration) Init() VZVirtioConsoleDeviceConfiguration
Init initializes the instance.
func (VZVirtioConsoleDeviceConfiguration) Ports ¶
func (v VZVirtioConsoleDeviceConfiguration) Ports() IVZVirtioConsolePortConfigurationArray
The list of Virtio port configurations.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioConsoleDeviceConfiguration/ports
func (VZVirtioConsoleDeviceConfiguration) SetConsoleDevices ¶
func (v VZVirtioConsoleDeviceConfiguration) SetConsoleDevices(value IVZConsoleDeviceConfiguration)
type VZVirtioConsoleDeviceConfigurationClass ¶
type VZVirtioConsoleDeviceConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioConsoleDeviceConfigurationClass ¶
func GetVZVirtioConsoleDeviceConfigurationClass() VZVirtioConsoleDeviceConfigurationClass
GetVZVirtioConsoleDeviceConfigurationClass returns the class object for VZVirtioConsoleDeviceConfiguration.
func (VZVirtioConsoleDeviceConfigurationClass) Alloc ¶
func (vc VZVirtioConsoleDeviceConfigurationClass) Alloc() VZVirtioConsoleDeviceConfiguration
Alloc allocates memory for a new instance of the class.
type VZVirtioConsoleDeviceDelegate ¶
type VZVirtioConsoleDeviceDelegate interface {
objectivec.IObject
}
Optional methods that you use to respond when a console port opens or closes in the virtual machine.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioConsoleDeviceDelegate
type VZVirtioConsoleDeviceDelegateConfig ¶
type VZVirtioConsoleDeviceDelegateConfig struct {
// Other Methods
// ConsoleDeviceDidOpenPort — Tells the delegate that the framework opened a console port.
ConsoleDeviceDidOpenPort func(consoleDevice VZVirtioConsoleDevice, consolePort VZVirtioConsolePort)
// ConsoleDeviceDidClosePort — Tells the delegate that the framework closed a console port.
ConsoleDeviceDidClosePort func(consoleDevice VZVirtioConsoleDevice, consolePort VZVirtioConsolePort)
}
VZVirtioConsoleDeviceDelegateConfig holds optional typed callbacks for VZVirtioConsoleDeviceDelegate methods. Set non-nil fields to register the corresponding Objective-C delegate method. Methods with nil callbacks are not registered, so [NSObject.RespondsToSelector] returns false for them — matching the Objective-C delegate pattern exactly.
See Apple Documentation for protocol details.
type VZVirtioConsoleDeviceDelegateObject ¶
type VZVirtioConsoleDeviceDelegateObject struct {
objectivec.Object
}
VZVirtioConsoleDeviceDelegateObject wraps an existing Objective-C object that conforms to the VZVirtioConsoleDeviceDelegate protocol.
func NewVZVirtioConsoleDeviceDelegate ¶
func NewVZVirtioConsoleDeviceDelegate(config VZVirtioConsoleDeviceDelegateConfig) VZVirtioConsoleDeviceDelegateObject
NewVZVirtioConsoleDeviceDelegate creates an Objective-C object implementing the VZVirtioConsoleDeviceDelegate protocol.
Each call registers a unique Objective-C class containing only the methods set in config. This means [NSObject.RespondsToSelector] works correctly for optional delegate methods — only non-nil callbacks are registered.
The returned VZVirtioConsoleDeviceDelegateObject satisfies the VZVirtioConsoleDeviceDelegate interface and can be passed directly to SetDelegate and similar methods.
See Apple Documentation for protocol details.
func VZVirtioConsoleDeviceDelegateObjectFromID ¶
func VZVirtioConsoleDeviceDelegateObjectFromID(id objc.ID) VZVirtioConsoleDeviceDelegateObject
VZVirtioConsoleDeviceDelegateObjectFromID constructs a VZVirtioConsoleDeviceDelegateObject from an objc.ID. The object is determined to conform to the protocol at runtime.
func (VZVirtioConsoleDeviceDelegateObject) BaseObject ¶
func (o VZVirtioConsoleDeviceDelegateObject) BaseObject() objectivec.Object
func (VZVirtioConsoleDeviceDelegateObject) ConsoleDeviceDidClosePort ¶
func (o VZVirtioConsoleDeviceDelegateObject) ConsoleDeviceDidClosePort(consoleDevice IVZVirtioConsoleDevice, consolePort IVZVirtioConsolePort)
Tells the delegate that the framework closed a console port.
consoleDevice: The console port’s console device.
consolePort: The VZVirtioConsolePort port that the framework closed.
Discussion ¶
Be sure to finish processing or flushing any remaining data from the VZVirtioConsolePort attachment after closing a port, or the additional data might remain on the serial port.
func (VZVirtioConsoleDeviceDelegateObject) ConsoleDeviceDidOpenPort ¶
func (o VZVirtioConsoleDeviceDelegateObject) ConsoleDeviceDidOpenPort(consoleDevice IVZVirtioConsoleDevice, consolePort IVZVirtioConsolePort)
Tells the delegate that the framework opened a console port.
consoleDevice: The console port’s console device.
consolePort: The VZVirtioConsolePort port that the framework opened.
Discussion ¶
Be sure to process or flush any pending data from the VZVirtioConsolePort attachment before communicating with a new virtual machine process, or additional data might remain on the serial port from the previous session.
type VZVirtioConsoleDeviceSerialPortConfiguration ¶
type VZVirtioConsoleDeviceSerialPortConfiguration struct {
VZSerialPortConfiguration
}
A configuration object that requests the creation of a console device to communicate with the guest system.
Overview ¶
A VZVirtioConsoleDeviceSerialPortConfiguration object enables serial communication between the guest operating system and host computer through the Virtio interface. After you create this configuration object, configure its inherited [VZVirtioConsoleDeviceSerialPortConfiguration.Attachment] property with an object that defines the type of serial communication you want to enable. Use a VZFileHandleSerialPortAttachment object to enable two-way communication between the guest and host, and use a VZFileSerialPortAttachment object to enable one-way communication from the guest to the file you designate.
func NewVZVirtioConsoleDeviceSerialPortConfiguration ¶
func NewVZVirtioConsoleDeviceSerialPortConfiguration() VZVirtioConsoleDeviceSerialPortConfiguration
NewVZVirtioConsoleDeviceSerialPortConfiguration creates a new VZVirtioConsoleDeviceSerialPortConfiguration instance.
func VZVirtioConsoleDeviceSerialPortConfigurationFromID ¶
func VZVirtioConsoleDeviceSerialPortConfigurationFromID(id objc.ID) VZVirtioConsoleDeviceSerialPortConfiguration
VZVirtioConsoleDeviceSerialPortConfigurationFromID constructs a VZVirtioConsoleDeviceSerialPortConfiguration from an objc.ID.
A configuration object that requests the creation of a console device to communicate with the guest system.
func (VZVirtioConsoleDeviceSerialPortConfiguration) Autorelease ¶
func (v VZVirtioConsoleDeviceSerialPortConfiguration) Autorelease() VZVirtioConsoleDeviceSerialPortConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtioConsoleDeviceSerialPortConfiguration) Init ¶
func (v VZVirtioConsoleDeviceSerialPortConfiguration) Init() VZVirtioConsoleDeviceSerialPortConfiguration
Init initializes the instance.
type VZVirtioConsoleDeviceSerialPortConfigurationClass ¶
type VZVirtioConsoleDeviceSerialPortConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioConsoleDeviceSerialPortConfigurationClass ¶
func GetVZVirtioConsoleDeviceSerialPortConfigurationClass() VZVirtioConsoleDeviceSerialPortConfigurationClass
GetVZVirtioConsoleDeviceSerialPortConfigurationClass returns the class object for VZVirtioConsoleDeviceSerialPortConfiguration.
func (VZVirtioConsoleDeviceSerialPortConfigurationClass) Alloc ¶
func (vc VZVirtioConsoleDeviceSerialPortConfigurationClass) Alloc() VZVirtioConsoleDeviceSerialPortConfiguration
Alloc allocates memory for a new instance of the class.
type VZVirtioConsolePort ¶
type VZVirtioConsolePort struct {
objectivec.Object
}
A class that represents a Virtio console port in a VM.
Overview ¶
Don’t instantiate a VZVirtioConsolePort directly. You retrieve this object from the VZVirtioConsoleDevice VZVirtioConsolePort.Ports property.
Configuring the port ¶
- VZVirtioConsolePort.Name: The name of the port.
- VZVirtioConsolePort.Attachment: An array of serial port attachments.
- VZVirtioConsolePort.SetAttachment
See: https://developer.apple.com/documentation/Virtualization/VZVirtioConsolePort
func NewVZVirtioConsolePort ¶
func NewVZVirtioConsolePort() VZVirtioConsolePort
NewVZVirtioConsolePort creates a new VZVirtioConsolePort instance.
func VZVirtioConsolePortFromID ¶
func VZVirtioConsolePortFromID(id objc.ID) VZVirtioConsolePort
VZVirtioConsolePortFromID constructs a VZVirtioConsolePort from an objc.ID.
A class that represents a Virtio console port in a VM.
func (VZVirtioConsolePort) Attachment ¶
func (v VZVirtioConsolePort) Attachment() IVZSerialPortAttachment
An array of serial port attachments.
Discussion ¶
This property may change at any time while the VM is running.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioConsolePort/attachment
func (VZVirtioConsolePort) Autorelease ¶
func (v VZVirtioConsolePort) Autorelease() VZVirtioConsolePort
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtioConsolePort) Init ¶
func (v VZVirtioConsolePort) Init() VZVirtioConsolePort
Init initializes the instance.
func (VZVirtioConsolePort) Name ¶
func (v VZVirtioConsolePort) Name() string
The name of the port.
Discussion ¶
This property can’t change while the VM is running. A null value indicates a name isn’t set.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioConsolePort/name
func (VZVirtioConsolePort) Ports ¶
func (v VZVirtioConsolePort) Ports() IVZVirtioConsolePortArray
The array of console ports that a specific device uses.
See: https://developer.apple.com/documentation/virtualization/vzvirtioconsoledevice/ports
func (VZVirtioConsolePort) SetAttachment ¶
func (v VZVirtioConsolePort) SetAttachment(value IVZSerialPortAttachment)
func (VZVirtioConsolePort) SetPorts ¶
func (v VZVirtioConsolePort) SetPorts(value IVZVirtioConsolePortArray)
type VZVirtioConsolePortArray ¶
type VZVirtioConsolePortArray struct {
objectivec.Object
}
A class that represents a collection of Virtio console ports.
Determining the number of ports ¶
- VZVirtioConsolePortArray.MaximumPortCount: An unsigned integer that represents the maximum number of ports allocated by this device.
Accessing a specific port ¶
- VZVirtioConsolePortArray.ObjectAtIndexedSubscript: Returns the Virtio console port at the specified index.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioConsolePortArray
func NewVZVirtioConsolePortArray ¶
func NewVZVirtioConsolePortArray() VZVirtioConsolePortArray
NewVZVirtioConsolePortArray creates a new VZVirtioConsolePortArray instance.
func VZVirtioConsolePortArrayFromID ¶
func VZVirtioConsolePortArrayFromID(id objc.ID) VZVirtioConsolePortArray
VZVirtioConsolePortArrayFromID constructs a VZVirtioConsolePortArray from an objc.ID.
A class that represents a collection of Virtio console ports.
func (VZVirtioConsolePortArray) Autorelease ¶
func (v VZVirtioConsolePortArray) Autorelease() VZVirtioConsolePortArray
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtioConsolePortArray) Init ¶
func (v VZVirtioConsolePortArray) Init() VZVirtioConsolePortArray
Init initializes the instance.
func (VZVirtioConsolePortArray) MaximumPortCount ¶
func (v VZVirtioConsolePortArray) MaximumPortCount() uint32
An unsigned integer that represents the maximum number of ports allocated by this device.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioConsolePortArray/maximumPortCount
func (VZVirtioConsolePortArray) ObjectAtIndexedSubscript ¶
func (v VZVirtioConsolePortArray) ObjectAtIndexedSubscript(portIndex uint) IVZVirtioConsolePort
Returns the Virtio console port at the specified index.
portIndex: The index of the port to return, if present.
Return Value ¶
A VZVirtioConsolePort port, or `nil` if the index is outside the bounds of the array.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioConsolePortArray/subscript(_:)
type VZVirtioConsolePortArrayClass ¶
type VZVirtioConsolePortArrayClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioConsolePortArrayClass ¶
func GetVZVirtioConsolePortArrayClass() VZVirtioConsolePortArrayClass
GetVZVirtioConsolePortArrayClass returns the class object for VZVirtioConsolePortArray.
func (VZVirtioConsolePortArrayClass) Alloc ¶
func (vc VZVirtioConsolePortArrayClass) Alloc() VZVirtioConsolePortArray
Alloc allocates memory for a new instance of the class.
type VZVirtioConsolePortClass ¶
type VZVirtioConsolePortClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioConsolePortClass ¶
func GetVZVirtioConsolePortClass() VZVirtioConsolePortClass
GetVZVirtioConsolePortClass returns the class object for VZVirtioConsolePort.
func (VZVirtioConsolePortClass) Alloc ¶
func (vc VZVirtioConsolePortClass) Alloc() VZVirtioConsolePort
Alloc allocates memory for a new instance of the class.
type VZVirtioConsolePortConfiguration ¶
type VZVirtioConsolePortConfiguration struct {
VZConsolePortConfiguration
}
A class that represents the configuration options you can set on a Virtio console port.
Overview ¶
A console port is a two-way communication channel between a host VZSerialPortAttachment and a VM console port. A Virtio device can have one or more attached console devices. Optionally, you can set a name for a console port and also configure a console port that the guest can use as the system console.
Configuring the port ¶
- VZVirtioConsolePortConfiguration.IsConsole: A Boolean value that indicates whether this port is a console.
- VZVirtioConsolePortConfiguration.SetIsConsole
- VZVirtioConsolePortConfiguration.Name: The name of the port.
- VZVirtioConsolePortConfiguration.SetName
See: https://developer.apple.com/documentation/Virtualization/VZVirtioConsolePortConfiguration
func NewVZVirtioConsolePortConfiguration ¶
func NewVZVirtioConsolePortConfiguration() VZVirtioConsolePortConfiguration
NewVZVirtioConsolePortConfiguration creates a new VZVirtioConsolePortConfiguration instance.
func VZVirtioConsolePortConfigurationFromID ¶
func VZVirtioConsolePortConfigurationFromID(id objc.ID) VZVirtioConsolePortConfiguration
VZVirtioConsolePortConfigurationFromID constructs a VZVirtioConsolePortConfiguration from an objc.ID.
A class that represents the configuration options you can set on a Virtio console port.
func (VZVirtioConsolePortConfiguration) Autorelease ¶
func (v VZVirtioConsolePortConfiguration) Autorelease() VZVirtioConsolePortConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtioConsolePortConfiguration) ConsoleDevices ¶
func (v VZVirtioConsolePortConfiguration) ConsoleDevices() IVZConsoleDeviceConfiguration
The array of console devices that you expose to the guest operating system.
func (VZVirtioConsolePortConfiguration) Init ¶
func (v VZVirtioConsolePortConfiguration) Init() VZVirtioConsolePortConfiguration
Init initializes the instance.
func (VZVirtioConsolePortConfiguration) IsConsole ¶
func (v VZVirtioConsolePortConfiguration) IsConsole() bool
A Boolean value that indicates whether this port is a console.
Discussion ¶
The framework may mark the console port for use as the system console. The default is `false`.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioConsolePortConfiguration/isConsole
func (VZVirtioConsolePortConfiguration) Name ¶
func (v VZVirtioConsolePortConfiguration) Name() string
The name of the port.
Discussion ¶
The default behavior is to not use a name unless set.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioConsolePortConfiguration/name
func (VZVirtioConsolePortConfiguration) SetConsoleDevices ¶
func (v VZVirtioConsolePortConfiguration) SetConsoleDevices(value IVZConsoleDeviceConfiguration)
func (VZVirtioConsolePortConfiguration) SetIsConsole ¶
func (v VZVirtioConsolePortConfiguration) SetIsConsole(value bool)
func (VZVirtioConsolePortConfiguration) SetName ¶
func (v VZVirtioConsolePortConfiguration) SetName(value string)
type VZVirtioConsolePortConfigurationArray ¶
type VZVirtioConsolePortConfigurationArray struct {
objectivec.Object
}
A class that represents a collection of Virtio console port configurations.
Overview ¶
This array stores a collection of port configurations for a VZVirtioConsoleDeviceConfiguration. The index in the array corresponds to the port index that the VM uses. You can set a VZVirtioConsolePortConfigurationArray.MaximumPortCount value, but the value must be larger than the highest indexed port. If there’s no `maximumPortCount` value set, the framework uses the value the highest indexed port.
Determining the number of ports ¶
- VZVirtioConsolePortConfigurationArray.MaximumPortCount: An unsigned integer that represents the maximum number of ports allocated by this device.
- VZVirtioConsolePortConfigurationArray.SetMaximumPortCount
Accessing a specific port ¶
- VZVirtioConsolePortConfigurationArray.ObjectAtIndexedSubscript: Returns the Virtio console port configuration as the specified index.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioConsolePortConfigurationArray
func NewVZVirtioConsolePortConfigurationArray ¶
func NewVZVirtioConsolePortConfigurationArray() VZVirtioConsolePortConfigurationArray
NewVZVirtioConsolePortConfigurationArray creates a new VZVirtioConsolePortConfigurationArray instance.
func VZVirtioConsolePortConfigurationArrayFromID ¶
func VZVirtioConsolePortConfigurationArrayFromID(id objc.ID) VZVirtioConsolePortConfigurationArray
VZVirtioConsolePortConfigurationArrayFromID constructs a VZVirtioConsolePortConfigurationArray from an objc.ID.
A class that represents a collection of Virtio console port configurations.
func (VZVirtioConsolePortConfigurationArray) Autorelease ¶
func (v VZVirtioConsolePortConfigurationArray) Autorelease() VZVirtioConsolePortConfigurationArray
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtioConsolePortConfigurationArray) MaximumPortCount ¶
func (v VZVirtioConsolePortConfigurationArray) MaximumPortCount() uint32
An unsigned integer that represents the maximum number of ports allocated by this device.
func (VZVirtioConsolePortConfigurationArray) ObjectAtIndexedSubscript ¶
func (v VZVirtioConsolePortConfigurationArray) ObjectAtIndexedSubscript(portIndex uint) IVZVirtioConsolePortConfiguration
Returns the Virtio console port configuration as the specified index.
portIndex: The index of the configuration to retrieve.
Return Value ¶
The VZVirtioConsolePortConfiguration, or nil is the index exceeds the number of configurations in the array.
func (VZVirtioConsolePortConfigurationArray) SetMaximumPortCount ¶
func (v VZVirtioConsolePortConfigurationArray) SetMaximumPortCount(value uint32)
func (VZVirtioConsolePortConfigurationArray) SetObjectAtIndexedSubscript ¶
func (v VZVirtioConsolePortConfigurationArray) SetObjectAtIndexedSubscript(configuration IVZVirtioConsolePortConfiguration, portIndex uint)
type VZVirtioConsolePortConfigurationArrayClass ¶
type VZVirtioConsolePortConfigurationArrayClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioConsolePortConfigurationArrayClass ¶
func GetVZVirtioConsolePortConfigurationArrayClass() VZVirtioConsolePortConfigurationArrayClass
GetVZVirtioConsolePortConfigurationArrayClass returns the class object for VZVirtioConsolePortConfigurationArray.
type VZVirtioConsolePortConfigurationClass ¶
type VZVirtioConsolePortConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioConsolePortConfigurationClass ¶
func GetVZVirtioConsolePortConfigurationClass() VZVirtioConsolePortConfigurationClass
GetVZVirtioConsolePortConfigurationClass returns the class object for VZVirtioConsolePortConfiguration.
func (VZVirtioConsolePortConfigurationClass) Alloc ¶
func (vc VZVirtioConsolePortConfigurationClass) Alloc() VZVirtioConsolePortConfiguration
Alloc allocates memory for a new instance of the class.
type VZVirtioEntropyDeviceConfiguration ¶
type VZVirtioEntropyDeviceConfiguration struct {
VZEntropyDeviceConfiguration
}
A source of entropy for the guest’s random number generator.
Overview ¶
Use a VZVirtioEntropyDeviceConfiguration object to expose a source of entropy for the guest operating system’s random-number generator. When you create this object and add it to your virtual machine’s configuration, the virtual machine configures a Virtio-compliant entropy device. The guest operating system uses this device as a seed to generate random numbers.
Create a VZVirtioEntropyDeviceConfiguration object and add it to the VZVirtioEntropyDeviceConfiguration.EntropyDevices property of your virtual machine’s configuration.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioEntropyDeviceConfiguration
func NewVZVirtioEntropyDeviceConfiguration ¶
func NewVZVirtioEntropyDeviceConfiguration() VZVirtioEntropyDeviceConfiguration
NewVZVirtioEntropyDeviceConfiguration creates a new VZVirtioEntropyDeviceConfiguration instance.
func VZVirtioEntropyDeviceConfigurationFromID ¶
func VZVirtioEntropyDeviceConfigurationFromID(id objc.ID) VZVirtioEntropyDeviceConfiguration
VZVirtioEntropyDeviceConfigurationFromID constructs a VZVirtioEntropyDeviceConfiguration from an objc.ID.
A source of entropy for the guest’s random number generator.
func (VZVirtioEntropyDeviceConfiguration) Autorelease ¶
func (v VZVirtioEntropyDeviceConfiguration) Autorelease() VZVirtioEntropyDeviceConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtioEntropyDeviceConfiguration) EntropyDevices ¶
func (v VZVirtioEntropyDeviceConfiguration) EntropyDevices() IVZEntropyDeviceConfiguration
The array of randomization devices that you expose to the guest operating system.
func (VZVirtioEntropyDeviceConfiguration) Init ¶
func (v VZVirtioEntropyDeviceConfiguration) Init() VZVirtioEntropyDeviceConfiguration
Init initializes the instance.
func (VZVirtioEntropyDeviceConfiguration) SetEntropyDevices ¶
func (v VZVirtioEntropyDeviceConfiguration) SetEntropyDevices(value IVZEntropyDeviceConfiguration)
type VZVirtioEntropyDeviceConfigurationClass ¶
type VZVirtioEntropyDeviceConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioEntropyDeviceConfigurationClass ¶
func GetVZVirtioEntropyDeviceConfigurationClass() VZVirtioEntropyDeviceConfigurationClass
GetVZVirtioEntropyDeviceConfigurationClass returns the class object for VZVirtioEntropyDeviceConfiguration.
func (VZVirtioEntropyDeviceConfigurationClass) Alloc ¶
func (vc VZVirtioEntropyDeviceConfigurationClass) Alloc() VZVirtioEntropyDeviceConfiguration
Alloc allocates memory for a new instance of the class.
type VZVirtioFileSystemDevice ¶
type VZVirtioFileSystemDevice struct {
VZDirectorySharingDevice
}
An object the defines a VIRTIO file system device.
Overview ¶
This device exposes host resources to the guest as a file system mount. The directory share defines which resources the host exposes to the guest.
Create this device by instantiating a VZVirtioFileSystemDeviceConfiguration in a VZVirtualMachineConfiguration. The file system device is available in the VZVirtualMachine.VZVirtioFileSystemDevice.DirectorySharingDevices property. The guest can use the VZVirtioFileSystemDevice.Tag label to mount and access the host resources.
With VZVirtioFileSystemDevice, the framework enforces several permissions policies for shared directories:
- The framework reads and writes files using the user ID (UID) of the effective user, which is the UID of the current user, rather than the UID of the system process. - The framework doesn’t allow reading or overwriting of files with permissions where the file is inaccessible to the current user. - The framework ignores requests from guest operating systems to change the UID or group ID (GID) of files on the host.
Accessing directory properties ¶
- VZVirtioFileSystemDevice.Share: A value that defines the directory share the host exposes to the guest VM.
- VZVirtioFileSystemDevice.SetShare
- VZVirtioFileSystemDevice.Tag: A string that identifies the device.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioFileSystemDevice
func NewVZVirtioFileSystemDevice ¶
func NewVZVirtioFileSystemDevice() VZVirtioFileSystemDevice
NewVZVirtioFileSystemDevice creates a new VZVirtioFileSystemDevice instance.
func VZVirtioFileSystemDeviceFromID ¶
func VZVirtioFileSystemDeviceFromID(id objc.ID) VZVirtioFileSystemDevice
VZVirtioFileSystemDeviceFromID constructs a VZVirtioFileSystemDevice from an objc.ID.
An object the defines a VIRTIO file system device.
func (VZVirtioFileSystemDevice) Autorelease ¶
func (v VZVirtioFileSystemDevice) Autorelease() VZVirtioFileSystemDevice
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtioFileSystemDevice) DirectorySharingDevices ¶
func (v VZVirtioFileSystemDevice) DirectorySharingDevices() IVZDirectorySharingDevice
The list of configured directory-sharing devices on the VM.
See: https://developer.apple.com/documentation/virtualization/vzvirtualmachine/directorysharingdevices
func (VZVirtioFileSystemDevice) Init ¶
func (v VZVirtioFileSystemDevice) Init() VZVirtioFileSystemDevice
Init initializes the instance.
func (VZVirtioFileSystemDevice) SetDirectorySharingDevices ¶
func (v VZVirtioFileSystemDevice) SetDirectorySharingDevices(value IVZDirectorySharingDevice)
func (VZVirtioFileSystemDevice) SetShare ¶
func (v VZVirtioFileSystemDevice) SetShare(value IVZDirectoryShare)
func (VZVirtioFileSystemDevice) Share ¶
func (v VZVirtioFileSystemDevice) Share() IVZDirectoryShare
A value that defines the directory share the host exposes to the guest VM.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioFileSystemDevice/share
func (VZVirtioFileSystemDevice) Tag ¶
func (v VZVirtioFileSystemDevice) Tag() string
A string that identifies the device.
Discussion ¶
The system presents the `tag` as a label in the guest VM that identifies this device that’s available for mounting.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioFileSystemDevice/tag
type VZVirtioFileSystemDeviceClass ¶
type VZVirtioFileSystemDeviceClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioFileSystemDeviceClass ¶
func GetVZVirtioFileSystemDeviceClass() VZVirtioFileSystemDeviceClass
GetVZVirtioFileSystemDeviceClass returns the class object for VZVirtioFileSystemDevice.
func (VZVirtioFileSystemDeviceClass) Alloc ¶
func (vc VZVirtioFileSystemDeviceClass) Alloc() VZVirtioFileSystemDevice
Alloc allocates memory for a new instance of the class.
type VZVirtioFileSystemDeviceConfiguration ¶
type VZVirtioFileSystemDeviceConfiguration struct {
VZDirectorySharingDeviceConfiguration
}
An object that represents the configuration of a Virtio file system device.
Overview ¶
Use VZVirtioFileSystemDeviceConfiguration to create a Virtio file system device which allows the host to expose directories to a guest using a VZVirtioFileSystemDeviceConfiguration.Tag label.
The example below shows the creation of a VZVirtioFileSystemDeviceConfiguration that shares a single directory that the user can manually mount after creating a mount point in the guest VM:
A VZVirtioFileSystemDeviceConfiguration can also share multiple directories. The example below demonstrates sharing the `~/Invoices` and `~/Projects` directories from the user’s home directory to the guest VM:
Mounting shared directories ¶
Mounting a shared directory requires the user to execute a command in a terminal window, the specific mount command depends on the guest VM’s operating system:
- In macOS guests, use `mount_virtiofs tag directory`. - In Linux guests, use `mount -t virtiofs tag directory`.
The `tag` argument is the file system device configuration label — [Projects] in the single directory case and `myfiles` in the multiple directory case in these examples — and `directory` is the mount point in the guest file system to which the framework attaches the shared directories.
Automounting shared directories in macOS VMs ¶
In macOS 13 and later, it’s possible to specify a file system device that macOS 13 or later guest VMs automount using the [VZVirtioFileSystemDeviceConfiguration.MacOSGuestAutomountTag] property. The example below demonstrates sharing a single macOS directory, to a macOS guest:
The macOS guest automounts the user’s `~/Projects` directory from the host and shares it under `/Volumes/My Shared Files/` in the macOS guest.
It’s also possible to automount multiple directories in macOS guests. The example below demonstrates sharing the `~/Invoices` and `~/Projects` directories from the user’s home directory to the macOS guest VM:
In the guest, the framework lists each shared directory by its specified name under `/Volumes/My Shared Files`. Here, the shared directories in the macOS guest are `/Volumes/My Shared Files/My Projects` and `/Volumes/My Shared Files/Invoices`.
Creating a file system device configuration ¶
- VZVirtioFileSystemDeviceConfiguration.InitWithTag: Creates a configuration for a VIRTIO file system device.
Getting file system information ¶
- VZVirtioFileSystemDeviceConfiguration.Share: A value that defines how the host exposes resources to the guest virtual machine.
- VZVirtioFileSystemDeviceConfiguration.SetShare
- VZVirtioFileSystemDeviceConfiguration.Tag: A label that identifies this device in the guest VM.
- VZVirtioFileSystemDeviceConfiguration.SetTag
See: https://developer.apple.com/documentation/Virtualization/VZVirtioFileSystemDeviceConfiguration
func NewVZVirtioFileSystemDeviceConfiguration ¶
func NewVZVirtioFileSystemDeviceConfiguration() VZVirtioFileSystemDeviceConfiguration
NewVZVirtioFileSystemDeviceConfiguration creates a new VZVirtioFileSystemDeviceConfiguration instance.
func NewVirtioFileSystemDeviceConfigurationWithTag ¶
func NewVirtioFileSystemDeviceConfigurationWithTag(tag string) VZVirtioFileSystemDeviceConfiguration
Creates a configuration for a VIRTIO file system device.
tag: The label identifying this device in the guest.
Discussion ¶
The system presents the `tag` as a label in the guest identifying this device for mounting. The `tag` must be valid, which you can check with [ValidateTagError].
func VZVirtioFileSystemDeviceConfigurationFromID ¶
func VZVirtioFileSystemDeviceConfigurationFromID(id objc.ID) VZVirtioFileSystemDeviceConfiguration
VZVirtioFileSystemDeviceConfigurationFromID constructs a VZVirtioFileSystemDeviceConfiguration from an objc.ID.
An object that represents the configuration of a Virtio file system device.
func (VZVirtioFileSystemDeviceConfiguration) Autorelease ¶
func (v VZVirtioFileSystemDeviceConfiguration) Autorelease() VZVirtioFileSystemDeviceConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtioFileSystemDeviceConfiguration) InitWithTag ¶
func (v VZVirtioFileSystemDeviceConfiguration) InitWithTag(tag string) VZVirtioFileSystemDeviceConfiguration
Creates a configuration for a VIRTIO file system device.
tag: The label identifying this device in the guest.
Discussion ¶
The system presents the `tag` as a label in the guest identifying this device for mounting. The `tag` must be valid, which you can check with [ValidateTagError].
func (VZVirtioFileSystemDeviceConfiguration) SetShare ¶
func (v VZVirtioFileSystemDeviceConfiguration) SetShare(value IVZDirectoryShare)
func (VZVirtioFileSystemDeviceConfiguration) SetTag ¶
func (v VZVirtioFileSystemDeviceConfiguration) SetTag(value string)
func (VZVirtioFileSystemDeviceConfiguration) Share ¶
func (v VZVirtioFileSystemDeviceConfiguration) Share() IVZDirectoryShare
A value that defines how the host exposes resources to the guest virtual machine.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioFileSystemDeviceConfiguration/share
func (VZVirtioFileSystemDeviceConfiguration) Tag ¶
func (v VZVirtioFileSystemDeviceConfiguration) Tag() string
A label that identifies this device in the guest VM.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioFileSystemDeviceConfiguration/tag
type VZVirtioFileSystemDeviceConfigurationClass ¶
type VZVirtioFileSystemDeviceConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioFileSystemDeviceConfigurationClass ¶
func GetVZVirtioFileSystemDeviceConfigurationClass() VZVirtioFileSystemDeviceConfigurationClass
GetVZVirtioFileSystemDeviceConfigurationClass returns the class object for VZVirtioFileSystemDeviceConfiguration.
func (VZVirtioFileSystemDeviceConfigurationClass) Alloc ¶
Alloc allocates memory for a new instance of the class.
func (VZVirtioFileSystemDeviceConfigurationClass) MacOSGuestAutomountTag ¶
func (_VZVirtioFileSystemDeviceConfigurationClass VZVirtioFileSystemDeviceConfigurationClass) MacOSGuestAutomountTag() string
A value that indicates that the guest needs to automount this file system device in the guest VM.
Discussion ¶
A device configured with this tag is automatically mounted in a macOS guest.
func (VZVirtioFileSystemDeviceConfigurationClass) ValidateTagError ¶
func (_VZVirtioFileSystemDeviceConfigurationClass VZVirtioFileSystemDeviceConfigurationClass) ValidateTagError(tag string) (bool, error)
Checks to see whether a Virtio tag is valid.
tag: The tag to validate.
Discussion ¶
The tag can’t be empty and must be fewer than 36 bytes when encoded in UTF-8.
type VZVirtioGraphicsDevice ¶
type VZVirtioGraphicsDevice struct {
VZGraphicsDevice
}
A Virtio graphics device.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioGraphicsDevice
func NewVZVirtioGraphicsDevice ¶
func NewVZVirtioGraphicsDevice() VZVirtioGraphicsDevice
NewVZVirtioGraphicsDevice creates a new VZVirtioGraphicsDevice instance.
func VZVirtioGraphicsDeviceFromID ¶
func VZVirtioGraphicsDeviceFromID(id objc.ID) VZVirtioGraphicsDevice
VZVirtioGraphicsDeviceFromID constructs a VZVirtioGraphicsDevice from an objc.ID.
A Virtio graphics device.
func (VZVirtioGraphicsDevice) Autorelease ¶
func (v VZVirtioGraphicsDevice) Autorelease() VZVirtioGraphicsDevice
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtioGraphicsDevice) Init ¶
func (v VZVirtioGraphicsDevice) Init() VZVirtioGraphicsDevice
Init initializes the instance.
type VZVirtioGraphicsDeviceClass ¶
type VZVirtioGraphicsDeviceClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioGraphicsDeviceClass ¶
func GetVZVirtioGraphicsDeviceClass() VZVirtioGraphicsDeviceClass
GetVZVirtioGraphicsDeviceClass returns the class object for VZVirtioGraphicsDevice.
func (VZVirtioGraphicsDeviceClass) Alloc ¶
func (vc VZVirtioGraphicsDeviceClass) Alloc() VZVirtioGraphicsDevice
Alloc allocates memory for a new instance of the class.
type VZVirtioGraphicsDeviceConfiguration ¶
type VZVirtioGraphicsDeviceConfiguration struct {
VZGraphicsDeviceConfiguration
}
Configuration that represents the configuration of a Virtio graphics device for a Linux VM.
Instance properties ¶
- VZVirtioGraphicsDeviceConfiguration.Scanouts: The array of output devices.
- VZVirtioGraphicsDeviceConfiguration.SetScanouts
See: https://developer.apple.com/documentation/Virtualization/VZVirtioGraphicsDeviceConfiguration
func NewVZVirtioGraphicsDeviceConfiguration ¶
func NewVZVirtioGraphicsDeviceConfiguration() VZVirtioGraphicsDeviceConfiguration
NewVZVirtioGraphicsDeviceConfiguration creates a new VZVirtioGraphicsDeviceConfiguration instance.
func VZVirtioGraphicsDeviceConfigurationFromID ¶
func VZVirtioGraphicsDeviceConfigurationFromID(id objc.ID) VZVirtioGraphicsDeviceConfiguration
VZVirtioGraphicsDeviceConfigurationFromID constructs a VZVirtioGraphicsDeviceConfiguration from an objc.ID.
Configuration that represents the configuration of a Virtio graphics device for a Linux VM.
func (VZVirtioGraphicsDeviceConfiguration) Autorelease ¶
func (v VZVirtioGraphicsDeviceConfiguration) Autorelease() VZVirtioGraphicsDeviceConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtioGraphicsDeviceConfiguration) Scanouts ¶
func (v VZVirtioGraphicsDeviceConfiguration) Scanouts() []VZVirtioGraphicsScanoutConfiguration
The array of output devices.
func (VZVirtioGraphicsDeviceConfiguration) SetScanouts ¶
func (v VZVirtioGraphicsDeviceConfiguration) SetScanouts(value []VZVirtioGraphicsScanoutConfiguration)
type VZVirtioGraphicsDeviceConfigurationClass ¶
type VZVirtioGraphicsDeviceConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioGraphicsDeviceConfigurationClass ¶
func GetVZVirtioGraphicsDeviceConfigurationClass() VZVirtioGraphicsDeviceConfigurationClass
GetVZVirtioGraphicsDeviceConfigurationClass returns the class object for VZVirtioGraphicsDeviceConfiguration.
func (VZVirtioGraphicsDeviceConfigurationClass) Alloc ¶
func (vc VZVirtioGraphicsDeviceConfigurationClass) Alloc() VZVirtioGraphicsDeviceConfiguration
Alloc allocates memory for a new instance of the class.
type VZVirtioGraphicsScanout ¶
type VZVirtioGraphicsScanout struct {
VZGraphicsDisplay
}
A Virtio graphics scanout that corresponds to a Virtio graphics scanout configuration.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioGraphicsScanout
func NewVZVirtioGraphicsScanout ¶
func NewVZVirtioGraphicsScanout() VZVirtioGraphicsScanout
NewVZVirtioGraphicsScanout creates a new VZVirtioGraphicsScanout instance.
func VZVirtioGraphicsScanoutFromID ¶
func VZVirtioGraphicsScanoutFromID(id objc.ID) VZVirtioGraphicsScanout
VZVirtioGraphicsScanoutFromID constructs a VZVirtioGraphicsScanout from an objc.ID.
A Virtio graphics scanout that corresponds to a Virtio graphics scanout configuration.
func (VZVirtioGraphicsScanout) Autorelease ¶
func (v VZVirtioGraphicsScanout) Autorelease() VZVirtioGraphicsScanout
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtioGraphicsScanout) Init ¶
func (v VZVirtioGraphicsScanout) Init() VZVirtioGraphicsScanout
Init initializes the instance.
type VZVirtioGraphicsScanoutClass ¶
type VZVirtioGraphicsScanoutClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioGraphicsScanoutClass ¶
func GetVZVirtioGraphicsScanoutClass() VZVirtioGraphicsScanoutClass
GetVZVirtioGraphicsScanoutClass returns the class object for VZVirtioGraphicsScanout.
func (VZVirtioGraphicsScanoutClass) Alloc ¶
func (vc VZVirtioGraphicsScanoutClass) Alloc() VZVirtioGraphicsScanout
Alloc allocates memory for a new instance of the class.
type VZVirtioGraphicsScanoutConfiguration ¶
type VZVirtioGraphicsScanoutConfiguration struct {
VZGraphicsDisplayConfiguration
}
The configuration for a Virtio graphics device that configures the dimensions of the graphics device for a Linux VM.
Overview ¶
Use a VZVirtioGraphicsScanoutConfiguration to configure the width and height of a Virtio graphics device.
Creating the configuration object ¶
- VZVirtioGraphicsScanoutConfiguration.InitWithWidthInPixelsHeightInPixels: Creates a Virtio graphics device with the specified dimensions.
Instance properties ¶
- VZVirtioGraphicsScanoutConfiguration.HeightInPixels: An integer value that describes the height of the graphics device in pixels.
- VZVirtioGraphicsScanoutConfiguration.SetHeightInPixels
- VZVirtioGraphicsScanoutConfiguration.WidthInPixels: An integer value that describes the width of the graphics device in pixels.
- VZVirtioGraphicsScanoutConfiguration.SetWidthInPixels
See: https://developer.apple.com/documentation/Virtualization/VZVirtioGraphicsScanoutConfiguration
func NewVZVirtioGraphicsScanoutConfiguration ¶
func NewVZVirtioGraphicsScanoutConfiguration() VZVirtioGraphicsScanoutConfiguration
NewVZVirtioGraphicsScanoutConfiguration creates a new VZVirtioGraphicsScanoutConfiguration instance.
func NewVirtioGraphicsScanoutConfigurationWithWidthInPixelsHeightInPixels ¶
func NewVirtioGraphicsScanoutConfigurationWithWidthInPixelsHeightInPixels(widthInPixels int, heightInPixels int) VZVirtioGraphicsScanoutConfiguration
Creates a Virtio graphics device with the specified dimensions.
widthInPixels: The graphics device width in pixels.
heightInPixels: The graphics device height in pixels.
func VZVirtioGraphicsScanoutConfigurationFromID ¶
func VZVirtioGraphicsScanoutConfigurationFromID(id objc.ID) VZVirtioGraphicsScanoutConfiguration
VZVirtioGraphicsScanoutConfigurationFromID constructs a VZVirtioGraphicsScanoutConfiguration from an objc.ID.
The configuration for a Virtio graphics device that configures the dimensions of the graphics device for a Linux VM.
func (VZVirtioGraphicsScanoutConfiguration) Autorelease ¶
func (v VZVirtioGraphicsScanoutConfiguration) Autorelease() VZVirtioGraphicsScanoutConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtioGraphicsScanoutConfiguration) HeightInPixels ¶
func (v VZVirtioGraphicsScanoutConfiguration) HeightInPixels() int
An integer value that describes the height of the graphics device in pixels.
func (VZVirtioGraphicsScanoutConfiguration) InitWithWidthInPixelsHeightInPixels ¶
func (v VZVirtioGraphicsScanoutConfiguration) InitWithWidthInPixelsHeightInPixels(widthInPixels int, heightInPixels int) VZVirtioGraphicsScanoutConfiguration
Creates a Virtio graphics device with the specified dimensions.
widthInPixels: The graphics device width in pixels.
heightInPixels: The graphics device height in pixels.
func (VZVirtioGraphicsScanoutConfiguration) Scanouts ¶
func (v VZVirtioGraphicsScanoutConfiguration) Scanouts() IVZVirtioGraphicsScanoutConfiguration
The array of output devices.
func (VZVirtioGraphicsScanoutConfiguration) SetHeightInPixels ¶
func (v VZVirtioGraphicsScanoutConfiguration) SetHeightInPixels(value int)
func (VZVirtioGraphicsScanoutConfiguration) SetScanouts ¶
func (v VZVirtioGraphicsScanoutConfiguration) SetScanouts(value IVZVirtioGraphicsScanoutConfiguration)
func (VZVirtioGraphicsScanoutConfiguration) SetWidthInPixels ¶
func (v VZVirtioGraphicsScanoutConfiguration) SetWidthInPixels(value int)
func (VZVirtioGraphicsScanoutConfiguration) WidthInPixels ¶
func (v VZVirtioGraphicsScanoutConfiguration) WidthInPixels() int
An integer value that describes the width of the graphics device in pixels.
type VZVirtioGraphicsScanoutConfigurationClass ¶
type VZVirtioGraphicsScanoutConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioGraphicsScanoutConfigurationClass ¶
func GetVZVirtioGraphicsScanoutConfigurationClass() VZVirtioGraphicsScanoutConfigurationClass
GetVZVirtioGraphicsScanoutConfigurationClass returns the class object for VZVirtioGraphicsScanoutConfiguration.
type VZVirtioNetworkDeviceConfiguration ¶
type VZVirtioNetworkDeviceConfiguration struct {
VZNetworkDeviceConfiguration
}
A configuration object that requests the creation of a network device for the guest system.
Overview ¶
Use a VZVirtioNetworkDeviceConfiguration object to configure one network interface of your virtual machine. After creating this object, assign an appropriate value to its inherited [VZVirtioNetworkDeviceConfiguration.Attachment] property to define the type of network interface you want. You can also assign a specific MAC address, or let the system generate a random address for you.
After creating and configuring a VZVirtioNetworkDeviceConfiguration object, assign it to the VZVirtioNetworkDeviceConfiguration.NetworkDevices property of your virtual machine’s configuration.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioNetworkDeviceConfiguration
func NewVZVirtioNetworkDeviceConfiguration ¶
func NewVZVirtioNetworkDeviceConfiguration() VZVirtioNetworkDeviceConfiguration
NewVZVirtioNetworkDeviceConfiguration creates a new VZVirtioNetworkDeviceConfiguration instance.
func VZVirtioNetworkDeviceConfigurationFromID ¶
func VZVirtioNetworkDeviceConfigurationFromID(id objc.ID) VZVirtioNetworkDeviceConfiguration
VZVirtioNetworkDeviceConfigurationFromID constructs a VZVirtioNetworkDeviceConfiguration from an objc.ID.
A configuration object that requests the creation of a network device for the guest system.
func (VZVirtioNetworkDeviceConfiguration) Autorelease ¶
func (v VZVirtioNetworkDeviceConfiguration) Autorelease() VZVirtioNetworkDeviceConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtioNetworkDeviceConfiguration) Init ¶
func (v VZVirtioNetworkDeviceConfiguration) Init() VZVirtioNetworkDeviceConfiguration
Init initializes the instance.
func (VZVirtioNetworkDeviceConfiguration) NetworkDevices ¶
func (v VZVirtioNetworkDeviceConfiguration) NetworkDevices() IVZNetworkDeviceConfiguration
The array of network devices that you expose to the guest operating system.
func (VZVirtioNetworkDeviceConfiguration) SetNetworkDevices ¶
func (v VZVirtioNetworkDeviceConfiguration) SetNetworkDevices(value IVZNetworkDeviceConfiguration)
type VZVirtioNetworkDeviceConfigurationClass ¶
type VZVirtioNetworkDeviceConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioNetworkDeviceConfigurationClass ¶
func GetVZVirtioNetworkDeviceConfigurationClass() VZVirtioNetworkDeviceConfigurationClass
GetVZVirtioNetworkDeviceConfigurationClass returns the class object for VZVirtioNetworkDeviceConfiguration.
func (VZVirtioNetworkDeviceConfigurationClass) Alloc ¶
func (vc VZVirtioNetworkDeviceConfigurationClass) Alloc() VZVirtioNetworkDeviceConfiguration
Alloc allocates memory for a new instance of the class.
type VZVirtioSocketConnection ¶
type VZVirtioSocketConnection struct {
objectivec.Object
}
A port-based connection between the guest operating system and the host computer.
Overview ¶
A VZVirtioSocketConnection object contains the port information for the guest operating system and host computer. You don’t create connection objects directly. When the guest operating system initiates a connection, the virtual machine creates the connection object and passes it to the appropriate VZVirtioSocketListener object, which forwards the object to its delegate. When the virtual machine opens a connection to a guest port, the [ConnectToPortCompletionHandler] method (Objective-C) or connect(toPort:completionHandler:) method (Swift) pass the connection object to your completion handler.
Getting the connection details ¶
- VZVirtioSocketConnection.SourcePort: The port number of the system that opened the connection.
- VZVirtioSocketConnection.DestinationPort: The destination port number of the connection.
- VZVirtioSocketConnection.FileDescriptor: The file descriptor to use when sending data.
Closing the connection ¶
- VZVirtioSocketConnection.Close: Close the file descriptor associated with the socket.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioSocketConnection
func NewVZVirtioSocketConnection ¶
func NewVZVirtioSocketConnection() VZVirtioSocketConnection
NewVZVirtioSocketConnection creates a new VZVirtioSocketConnection instance.
func VZVirtioSocketConnectionFromID ¶
func VZVirtioSocketConnectionFromID(id objc.ID) VZVirtioSocketConnection
VZVirtioSocketConnectionFromID constructs a VZVirtioSocketConnection from an objc.ID.
A port-based connection between the guest operating system and the host computer.
func (VZVirtioSocketConnection) Autorelease ¶
func (v VZVirtioSocketConnection) Autorelease() VZVirtioSocketConnection
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtioSocketConnection) Close ¶
func (v VZVirtioSocketConnection) Close()
Close the file descriptor associated with the socket.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioSocketConnection/close()
func (VZVirtioSocketConnection) DestinationPort ¶
func (v VZVirtioSocketConnection) DestinationPort() uint32
The destination port number of the connection.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioSocketConnection/destinationPort
func (VZVirtioSocketConnection) FileDescriptor ¶
func (v VZVirtioSocketConnection) FileDescriptor() int
The file descriptor to use when sending data.
Discussion ¶
To send data to the other side of the connection, write to the file descriptor. To read data from connection, read from the file descriptor. If the socket connection is closed, the value of this property is `-1`.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioSocketConnection/fileDescriptor
func (VZVirtioSocketConnection) Init ¶
func (v VZVirtioSocketConnection) Init() VZVirtioSocketConnection
Init initializes the instance.
func (VZVirtioSocketConnection) SourcePort ¶
func (v VZVirtioSocketConnection) SourcePort() uint32
The port number of the system that opened the connection.
Discussion ¶
When the guest operating system opens a connection, this property contains the port number that the guest specified. When you open a connection to the guest operating system from your VZVirtioSocketDevice object, this property contains a randomly generated port number.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioSocketConnection/sourcePort
type VZVirtioSocketConnectionClass ¶
type VZVirtioSocketConnectionClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioSocketConnectionClass ¶
func GetVZVirtioSocketConnectionClass() VZVirtioSocketConnectionClass
GetVZVirtioSocketConnectionClass returns the class object for VZVirtioSocketConnection.
func (VZVirtioSocketConnectionClass) Alloc ¶
func (vc VZVirtioSocketConnectionClass) Alloc() VZVirtioSocketConnection
Alloc allocates memory for a new instance of the class.
type VZVirtioSocketDevice ¶
type VZVirtioSocketDevice struct {
VZSocketDevice
}
A device that manages port-based connections between the guest system and the host computer.
Overview ¶
Use a VZVirtioSocketDevice object to configure services and other communication end points in your virtual machine. Host computers make services available using ports, which identify the type of service and the protocol to use when transmitting data. Use this object to specify the ports available to your guest operating system, and to register handlers to manage the communication on those ports.
Don’t create a VZVirtioSocketDevice object directly. Instead, when you request a socket device in your configuration, the virtual machine creates it and stores it in the [VZVirtioSocketDevice.SocketDevices] property. For each port you want to make available in your virtual machine, call the VZVirtioSocketDevice.SetSocketListenerForPort method and provide an object to manage the port connections.
Configuring Port Listeners ¶
- VZVirtioSocketDevice.SetSocketListenerForPort: Configures an object to monitor the specified port for new connections.
- VZVirtioSocketDevice.RemoveSocketListenerForPort: Removes the listener object from the specfied port.
Connecting to Guest System Ports ¶
- VZVirtioSocketDevice.ConnectToPortCompletionHandler: Initiates a connection to the specified port of the guest operating system.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioSocketDevice
func NewVZVirtioSocketDevice ¶
func NewVZVirtioSocketDevice() VZVirtioSocketDevice
NewVZVirtioSocketDevice creates a new VZVirtioSocketDevice instance.
func VZVirtioSocketDeviceFromID ¶
func VZVirtioSocketDeviceFromID(id objc.ID) VZVirtioSocketDevice
VZVirtioSocketDeviceFromID constructs a VZVirtioSocketDevice from an objc.ID.
A device that manages port-based connections between the guest system and the host computer.
func (VZVirtioSocketDevice) Autorelease ¶
func (v VZVirtioSocketDevice) Autorelease() VZVirtioSocketDevice
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtioSocketDevice) ConnectToPort ¶
func (v VZVirtioSocketDevice) ConnectToPort(ctx context.Context, port uint32) (*VZVirtioSocketConnection, error)
ConnectToPort is a synchronous wrapper around VZVirtioSocketDevice.ConnectToPortCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (VZVirtioSocketDevice) ConnectToPortCompletionHandler ¶
func (v VZVirtioSocketDevice) ConnectToPortCompletionHandler(port uint32, completionHandler VirtioSocketConnectionErrorHandler)
Initiates a connection to the specified port of the guest operating system.
port: The destination port number in the guest operating system.
Discussion ¶
This method initiates the connection asynchronously, and executes the completion handler when the results are available. If the guest operating system doesn’t listen for connections to the specifed port, this method does nothing.
For a successful connection, this method sets the [SourcePort] property of the resulting VZVirtioSocketConnection object to a random port number.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioSocketDevice/connect(toPort:)
func (VZVirtioSocketDevice) Init ¶
func (v VZVirtioSocketDevice) Init() VZVirtioSocketDevice
Init initializes the instance.
func (VZVirtioSocketDevice) RemoveSocketListenerForPort ¶
func (v VZVirtioSocketDevice) RemoveSocketListenerForPort(port uint32)
Removes the listener object from the specfied port.
port: The port number to clear. If the specified port doesn’t have a listener object, this method does nothing.
func (VZVirtioSocketDevice) SetSocketListenerForPort ¶
func (v VZVirtioSocketDevice) SetSocketListenerForPort(listener IVZVirtioSocketListener, port uint32)
Configures an object to monitor the specified port for new connections.
listener: The VZVirtioSocketListener object to monitor the port. This object replaces the previous listener object, if any.
port: The port number to monitor.
Discussion ¶
You can register the same listener object on multiple ports. When the guest operating system opens a connection to the port, the listener object notifies its associated delegate.
type VZVirtioSocketDeviceClass ¶
type VZVirtioSocketDeviceClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioSocketDeviceClass ¶
func GetVZVirtioSocketDeviceClass() VZVirtioSocketDeviceClass
GetVZVirtioSocketDeviceClass returns the class object for VZVirtioSocketDevice.
func (VZVirtioSocketDeviceClass) Alloc ¶
func (vc VZVirtioSocketDeviceClass) Alloc() VZVirtioSocketDevice
Alloc allocates memory for a new instance of the class.
type VZVirtioSocketDeviceConfiguration ¶
type VZVirtioSocketDeviceConfiguration struct {
VZSocketDeviceConfiguration
}
A configuration object that requests the creation of a socket device to communicate with the guest system.
Overview ¶
Use a VZVirtioSocketDeviceConfiguration object to implement port-based communication between the guest operating system and the host computer. When you add this object to the VZVirtioSocketDeviceConfiguration.SocketDevices property of your VZVirtualMachineConfiguration, the virtual machine provides a corresponding VZVirtioSocketDevice object to use to configure the ports. Add only one VZVirtioSocketDeviceConfiguration to your virtual machine’s configuration.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioSocketDeviceConfiguration
func NewVZVirtioSocketDeviceConfiguration ¶
func NewVZVirtioSocketDeviceConfiguration() VZVirtioSocketDeviceConfiguration
NewVZVirtioSocketDeviceConfiguration creates a new VZVirtioSocketDeviceConfiguration instance.
func VZVirtioSocketDeviceConfigurationFromID ¶
func VZVirtioSocketDeviceConfigurationFromID(id objc.ID) VZVirtioSocketDeviceConfiguration
VZVirtioSocketDeviceConfigurationFromID constructs a VZVirtioSocketDeviceConfiguration from an objc.ID.
A configuration object that requests the creation of a socket device to communicate with the guest system.
func (VZVirtioSocketDeviceConfiguration) Autorelease ¶
func (v VZVirtioSocketDeviceConfiguration) Autorelease() VZVirtioSocketDeviceConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtioSocketDeviceConfiguration) Init ¶
func (v VZVirtioSocketDeviceConfiguration) Init() VZVirtioSocketDeviceConfiguration
Init initializes the instance.
func (VZVirtioSocketDeviceConfiguration) SetSocketDevices ¶
func (v VZVirtioSocketDeviceConfiguration) SetSocketDevices(value IVZSocketDeviceConfiguration)
func (VZVirtioSocketDeviceConfiguration) SocketDevices ¶
func (v VZVirtioSocketDeviceConfiguration) SocketDevices() IVZSocketDeviceConfiguration
The socket device that you use to implement port-based communication with the guest operating system.
See: https://developer.apple.com/documentation/virtualization/vzvirtualmachineconfiguration/socketdevices
type VZVirtioSocketDeviceConfigurationClass ¶
type VZVirtioSocketDeviceConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioSocketDeviceConfigurationClass ¶
func GetVZVirtioSocketDeviceConfigurationClass() VZVirtioSocketDeviceConfigurationClass
GetVZVirtioSocketDeviceConfigurationClass returns the class object for VZVirtioSocketDeviceConfiguration.
func (VZVirtioSocketDeviceConfigurationClass) Alloc ¶
func (vc VZVirtioSocketDeviceConfigurationClass) Alloc() VZVirtioSocketDeviceConfiguration
Alloc allocates memory for a new instance of the class.
type VZVirtioSocketListener ¶
type VZVirtioSocketListener struct {
objectivec.Object
}
An object that listens for port-based connection requests from the guest operating system.
Overview ¶
Use a VZVirtioSocketListener object to route connection requests to your associated delegate object. The socket listener object handles incoming connection requests from the guest operating system and directs them to the methods of its associated VZVirtioSocketListener.Delegate object. You may use the same listener object to monitor connections on multiple ports.
After creating a VZVirtioSocketListener object, assign a custom object to its VZVirtioSocketListener.Delegate property. The delegate must implement the VZVirtioSocketListenerDelegate protocol. To connect the listener to a port, call the [SetSocketListenerForPort] method of your virtual machine’s VZVirtioSocketDevice object.
Responding to new connections ¶
- VZVirtioSocketListener.Delegate: The custom object you use to respond to port-based connection attempts.
- VZVirtioSocketListener.SetDelegate
See: https://developer.apple.com/documentation/Virtualization/VZVirtioSocketListener
func NewVZVirtioSocketListener ¶
func NewVZVirtioSocketListener() VZVirtioSocketListener
NewVZVirtioSocketListener creates a new VZVirtioSocketListener instance.
func VZVirtioSocketListenerFromID ¶
func VZVirtioSocketListenerFromID(id objc.ID) VZVirtioSocketListener
VZVirtioSocketListenerFromID constructs a VZVirtioSocketListener from an objc.ID.
An object that listens for port-based connection requests from the guest operating system.
func (VZVirtioSocketListener) Autorelease ¶
func (v VZVirtioSocketListener) Autorelease() VZVirtioSocketListener
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtioSocketListener) Delegate ¶
func (v VZVirtioSocketListener) Delegate() VZVirtioSocketListenerDelegate
The custom object you use to respond to port-based connection attempts.
Discussion ¶
Your delegate object must conform to the VZVirtioSocketListenerDelegate protocol.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioSocketListener/delegate
func (VZVirtioSocketListener) Init ¶
func (v VZVirtioSocketListener) Init() VZVirtioSocketListener
Init initializes the instance.
func (VZVirtioSocketListener) SetDelegate ¶
func (v VZVirtioSocketListener) SetDelegate(value VZVirtioSocketListenerDelegate)
type VZVirtioSocketListenerClass ¶
type VZVirtioSocketListenerClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioSocketListenerClass ¶
func GetVZVirtioSocketListenerClass() VZVirtioSocketListenerClass
GetVZVirtioSocketListenerClass returns the class object for VZVirtioSocketListener.
func (VZVirtioSocketListenerClass) Alloc ¶
func (vc VZVirtioSocketListenerClass) Alloc() VZVirtioSocketListener
Alloc allocates memory for a new instance of the class.
type VZVirtioSocketListenerDelegate ¶
type VZVirtioSocketListenerDelegate interface {
objectivec.IObject
}
An interface you use to manage connections between the guest operating system and host computer.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioSocketListenerDelegate
type VZVirtioSocketListenerDelegateConfig ¶
type VZVirtioSocketListenerDelegateConfig struct {
// Other Methods
// ListenerShouldAcceptNewConnectionFromSocketDevice — Returns a Boolean value that indicates whether to accept a new connection from the guest operating system.
ListenerShouldAcceptNewConnectionFromSocketDevice func(listener VZVirtioSocketListener, connection VZVirtioSocketConnection, socketDevice VZVirtioSocketDevice) bool
}
VZVirtioSocketListenerDelegateConfig holds optional typed callbacks for VZVirtioSocketListenerDelegate methods. Set non-nil fields to register the corresponding Objective-C delegate method. Methods with nil callbacks are not registered, so [NSObject.RespondsToSelector] returns false for them — matching the Objective-C delegate pattern exactly.
See Apple Documentation for protocol details.
type VZVirtioSocketListenerDelegateObject ¶
type VZVirtioSocketListenerDelegateObject struct {
objectivec.Object
}
VZVirtioSocketListenerDelegateObject wraps an existing Objective-C object that conforms to the VZVirtioSocketListenerDelegate protocol.
func NewVZVirtioSocketListenerDelegate ¶
func NewVZVirtioSocketListenerDelegate(config VZVirtioSocketListenerDelegateConfig) VZVirtioSocketListenerDelegateObject
NewVZVirtioSocketListenerDelegate creates an Objective-C object implementing the VZVirtioSocketListenerDelegate protocol.
Each call registers a unique Objective-C class containing only the methods set in config. This means [NSObject.RespondsToSelector] works correctly for optional delegate methods — only non-nil callbacks are registered.
The returned VZVirtioSocketListenerDelegateObject satisfies the VZVirtioSocketListenerDelegate interface and can be passed directly to SetDelegate and similar methods.
See Apple Documentation for protocol details.
func VZVirtioSocketListenerDelegateObjectFromID ¶
func VZVirtioSocketListenerDelegateObjectFromID(id objc.ID) VZVirtioSocketListenerDelegateObject
VZVirtioSocketListenerDelegateObjectFromID constructs a VZVirtioSocketListenerDelegateObject from an objc.ID. The object is determined to conform to the protocol at runtime.
func (VZVirtioSocketListenerDelegateObject) BaseObject ¶
func (o VZVirtioSocketListenerDelegateObject) BaseObject() objectivec.Object
func (VZVirtioSocketListenerDelegateObject) ListenerShouldAcceptNewConnectionFromSocketDevice ¶
func (o VZVirtioSocketListenerDelegateObject) ListenerShouldAcceptNewConnectionFromSocketDevice(listener IVZVirtioSocketListener, connection IVZVirtioSocketConnection, socketDevice IVZVirtioSocketDevice) bool
Returns a Boolean value that indicates whether to accept a new connection from the guest operating system.
listener: The listener object that monitors the associated port.
connection: The object that contains information about the proposed connection. Use this object to fetch port information.
socketDevice: The Virtio socket device that requested the connection.
Return Value ¶
true to establish the connection, or false to reject it.
Discussion ¶
Use your method’s implementation to quickly determine whether to accept or reject connection attempts. A typical implementation verifies that a connection between the specified ports is permissible. Return a result as quickly as possible, and don’t perform any long-running operations in this method.
If you don’t implement this method, the virtual machine refuses all connection requests as if this method returned false.
type VZVirtioSoundDeviceConfiguration ¶
type VZVirtioSoundDeviceConfiguration struct {
VZAudioDeviceConfiguration
}
An object that defines a Virtio sound device configuration.
Overview ¶
Use a VZVirtioSoundDeviceConfiguration object to configure an audio device for your VM. After creating this object, assign appropriate values to the VZVirtioSoundDeviceConfiguration.Streams array property which defines the behaviors of the underlying audio streams for this audio device.
After creating and configuring a VZVirtioSoundDeviceConfiguration object, assign it to the VZVirtioSoundDeviceConfiguration.AudioDevices property of your VM’s configuration.
Accessing the sound streams ¶
- VZVirtioSoundDeviceConfiguration.Streams: List of audio streams exposed by this device.
- VZVirtioSoundDeviceConfiguration.SetStreams
See: https://developer.apple.com/documentation/Virtualization/VZVirtioSoundDeviceConfiguration
func NewVZVirtioSoundDeviceConfiguration ¶
func NewVZVirtioSoundDeviceConfiguration() VZVirtioSoundDeviceConfiguration
NewVZVirtioSoundDeviceConfiguration creates a new VZVirtioSoundDeviceConfiguration instance.
func VZVirtioSoundDeviceConfigurationFromID ¶
func VZVirtioSoundDeviceConfigurationFromID(id objc.ID) VZVirtioSoundDeviceConfiguration
VZVirtioSoundDeviceConfigurationFromID constructs a VZVirtioSoundDeviceConfiguration from an objc.ID.
An object that defines a Virtio sound device configuration.
func (VZVirtioSoundDeviceConfiguration) AudioDevices ¶
func (v VZVirtioSoundDeviceConfiguration) AudioDevices() IVZAudioDeviceConfiguration
The list of audio devices.
See: https://developer.apple.com/documentation/virtualization/vzvirtualmachineconfiguration/audiodevices
func (VZVirtioSoundDeviceConfiguration) Autorelease ¶
func (v VZVirtioSoundDeviceConfiguration) Autorelease() VZVirtioSoundDeviceConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtioSoundDeviceConfiguration) Init ¶
func (v VZVirtioSoundDeviceConfiguration) Init() VZVirtioSoundDeviceConfiguration
Init initializes the instance.
func (VZVirtioSoundDeviceConfiguration) SetAudioDevices ¶
func (v VZVirtioSoundDeviceConfiguration) SetAudioDevices(value IVZAudioDeviceConfiguration)
func (VZVirtioSoundDeviceConfiguration) SetStreams ¶
func (v VZVirtioSoundDeviceConfiguration) SetStreams(value []VZVirtioSoundDeviceStreamConfiguration)
func (VZVirtioSoundDeviceConfiguration) Streams ¶
func (v VZVirtioSoundDeviceConfiguration) Streams() []VZVirtioSoundDeviceStreamConfiguration
List of audio streams exposed by this device.
Discussion ¶
Empty by default.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioSoundDeviceConfiguration/streams
type VZVirtioSoundDeviceConfigurationClass ¶
type VZVirtioSoundDeviceConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioSoundDeviceConfigurationClass ¶
func GetVZVirtioSoundDeviceConfigurationClass() VZVirtioSoundDeviceConfigurationClass
GetVZVirtioSoundDeviceConfigurationClass returns the class object for VZVirtioSoundDeviceConfiguration.
func (VZVirtioSoundDeviceConfigurationClass) Alloc ¶
func (vc VZVirtioSoundDeviceConfigurationClass) Alloc() VZVirtioSoundDeviceConfiguration
Alloc allocates memory for a new instance of the class.
type VZVirtioSoundDeviceInputStreamConfiguration ¶
type VZVirtioSoundDeviceInputStreamConfiguration struct {
VZVirtioSoundDeviceStreamConfiguration
}
A PCM stream of input audio data, such as from a microphone.
Overview ¶
This device represents a PCM stream of audio data. Don’t instantiate VZVirtioSoundDeviceStreamConfiguration directly. Instead, use one of its subclasses such as VZVirtioSoundDeviceInputStreamConfiguration or VZVirtioSoundDeviceOutputStreamConfiguration.
Accessing the sound source ¶
- VZVirtioSoundDeviceInputStreamConfiguration.Source: An audio stream source that defines how the host supplies audio data for the guest.
- VZVirtioSoundDeviceInputStreamConfiguration.SetSource
See: https://developer.apple.com/documentation/Virtualization/VZVirtioSoundDeviceInputStreamConfiguration
func NewVZVirtioSoundDeviceInputStreamConfiguration ¶
func NewVZVirtioSoundDeviceInputStreamConfiguration() VZVirtioSoundDeviceInputStreamConfiguration
NewVZVirtioSoundDeviceInputStreamConfiguration creates a new VZVirtioSoundDeviceInputStreamConfiguration instance.
func VZVirtioSoundDeviceInputStreamConfigurationFromID ¶
func VZVirtioSoundDeviceInputStreamConfigurationFromID(id objc.ID) VZVirtioSoundDeviceInputStreamConfiguration
VZVirtioSoundDeviceInputStreamConfigurationFromID constructs a VZVirtioSoundDeviceInputStreamConfiguration from an objc.ID.
A PCM stream of input audio data, such as from a microphone.
func (VZVirtioSoundDeviceInputStreamConfiguration) Autorelease ¶
func (v VZVirtioSoundDeviceInputStreamConfiguration) Autorelease() VZVirtioSoundDeviceInputStreamConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtioSoundDeviceInputStreamConfiguration) Init ¶
func (v VZVirtioSoundDeviceInputStreamConfiguration) Init() VZVirtioSoundDeviceInputStreamConfiguration
Init initializes the instance.
func (VZVirtioSoundDeviceInputStreamConfiguration) SetSource ¶
func (v VZVirtioSoundDeviceInputStreamConfiguration) SetSource(value IVZAudioInputStreamSource)
func (VZVirtioSoundDeviceInputStreamConfiguration) Source ¶
func (v VZVirtioSoundDeviceInputStreamConfiguration) Source() IVZAudioInputStreamSource
An audio stream source that defines how the host supplies audio data for the guest.
Discussion ¶
Not specifying a source results in a default handler that produces audio silence. The default is `nil`.
type VZVirtioSoundDeviceInputStreamConfigurationClass ¶
type VZVirtioSoundDeviceInputStreamConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioSoundDeviceInputStreamConfigurationClass ¶
func GetVZVirtioSoundDeviceInputStreamConfigurationClass() VZVirtioSoundDeviceInputStreamConfigurationClass
GetVZVirtioSoundDeviceInputStreamConfigurationClass returns the class object for VZVirtioSoundDeviceInputStreamConfiguration.
func (VZVirtioSoundDeviceInputStreamConfigurationClass) Alloc ¶
func (vc VZVirtioSoundDeviceInputStreamConfigurationClass) Alloc() VZVirtioSoundDeviceInputStreamConfiguration
Alloc allocates memory for a new instance of the class.
type VZVirtioSoundDeviceOutputStreamConfiguration ¶
type VZVirtioSoundDeviceOutputStreamConfiguration struct {
VZVirtioSoundDeviceStreamConfiguration
}
An object that defines a Virtio sound device output stream configuration.
Overview ¶
A PCM stream of output audio data, such as to a speaker.
Accessing the sound sink ¶
- VZVirtioSoundDeviceOutputStreamConfiguration.Sink: An audio stream sink that defines how the host handles audio data produced by the guest.
- VZVirtioSoundDeviceOutputStreamConfiguration.SetSink
func NewVZVirtioSoundDeviceOutputStreamConfiguration ¶
func NewVZVirtioSoundDeviceOutputStreamConfiguration() VZVirtioSoundDeviceOutputStreamConfiguration
NewVZVirtioSoundDeviceOutputStreamConfiguration creates a new VZVirtioSoundDeviceOutputStreamConfiguration instance.
func VZVirtioSoundDeviceOutputStreamConfigurationFromID ¶
func VZVirtioSoundDeviceOutputStreamConfigurationFromID(id objc.ID) VZVirtioSoundDeviceOutputStreamConfiguration
VZVirtioSoundDeviceOutputStreamConfigurationFromID constructs a VZVirtioSoundDeviceOutputStreamConfiguration from an objc.ID.
An object that defines a Virtio sound device output stream configuration.
func (VZVirtioSoundDeviceOutputStreamConfiguration) Autorelease ¶
func (v VZVirtioSoundDeviceOutputStreamConfiguration) Autorelease() VZVirtioSoundDeviceOutputStreamConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtioSoundDeviceOutputStreamConfiguration) Init ¶
func (v VZVirtioSoundDeviceOutputStreamConfiguration) Init() VZVirtioSoundDeviceOutputStreamConfiguration
Init initializes the instance.
func (VZVirtioSoundDeviceOutputStreamConfiguration) SetSink ¶
func (v VZVirtioSoundDeviceOutputStreamConfiguration) SetSink(value IVZAudioOutputStreamSink)
func (VZVirtioSoundDeviceOutputStreamConfiguration) Sink ¶
func (v VZVirtioSoundDeviceOutputStreamConfiguration) Sink() IVZAudioOutputStreamSink
An audio stream sink that defines how the host handles audio data produced by the guest.
Discussion ¶
Not specifying a sink results in a default handler that suppresses the audio. The default is `nil`.
type VZVirtioSoundDeviceOutputStreamConfigurationClass ¶
type VZVirtioSoundDeviceOutputStreamConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioSoundDeviceOutputStreamConfigurationClass ¶
func GetVZVirtioSoundDeviceOutputStreamConfigurationClass() VZVirtioSoundDeviceOutputStreamConfigurationClass
GetVZVirtioSoundDeviceOutputStreamConfigurationClass returns the class object for VZVirtioSoundDeviceOutputStreamConfiguration.
func (VZVirtioSoundDeviceOutputStreamConfigurationClass) Alloc ¶
func (vc VZVirtioSoundDeviceOutputStreamConfigurationClass) Alloc() VZVirtioSoundDeviceOutputStreamConfiguration
Alloc allocates memory for a new instance of the class.
type VZVirtioSoundDeviceStreamConfiguration ¶
type VZVirtioSoundDeviceStreamConfiguration struct {
objectivec.Object
}
An object that defines a Virtio sound device stream configuration.
Overview ¶
A VZVirtioSoundDeviceStreamConfiguration object represents a PCM stream of audio data. Don’t instantiate this class directly. Instead, instantiate one of its subclasses such as VZVirtioSoundDeviceInputStreamConfiguration or VZVirtioSoundDeviceOutputStreamConfiguration.
See: https://developer.apple.com/documentation/Virtualization/VZVirtioSoundDeviceStreamConfiguration
func NewVZVirtioSoundDeviceStreamConfiguration ¶
func NewVZVirtioSoundDeviceStreamConfiguration() VZVirtioSoundDeviceStreamConfiguration
NewVZVirtioSoundDeviceStreamConfiguration creates a new VZVirtioSoundDeviceStreamConfiguration instance.
func VZVirtioSoundDeviceStreamConfigurationFromID ¶
func VZVirtioSoundDeviceStreamConfigurationFromID(id objc.ID) VZVirtioSoundDeviceStreamConfiguration
VZVirtioSoundDeviceStreamConfigurationFromID constructs a VZVirtioSoundDeviceStreamConfiguration from an objc.ID.
An object that defines a Virtio sound device stream configuration.
func (VZVirtioSoundDeviceStreamConfiguration) Autorelease ¶
func (v VZVirtioSoundDeviceStreamConfiguration) Autorelease() VZVirtioSoundDeviceStreamConfiguration
Autorelease adds the receiver to the current autorelease pool.
type VZVirtioSoundDeviceStreamConfigurationClass ¶
type VZVirtioSoundDeviceStreamConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioSoundDeviceStreamConfigurationClass ¶
func GetVZVirtioSoundDeviceStreamConfigurationClass() VZVirtioSoundDeviceStreamConfigurationClass
GetVZVirtioSoundDeviceStreamConfigurationClass returns the class object for VZVirtioSoundDeviceStreamConfiguration.
func (VZVirtioSoundDeviceStreamConfigurationClass) Alloc ¶
func (vc VZVirtioSoundDeviceStreamConfigurationClass) Alloc() VZVirtioSoundDeviceStreamConfiguration
Alloc allocates memory for a new instance of the class.
type VZVirtioTraditionalMemoryBalloonDevice ¶
type VZVirtioTraditionalMemoryBalloonDevice struct {
VZMemoryBalloonDevice
}
The object you use to change the amount of memory allocated to the guest system.
Overview ¶
A VZVirtioTraditionalMemoryBalloonDevice object implements a Virtio-compliant balloon memory device, which lets you change the amount of physical memory assigned to the guest operating system. The virtual machine has no insight into the amount of memory its guest operating system uses. A memory balloon device lets you ask the guest operating system to relinquish memory voluntarily, which you might do if memory resources become scarce.
You don’t create a VZVirtioTraditionalMemoryBalloonDevice object directly. Instead, create a VZVirtioTraditionalMemoryBalloonDeviceConfiguration object and assign it to the [VZVirtioTraditionalMemoryBalloonDevice.MemoryBalloonDevices] property of your virtual machine configuration. In response, the virtual machine creates this object and assigns it to its [VZVirtioTraditionalMemoryBalloonDevice.MemoryBalloonDevices] property.
To use a memory balloon device, change the value in the VZVirtioTraditionalMemoryBalloonDevice.TargetVirtualMachineMemorySize property when your virtual machine is running. If the new value is smaller than the amount of currently assigned memory, the guest system may return a list of unused memory pages using the memory balloon device. If it does, the virtual machine releases those pages back to the host computer. If it doesn’t return any memory pages, the virtual machine leaves the guest’s memory size unchanged. If the new value is larger than the amount of currently assigned memory, the virtual machine reserves more pages for the guest operating system.
For optimal performance, the guest operating system should compact its memory before returning any pages back to the memory balloon device. Compacting the memory reduces fragmentation, and allows it to return contiguous blocks of free pages in the memory balloon device.
Changing the memory partition size ¶
- VZVirtioTraditionalMemoryBalloonDevice.TargetVirtualMachineMemorySize: The target amount of memory, in bytes, to make available to the virtual machine.
- VZVirtioTraditionalMemoryBalloonDevice.SetTargetVirtualMachineMemorySize
See: https://developer.apple.com/documentation/Virtualization/VZVirtioTraditionalMemoryBalloonDevice
func NewVZVirtioTraditionalMemoryBalloonDevice ¶
func NewVZVirtioTraditionalMemoryBalloonDevice() VZVirtioTraditionalMemoryBalloonDevice
NewVZVirtioTraditionalMemoryBalloonDevice creates a new VZVirtioTraditionalMemoryBalloonDevice instance.
func VZVirtioTraditionalMemoryBalloonDeviceFromID ¶
func VZVirtioTraditionalMemoryBalloonDeviceFromID(id objc.ID) VZVirtioTraditionalMemoryBalloonDevice
VZVirtioTraditionalMemoryBalloonDeviceFromID constructs a VZVirtioTraditionalMemoryBalloonDevice from an objc.ID.
The object you use to change the amount of memory allocated to the guest system.
func (VZVirtioTraditionalMemoryBalloonDevice) Autorelease ¶
func (v VZVirtioTraditionalMemoryBalloonDevice) Autorelease() VZVirtioTraditionalMemoryBalloonDevice
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtioTraditionalMemoryBalloonDevice) SetTargetVirtualMachineMemorySize ¶
func (v VZVirtioTraditionalMemoryBalloonDevice) SetTargetVirtualMachineMemorySize(value uint64)
func (VZVirtioTraditionalMemoryBalloonDevice) TargetVirtualMachineMemorySize ¶
func (v VZVirtioTraditionalMemoryBalloonDevice) TargetVirtualMachineMemorySize() uint64
The target amount of memory, in bytes, to make available to the virtual machine.
Discussion ¶
Use this property to change the amount of physical memory currently assigned to the guest operating system. If the new value is less than the current amount of physical memory, the virtual machine asks the guest operating system to return enough memory pages to fit within the new limit. If the guest complies, the virtual machine updates the guest’s physical memory size to the new value. If the guest doesn’t comply, the physical memory size remains unchanged.
The new value you specify must be a multiple of 1 megabyte — that is, 1024 * 1024 bytes. The value must also be less than or equal to the value in the [MemorySize] property of your VZVirtualMachineConfiguration object. If you specify a value that isn’t rounded to the nearest megabyte, the virtual machine rounds the memory size down to the nearest megabyte. If the resulting value is less than the value in [MinimumAllowedMemorySize], the virtual machine rounds up to the minimum value.
The virtual machine sets the initial value of this property to the value in the [MemorySize] property of your configuration object.
type VZVirtioTraditionalMemoryBalloonDeviceClass ¶
type VZVirtioTraditionalMemoryBalloonDeviceClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioTraditionalMemoryBalloonDeviceClass ¶
func GetVZVirtioTraditionalMemoryBalloonDeviceClass() VZVirtioTraditionalMemoryBalloonDeviceClass
GetVZVirtioTraditionalMemoryBalloonDeviceClass returns the class object for VZVirtioTraditionalMemoryBalloonDevice.
func (VZVirtioTraditionalMemoryBalloonDeviceClass) Alloc ¶
func (vc VZVirtioTraditionalMemoryBalloonDeviceClass) Alloc() VZVirtioTraditionalMemoryBalloonDevice
Alloc allocates memory for a new instance of the class.
type VZVirtioTraditionalMemoryBalloonDeviceConfiguration ¶
type VZVirtioTraditionalMemoryBalloonDeviceConfiguration struct {
VZMemoryBalloonDeviceConfiguration
}
A configuration object that provides a way to reclaim memory from the guest system.
Overview ¶
Create a VZVirtioTraditionalMemoryBalloonDeviceConfiguration object when you want the ability to reclaim memory from the guest operating system. After creating this object, add it to the VZVirtioTraditionalMemoryBalloonDeviceConfiguration.MemoryBalloonDevices property of your VZVirtualMachineConfiguration object. In response, the virtual machine provides a VZVirtioTraditionalMemoryBalloonDevice object, which you use to initiate memory-related requests with the guest system. Access that object from the VZVirtioTraditionalMemoryBalloonDeviceConfiguration.MemoryBalloonDevices property of VZVirtualMachine.
func NewVZVirtioTraditionalMemoryBalloonDeviceConfiguration ¶
func NewVZVirtioTraditionalMemoryBalloonDeviceConfiguration() VZVirtioTraditionalMemoryBalloonDeviceConfiguration
NewVZVirtioTraditionalMemoryBalloonDeviceConfiguration creates a new VZVirtioTraditionalMemoryBalloonDeviceConfiguration instance.
func VZVirtioTraditionalMemoryBalloonDeviceConfigurationFromID ¶
func VZVirtioTraditionalMemoryBalloonDeviceConfigurationFromID(id objc.ID) VZVirtioTraditionalMemoryBalloonDeviceConfiguration
VZVirtioTraditionalMemoryBalloonDeviceConfigurationFromID constructs a VZVirtioTraditionalMemoryBalloonDeviceConfiguration from an objc.ID.
A configuration object that provides a way to reclaim memory from the guest system.
func (VZVirtioTraditionalMemoryBalloonDeviceConfiguration) Autorelease ¶
func (v VZVirtioTraditionalMemoryBalloonDeviceConfiguration) Autorelease() VZVirtioTraditionalMemoryBalloonDeviceConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtioTraditionalMemoryBalloonDeviceConfiguration) Init ¶
func (v VZVirtioTraditionalMemoryBalloonDeviceConfiguration) Init() VZVirtioTraditionalMemoryBalloonDeviceConfiguration
Init initializes the instance.
func (VZVirtioTraditionalMemoryBalloonDeviceConfiguration) MemoryBalloonDevices ¶
func (v VZVirtioTraditionalMemoryBalloonDeviceConfiguration) MemoryBalloonDevices() IVZMemoryBalloonDevice
The array of devices that you use to adjust the amount of memory available to the guest system.
See: https://developer.apple.com/documentation/virtualization/vzvirtualmachine/memoryballoondevices
func (VZVirtioTraditionalMemoryBalloonDeviceConfiguration) SetMemoryBalloonDevices ¶
func (v VZVirtioTraditionalMemoryBalloonDeviceConfiguration) SetMemoryBalloonDevices(value IVZMemoryBalloonDevice)
type VZVirtioTraditionalMemoryBalloonDeviceConfigurationClass ¶
type VZVirtioTraditionalMemoryBalloonDeviceConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZVirtioTraditionalMemoryBalloonDeviceConfigurationClass ¶
func GetVZVirtioTraditionalMemoryBalloonDeviceConfigurationClass() VZVirtioTraditionalMemoryBalloonDeviceConfigurationClass
GetVZVirtioTraditionalMemoryBalloonDeviceConfigurationClass returns the class object for VZVirtioTraditionalMemoryBalloonDeviceConfiguration.
func (VZVirtioTraditionalMemoryBalloonDeviceConfigurationClass) Alloc ¶
func (vc VZVirtioTraditionalMemoryBalloonDeviceConfigurationClass) Alloc() VZVirtioTraditionalMemoryBalloonDeviceConfiguration
Alloc allocates memory for a new instance of the class.
type VZVirtualMachine ¶
type VZVirtualMachine struct {
objectivec.Object
}
An object that manages the overall state and configuration of your VM.
Overview ¶
A VZVirtualMachine object emulates a complete hardware machine of the same architecture as the underlying Mac computer. Use the VM to execute a guest operating system and any other apps you install. The VM manages the resources that the guest operating system uses, providing access to some hardware resources while emulating others.
Create and configure a VZVirtualMachineConfiguration object with details about how you want to configure your VM, and use that object to create the VZVirtualMachine object. After creating the VM, call the start(completionHandler:) method (Swift) or the VZVirtualMachine.StartWithCompletionHandler method (Objective-C) to start the VM and boot the guest operating system.
Creating the VM ¶
- VZVirtualMachine.InitWithConfiguration: Creates the VM and configures it with the specified data.
- VZVirtualMachine.InitWithConfigurationQueue: Creates and configures the VM with the specified data and dispatch queue.
Responding to a stopped VM ¶
- VZVirtualMachine.Delegate: A custom object you use to determine when the VM stops.
- VZVirtualMachine.SetDelegate
Starting and stopping the VM ¶
- VZVirtualMachine.StartWithCompletionHandler: Starts the VM and notifies the specified completion handler if startup was successful.
- VZVirtualMachine.StartWithOptionsCompletionHandler: Starts the VM with the options and a completion handler you provide.
- VZVirtualMachine.StopWithCompletionHandler: Stops a VM that’s in either a running or paused state.
- VZVirtualMachine.RequestStopWithError: Asks the guest operating system to stop running.
- VZVirtualMachine.PauseWithCompletionHandler: Pauses a running VM and notifies the specified completion handler of the results.
- VZVirtualMachine.ResumeWithCompletionHandler: Resumes a paused VM and notifies the specified completion handler of the results.
Configuring VM attributes at runtime ¶
- VZVirtualMachine.ConsoleDevices: The list of configured console devices on the VM.
- VZVirtualMachine.MemoryBalloonDevices: The array of devices that you use to adjust the amount of memory available to the guest system.
- VZVirtualMachine.NetworkDevices: The list of configured network devices on the VM.
- VZVirtualMachine.SocketDevices: The array of socket devices that the VM configures for use ports in the guest VM.
- VZVirtualMachine.DirectorySharingDevices: The list of configured directory-sharing devices on the VM.
- VZVirtualMachine.UsbControllers: The list of runtime USB controller objects.
Getting the state of the VM ¶
- VZVirtualMachine.State: The current execution state of the VM.
- VZVirtualMachine.GraphicsDevices: The list of configured graphics devices on the virtual machine.
- VZVirtualMachine.CanStart: A Boolean value that indicates whether you can start the VM.
- VZVirtualMachine.CanPause: A Boolean value that indicates whether you can pause the VM.
- VZVirtualMachine.CanResume: A Boolean value that indicates whether you can resume the VM.
- VZVirtualMachine.CanStop: A Boolean value that indicates whether you can stop the VM.
- VZVirtualMachine.CanRequestStop: A Boolean value that indicates whether you can ask the guest operating system to stop running.
- VZVirtualMachine.Queue: The queue associated with this virtual machine.
Saving and restoring the VM state ¶
- VZVirtualMachine.SaveMachineStateToURLCompletionHandler: Saves the state of a VM.
- VZVirtualMachine.RestoreMachineStateFromURLCompletionHandler: Restores a VM from a previously saved state.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine
func NewVZVirtualMachine ¶
func NewVZVirtualMachine() VZVirtualMachine
NewVZVirtualMachine creates a new VZVirtualMachine instance.
func NewVirtualMachineWithConfiguration ¶
func NewVirtualMachineWithConfiguration(configuration IVZVirtualMachineConfiguration) VZVirtualMachine
Creates the VM and configures it with the specified data.
configuration: The configuration of the VM. The configuration must be valid, and you can verify that it’s valid by calling its [ValidateWithError] method. The VM stores a copy of the configuration.
Return Value ¶
An initialized VM object.
Discussion ¶
This VM uses your app’s main queue for all operations. You must perform all VM-related operations on the main queue, and the VM executes all callbacks and delegate methods on the main queue.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/init(configuration:)
func NewVirtualMachineWithConfigurationQueue ¶
func NewVirtualMachineWithConfigurationQueue(configuration IVZVirtualMachineConfiguration, queue dispatch.Queue) VZVirtualMachine
Creates and configures the VM with the specified data and dispatch queue.
configuration: The configuration of the VM. The configuration must be valid, and you can verify that it’s valid by calling its [ValidateWithError] method. The VM stores a copy of the configuration.
queue: The serial dispatch queue for the VM. You must perform all VM-related operations on the specified queue, and the VM executes callbacks and delegate methods on the queue. If the queue isn’t serial, the behavior isn’t defined.
Return Value ¶
An initialized VM object.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/init(configuration:queue:)
func VZVirtualMachineFromID ¶
func VZVirtualMachineFromID(id objc.ID) VZVirtualMachine
VZVirtualMachineFromID constructs a VZVirtualMachine from an objc.ID.
An object that manages the overall state and configuration of your VM.
func (VZVirtualMachine) Autorelease ¶
func (v VZVirtualMachine) Autorelease() VZVirtualMachine
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtualMachine) CanPause ¶
func (v VZVirtualMachine) CanPause() bool
A Boolean value that indicates whether you can pause the VM.
Discussion ¶
The value of this property is true when the VM is in a state that allows you to pause it. Call the pause(completionHandler:) method (Swift) or [PauseWithCompletionHandler] method (Objective-C) to pause the VM.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/canPause
func (VZVirtualMachine) CanRequestStop ¶
func (v VZVirtualMachine) CanRequestStop() bool
A Boolean value that indicates whether you can ask the guest operating system to stop running.
Discussion ¶
The value of this property is true when the VM is in a state that allows it to stop running. Call the [RequestStopWithError] method to ask the guest operating system to stop running.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/canRequestStop
func (VZVirtualMachine) CanResume ¶
func (v VZVirtualMachine) CanResume() bool
A Boolean value that indicates whether you can resume the VM.
Discussion ¶
The value of this property is true when the VM is in a state that allows you to resume it. Call the resume(completionHandler:) method (Swift) or [ResumeWithCompletionHandler] method (Objective-C) to resume the VM
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/canResume
func (VZVirtualMachine) CanStart ¶
func (v VZVirtualMachine) CanStart() bool
A Boolean value that indicates whether you can start the VM.
Discussion ¶
The value of this property is true when the VM is in a state that allows you to start it. Call the start(completionHandler:) method (Swift) or [StartWithCompletionHandler] method (Objective-C) to start the VM.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/canStart
func (VZVirtualMachine) CanStop ¶
func (v VZVirtualMachine) CanStop() bool
A Boolean value that indicates whether you can stop the VM.
Discussion ¶
The value of this property is true when the VM is in a state that allows you to stop it. Call the [StopWithCompletionHandler] to stop the VM.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/canStop
func (VZVirtualMachine) ConsoleDevices ¶
func (v VZVirtualMachine) ConsoleDevices() []VZConsoleDevice
The list of configured console devices on the VM.
Discussion ¶
Return an empty array if there are no console devices configured.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/consoleDevices
func (VZVirtualMachine) Delegate ¶
func (v VZVirtualMachine) Delegate() VZVirtualMachineDelegate
A custom object you use to determine when the VM stops.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/delegate
func (VZVirtualMachine) DirectorySharingDevices ¶
func (v VZVirtualMachine) DirectorySharingDevices() []VZDirectorySharingDevice
The list of configured directory-sharing devices on the VM.
Discussion ¶
Returns an empty array if there are no directory sharing devices associated with this virtual machine.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/directorySharingDevices
func (VZVirtualMachine) GraphicsDevices ¶
func (v VZVirtualMachine) GraphicsDevices() []VZGraphicsDevice
The list of configured graphics devices on the virtual machine.
Discussion ¶
Returns an empty array if there are no graphics devices configured.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/graphicsDevices
func (VZVirtualMachine) Init ¶
func (v VZVirtualMachine) Init() VZVirtualMachine
Init initializes the instance.
func (VZVirtualMachine) InitWithConfiguration ¶
func (v VZVirtualMachine) InitWithConfiguration(configuration IVZVirtualMachineConfiguration) VZVirtualMachine
Creates the VM and configures it with the specified data.
configuration: The configuration of the VM. The configuration must be valid, and you can verify that it’s valid by calling its [ValidateWithError] method. The VM stores a copy of the configuration.
Return Value ¶
An initialized VM object.
Discussion ¶
This VM uses your app’s main queue for all operations. You must perform all VM-related operations on the main queue, and the VM executes all callbacks and delegate methods on the main queue.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/init(configuration:)
func (VZVirtualMachine) InitWithConfigurationQueue ¶
func (v VZVirtualMachine) InitWithConfigurationQueue(configuration IVZVirtualMachineConfiguration, queue dispatch.Queue) VZVirtualMachine
Creates and configures the VM with the specified data and dispatch queue.
configuration: The configuration of the VM. The configuration must be valid, and you can verify that it’s valid by calling its [ValidateWithError] method. The VM stores a copy of the configuration.
queue: The serial dispatch queue for the VM. You must perform all VM-related operations on the specified queue, and the VM executes callbacks and delegate methods on the queue. If the queue isn’t serial, the behavior isn’t defined.
Return Value ¶
An initialized VM object.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/init(configuration:queue:)
func (VZVirtualMachine) MemoryBalloonDevices ¶
func (v VZVirtualMachine) MemoryBalloonDevices() []VZMemoryBalloonDevice
The array of devices that you use to adjust the amount of memory available to the guest system.
Discussion ¶
If you included a VZVirtioTraditionalMemoryBalloonDeviceConfiguration object in the configuration of your VM, this property contains a corresponding VZVirtioTraditionalMemoryBalloonDevice object. Use that object to adjust the amount of memory available to the guest operating system.
If you didn’t include a memory balloon object in your configuration, this property contains an empty array.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/memoryBalloonDevices
func (VZVirtualMachine) NetworkDevices ¶
func (v VZVirtualMachine) NetworkDevices() []VZNetworkDevice
The list of configured network devices on the VM.
Discussion ¶
Returns an empty array if there are no configured network devices.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/networkDevices
func (VZVirtualMachine) Pause ¶
func (v VZVirtualMachine) Pause(ctx context.Context) error
Pause is a synchronous wrapper around VZVirtualMachine.PauseWithCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (VZVirtualMachine) PauseWithCompletionHandler ¶
func (v VZVirtualMachine) PauseWithCompletionHandler(completionHandler ErrorHandler)
Pauses a running VM and notifies the specified completion handler of the results.
Discussion ¶
Call this method to pause a VM that’s in the [VirtualMachineStateRunning] state. To determine if a VM is in a state that allows you to pause it, check the VM’s [CanPause] property.
If the VM stops before the attempt to pause it finishes, this method calls the completion handler with an error.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/pause()
func (VZVirtualMachine) Queue ¶
func (v VZVirtualMachine) Queue() dispatch.Queue
The queue associated with this virtual machine.
Discussion ¶
This property is a reference to the queue the framework used to create the virtual machine when initialized using [InitWithConfigurationQueue]. If not specified, the default is the main queue.
The property is accessible from any queue or actor.
Other properties or function calls on VZVirtualMachine must happen on this queue. The framework also invokes any completion handlers from asynchronous functions on this queue.
The following example shows use of the `VZVirtualMachine.Queue()` property to check to see if it’s possible to start a VM.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/queue
func (VZVirtualMachine) RequestStopWithError ¶
func (v VZVirtualMachine) RequestStopWithError() (bool, error)
Asks the guest operating system to stop running.
Discussion ¶
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/requestStop()
func (VZVirtualMachine) RestoreMachineStateFromURL ¶
func (v VZVirtualMachine) RestoreMachineStateFromURL(ctx context.Context, saveFileURL foundation.INSURL) error
RestoreMachineStateFromURL is a synchronous wrapper around VZVirtualMachine.RestoreMachineStateFromURLCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (VZVirtualMachine) RestoreMachineStateFromURLCompletionHandler ¶
func (v VZVirtualMachine) RestoreMachineStateFromURLCompletionHandler(saveFileURL foundation.INSURL, completionHandler ErrorHandler)
Restores a VM from a previously saved state.
saveFileURL: An [NSURL] that indicates the location where the framework reads the saved state of the VM. // [NSURL]: https://developer.apple.com/documentation/Foundation/NSURL
completionHandler: A block the framework calls after the VM has been successfully restored or upon an error.
Discussion ¶
Use this method to restore a stopped VM to a state previously saved to file through [SaveMachineStateToURLCompletionHandler].
The method fails if any of the following conditions are true:
- The Virtualization framework can’t open or read the file. - The file contents are incompatible with the current configuration. - The VM you’re trying to restore isn’t in the [VirtualMachineStateStopped] state.
If this method fails, the framework returns an error, and the VM state doesn’t change.
If this method is successful, the framework restores the VM and places it in the paused state.
func (VZVirtualMachine) Resume ¶
func (v VZVirtualMachine) Resume(ctx context.Context) error
Resume is a synchronous wrapper around VZVirtualMachine.ResumeWithCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (VZVirtualMachine) ResumeWithCompletionHandler ¶
func (v VZVirtualMachine) ResumeWithCompletionHandler(completionHandler ErrorHandler)
Resumes a paused VM and notifies the specified completion handler of the results.
Discussion ¶
Call this method to resume a VM that’s in the [VirtualMachineStatePaused] state. To determine if a VM is in a state that allows you to resume it, check the VM’s [CanResume] property.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/resume()
func (VZVirtualMachine) SaveMachineStateToURL ¶
func (v VZVirtualMachine) SaveMachineStateToURL(ctx context.Context, saveFileURL foundation.INSURL) error
SaveMachineStateToURL is a synchronous wrapper around VZVirtualMachine.SaveMachineStateToURLCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (VZVirtualMachine) SaveMachineStateToURLCompletionHandler ¶
func (v VZVirtualMachine) SaveMachineStateToURLCompletionHandler(saveFileURL foundation.INSURL, completionHandler ErrorHandler)
Saves the state of a VM.
saveFileURL: An [NSURL] that indicates the location where the framework writes the saved state of the VM. // [NSURL]: https://developer.apple.com/documentation/Foundation/NSURL
completionHandler: A block the framework calls after successfully saving the VM or upon returning an error.
The error parameter passed to the block is `nil` if the save was successful.
Discussion ¶
Use this method to save a paused VM to a file. You can use the contents of this file later to restore the state of the paused VM.
This call fails if the VM isn’t in a paused state or if the Virtualization framework can’t save the VM. If this method fails, the framework returns an error, and the VM state remains unchanged.
If this method is successful, the framework writes the file, and the VM state remains unchanged.
func (VZVirtualMachine) SetDelegate ¶
func (v VZVirtualMachine) SetDelegate(value VZVirtualMachineDelegate)
func (VZVirtualMachine) SocketDevices ¶
func (v VZVirtualMachine) SocketDevices() []VZSocketDevice
The array of socket devices that the VM configures for use ports in the guest VM.
Discussion ¶
If you included a VZVirtioSocketDeviceConfiguration object in the configuration of your VM, this property contains a corresponding VZVirtioSocketDevice object. Use that object to configure the ports your VM makes available to the guest operating system.
If you didn’t include a socket device in your configuration, this property contains an empty array.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/socketDevices
func (VZVirtualMachine) Start ¶
func (v VZVirtualMachine) Start(ctx context.Context) error
Start is a synchronous wrapper around VZVirtualMachine.StartWithCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (VZVirtualMachine) StartWithCompletionHandler ¶
func (v VZVirtualMachine) StartWithCompletionHandler(completionHandler ErrorHandler)
Starts the VM and notifies the specified completion handler if startup was successful.
Discussion ¶
Call this method to start a VM that’s in the [VirtualMachineStateStopped] or [VirtualMachineStateError] state.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/start()
func (VZVirtualMachine) StartWithOptions ¶
func (v VZVirtualMachine) StartWithOptions(ctx context.Context, options IVZVirtualMachineStartOptions) error
StartWithOptions is a synchronous wrapper around VZVirtualMachine.StartWithOptionsCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (VZVirtualMachine) StartWithOptionsCompletionHandler ¶
func (v VZVirtualMachine) StartWithOptionsCompletionHandler(options IVZVirtualMachineStartOptions, completionHandler ErrorHandler)
Starts the VM with the options and a completion handler you provide.
options: A VZVirtualMachineStartOptions object that describes controlling startup behavior of a VM using VZMacOSBootLoader.
completionHandler: The block to call with the results of the startup attempt. This block has no return value and has one [NSError] object as its parameter:
error: A result type that contains an error object when the VM fails to start. // [NSError]: https://developer.apple.com/documentation/Foundation/NSError
func (VZVirtualMachine) State ¶
func (v VZVirtualMachine) State() VZVirtualMachineState
The current execution state of the VM.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/state-swift.property
func (VZVirtualMachine) Stop ¶
func (v VZVirtualMachine) Stop(ctx context.Context) error
Stop is a synchronous wrapper around VZVirtualMachine.StopWithCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (VZVirtualMachine) StopWithCompletionHandler ¶
func (v VZVirtualMachine) StopWithCompletionHandler(completionHandler ErrorHandler)
Stops a VM that’s in either a running or paused state.
completionHandler: A block called after the VM stopped successfully, or on error. The error parameter passed to the block is `nil` if the stop was successful.
Discussion ¶
To determine if a VM is in a state that allows you to stop it, check the VM’s [CanStop] or [CanRequestStop] properties.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/stop(completionHandler:)
func (VZVirtualMachine) UsbControllers ¶
func (v VZVirtualMachine) UsbControllers() []VZUSBController
The list of runtime USB controller objects.
Discussion ¶
Return an empty array if there isn’t a configured controller USB.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/usbControllers
type VZVirtualMachineClass ¶
type VZVirtualMachineClass struct {
// contains filtered or unexported fields
}
func GetVZVirtualMachineClass ¶
func GetVZVirtualMachineClass() VZVirtualMachineClass
GetVZVirtualMachineClass returns the class object for VZVirtualMachine.
func (VZVirtualMachineClass) Alloc ¶
func (vc VZVirtualMachineClass) Alloc() VZVirtualMachine
Alloc allocates memory for a new instance of the class.
func (VZVirtualMachineClass) Supported ¶
func (_VZVirtualMachineClass VZVirtualMachineClass) Supported() bool
A Boolean value that indicates whether the system supports virtualization.
Discussion ¶
If virtualization is unavailable on the current device, no configuration is valid. If you want to know more about why virtualization is unavailable, call the [ValidateWithError] method of VZVirtualMachineConfiguration and examine the returned error object.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/isSupported
type VZVirtualMachineConfiguration ¶
type VZVirtualMachineConfiguration struct {
objectivec.Object
}
The environment attributes and list of devices to use during the configuration of macOS or Linux VMs.
Overview ¶
Use a VZVirtualMachineConfiguration object to configure the environment for a macOS or Linux VM. This configuration object contains information about the VM environment, including the devices that the VM exposes to the guest operating system. For example, use the configuration object to specify the network interfaces and storage devices that the operating system may access. For more information on the devices that macOS and Linux guests can support, see the Devices section on the Virtualization framework page.
You create and configure VZVirtualMachineConfiguration objects directly. After validating the configuration object, use it to initialize the VZVirtualMachine object that manages the virtual environment. The smallest valid configuration includes a value for the [BootLoader] property; you can also include more devices in the configuration depending on the needs of your app, such as graphics devices, shared directories, and so on. When you finish configuring the object, call the VZVirtualMachineConfiguration.ValidateWithError method to determine whether a VM can successfully support your configuration. A configuration object is invalid if your app doesn’t have the com.apple.security.virtualization entitlement.
For more information on using VZVirtualMachineConfiguration, see Installing macOS on a Virtual Machine and Creating and Running a Linux Virtual Machine.
Configuring the guest system ¶
- VZVirtualMachineConfiguration.BootLoader: The guest system to boot when the VM starts.
- VZVirtualMachineConfiguration.SetBootLoader
Setting the number of CPUs ¶
- VZVirtualMachineConfiguration.CPUCount: The number of CPUs you make available to the guest operating system.
- VZVirtualMachineConfiguration.SetCPUCount
Sizing the memory partition ¶
- VZVirtualMachineConfiguration.MemorySize: The memory size in bytes for the virtual machine. Must be a multiple of 1MB and between minimumAllowedMemorySize and maximumAllowedMemorySize.
- VZVirtualMachineConfiguration.SetMemorySize
- VZVirtualMachineConfiguration.MemoryBalloonDevices: An array that you configure with a memory balloon device, used to update the memory in the VM.
- VZVirtualMachineConfiguration.SetMemoryBalloonDevices
Adding devices to the VM ¶
- VZVirtualMachineConfiguration.ConsoleDevices: The array of console devices that you expose to the guest operating system.
- VZVirtualMachineConfiguration.SetConsoleDevices
- VZVirtualMachineConfiguration.NetworkDevices: The array of network devices that you expose to the guest operating system.
- VZVirtualMachineConfiguration.SetNetworkDevices
- VZVirtualMachineConfiguration.SocketDevices: The socket device that you use to implement port-based communication with the guest operating system.
- VZVirtualMachineConfiguration.SetSocketDevices
- VZVirtualMachineConfiguration.SerialPorts: The array of serial ports that you expose to the guest operating system.
- VZVirtualMachineConfiguration.SetSerialPorts
- VZVirtualMachineConfiguration.StorageDevices: The array of storage devices that you expose to the guest operating system.
- VZVirtualMachineConfiguration.SetStorageDevices
- VZVirtualMachineConfiguration.EntropyDevices: The array of randomization devices that you expose to the guest operating system.
- VZVirtualMachineConfiguration.SetEntropyDevices
- VZVirtualMachineConfiguration.AudioDevices: The list of audio devices.
- VZVirtualMachineConfiguration.SetAudioDevices
- VZVirtualMachineConfiguration.DirectorySharingDevices: The list of directory sharing devices.
- VZVirtualMachineConfiguration.SetDirectorySharingDevices
- VZVirtualMachineConfiguration.GraphicsDevices: The list of graphics devices.
- VZVirtualMachineConfiguration.SetGraphicsDevices
- VZVirtualMachineConfiguration.Keyboards: The list of keyboards.
- VZVirtualMachineConfiguration.SetKeyboards
- VZVirtualMachineConfiguration.Platform: The hardware platform to use.
- VZVirtualMachineConfiguration.SetPlatform
- VZVirtualMachineConfiguration.PointingDevices: The list of pointing devices.
- VZVirtualMachineConfiguration.SetPointingDevices
- VZVirtualMachineConfiguration.UsbControllers: The list of configured USB controllers for the VM.
- VZVirtualMachineConfiguration.SetUsbControllers
Validating the configuration ¶
- VZVirtualMachineConfiguration.ValidateWithError: Validates the current configuration settings and reports any issues that might prevent the successful initialization of the VM.
- VZVirtualMachineConfiguration.ValidateSaveRestoreSupportWithError: Determines whether the framework can save or restore the VM’s current configuration.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachineConfiguration
func NewVZVirtualMachineConfiguration ¶
func NewVZVirtualMachineConfiguration() VZVirtualMachineConfiguration
NewVZVirtualMachineConfiguration creates a new VZVirtualMachineConfiguration instance.
func VZVirtualMachineConfigurationFromID ¶
func VZVirtualMachineConfigurationFromID(id objc.ID) VZVirtualMachineConfiguration
VZVirtualMachineConfigurationFromID constructs a VZVirtualMachineConfiguration from an objc.ID.
The environment attributes and list of devices to use during the configuration of macOS or Linux VMs.
func (VZVirtualMachineConfiguration) AudioDevices ¶
func (v VZVirtualMachineConfiguration) AudioDevices() []VZAudioDeviceConfiguration
The list of audio devices.
Discussion ¶
The default value of this property is an empty array. If your VM exposes one or more audio devices, assign an array of VZAudioDeviceConfiguration objects to this property.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachineConfiguration/audioDevices
func (VZVirtualMachineConfiguration) Autorelease ¶
func (v VZVirtualMachineConfiguration) Autorelease() VZVirtualMachineConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtualMachineConfiguration) BootLoader ¶
func (v VZVirtualMachineConfiguration) BootLoader() IVZBootLoader
The guest system to boot when the VM starts.
Discussion ¶
Assign the boot loader object that contains information about how to load your guest operating system. For example, to configure your VM with a Linux operating system, assign a VZLinuxBootLoader object.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachineConfiguration/bootLoader
func (VZVirtualMachineConfiguration) CPUCount ¶
func (v VZVirtualMachineConfiguration) CPUCount() uint
The number of CPUs you make available to the guest operating system.
Discussion ¶
The value of this property must be greater than or equal to the value in [MinimumAllowedCPUCount], and less than or equal to the value in [MaximumAllowedCPUCount]. The system uses the number of physical CPUs on the current system to determine a default value.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachineConfiguration/cpuCount
func (VZVirtualMachineConfiguration) ConsoleDevices ¶
func (v VZVirtualMachineConfiguration) ConsoleDevices() []VZConsoleDeviceConfiguration
The array of console devices that you expose to the guest operating system.
Discussion ¶
The default value of this property is an empty array.
func (VZVirtualMachineConfiguration) CpuCount ¶
func (v VZVirtualMachineConfiguration) CpuCount() uint
The number of CPUs for the virtual machine. Must be between minimumAllowedCPUCount and maximumAllowedCPUCount. [Full Topic]
func (VZVirtualMachineConfiguration) DirectorySharingDevices ¶
func (v VZVirtualMachineConfiguration) DirectorySharingDevices() []VZDirectorySharingDeviceConfiguration
The list of directory sharing devices.
Discussion ¶
The default value of this property is an empty array. If your VM exposes one or more directory sharing devices, assign an array of VZDirectorySharingDeviceConfiguration objects to this property.
func (VZVirtualMachineConfiguration) EntropyDevices ¶
func (v VZVirtualMachineConfiguration) EntropyDevices() []VZEntropyDeviceConfiguration
The array of randomization devices that you expose to the guest operating system.
Discussion ¶
The default value of this property is an empty array. Add one or more entropy configuration objects if you want to provide the guest operating system with a source of entropy for its random number generator.
func (VZVirtualMachineConfiguration) GraphicsDevices ¶
func (v VZVirtualMachineConfiguration) GraphicsDevices() []VZGraphicsDeviceConfiguration
The list of graphics devices.
Discussion ¶
The default value of this property is an empty array. If your VM exposes one or more graphics devices, assign an array of VZGraphicsDeviceConfiguration objects to this property.
func (VZVirtualMachineConfiguration) Init ¶
func (v VZVirtualMachineConfiguration) Init() VZVirtualMachineConfiguration
Init initializes the instance.
func (VZVirtualMachineConfiguration) Keyboards ¶
func (v VZVirtualMachineConfiguration) Keyboards() []VZKeyboardConfiguration
The list of keyboards.
Discussion ¶
The default value of this property is an empty array. The default value of this property is an empty array. If your VM exposes one or more keyboards, assign an array of VZKeyboardConfiguration objects to this property.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachineConfiguration/keyboards
func (VZVirtualMachineConfiguration) MemoryBalloonDevices ¶
func (v VZVirtualMachineConfiguration) MemoryBalloonDevices() []VZMemoryBalloonDeviceConfiguration
An array that you configure with a memory balloon device, used to update the memory in the VM.
Discussion ¶
Use this property to request a memory balloon device from the VM. The VM initially reserves the amount of memory in the [MemorySize] property for the guest operating system. A balloon memory device asks the guest system to return memory pages that it isn’t using to the VM. You might use the device to reclaim memory when the amount of free memory on the host system runs low.
The default value of this property is an empty array, which doesn’t result in the creation of a balloon memory device. To create a balloon memory device, add a single VZVirtioTraditionalMemoryBalloonDeviceConfiguration object to the array. In response, the VM creates a VZVirtioTraditionalMemoryBalloonDevice object and adds it to its [MemoryBalloonDevices] property. Use that object to change the amount of memory reserved for the guest system.
func (VZVirtualMachineConfiguration) MemorySize ¶
func (v VZVirtualMachineConfiguration) MemorySize() uint64
The memory size in bytes for the virtual machine. Must be a multiple of 1MB and between minimumAllowedMemorySize and maximumAllowedMemorySize.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachineConfiguration/memorySize
func (VZVirtualMachineConfiguration) NetworkDevices ¶
func (v VZVirtualMachineConfiguration) NetworkDevices() []VZNetworkDeviceConfiguration
The array of network devices that you expose to the guest operating system.
Discussion ¶
The default value of this property is an empty array. If your VM supports one or more network devices, assign an array of supported network configurations to this property.
func (VZVirtualMachineConfiguration) Platform ¶
func (v VZVirtualMachineConfiguration) Platform() IVZPlatformConfiguration
The hardware platform to use.
Discussion ¶
This can be an instance of either VZGenericPlatformConfiguration or VZMacPlatformConfiguration. The default is VZGenericPlatformConfiguration.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachineConfiguration/platform
func (VZVirtualMachineConfiguration) PointingDevices ¶
func (v VZVirtualMachineConfiguration) PointingDevices() []VZPointingDeviceConfiguration
The list of pointing devices.
Discussion ¶
The default value of this property is an empty array. If your VM exposes one or more pointing devices, assign an array of VZPointingDeviceConfiguration objects to this property.
func (VZVirtualMachineConfiguration) SerialPorts ¶
func (v VZVirtualMachineConfiguration) SerialPorts() []VZSerialPortConfiguration
The array of serial ports that you expose to the guest operating system.
Discussion ¶
The default value of this property is an empty array. If your VM supports one or more serial communication ports, assign an array of supported serial configurations to this property. Don’t include more than 10 VZVirtioConsoleDeviceConfiguration objects in the array.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachineConfiguration/serialPorts
func (VZVirtualMachineConfiguration) SetAudioDevices ¶
func (v VZVirtualMachineConfiguration) SetAudioDevices(value []VZAudioDeviceConfiguration)
func (VZVirtualMachineConfiguration) SetBootLoader ¶
func (v VZVirtualMachineConfiguration) SetBootLoader(value IVZBootLoader)
func (VZVirtualMachineConfiguration) SetCPUCount ¶
func (v VZVirtualMachineConfiguration) SetCPUCount(value uint)
func (VZVirtualMachineConfiguration) SetConsoleDevices ¶
func (v VZVirtualMachineConfiguration) SetConsoleDevices(value []VZConsoleDeviceConfiguration)
func (VZVirtualMachineConfiguration) SetCpuCount ¶
func (v VZVirtualMachineConfiguration) SetCpuCount(value uint)
func (VZVirtualMachineConfiguration) SetDirectorySharingDevices ¶
func (v VZVirtualMachineConfiguration) SetDirectorySharingDevices(value []VZDirectorySharingDeviceConfiguration)
func (VZVirtualMachineConfiguration) SetEntropyDevices ¶
func (v VZVirtualMachineConfiguration) SetEntropyDevices(value []VZEntropyDeviceConfiguration)
func (VZVirtualMachineConfiguration) SetGraphicsDevices ¶
func (v VZVirtualMachineConfiguration) SetGraphicsDevices(value []VZGraphicsDeviceConfiguration)
func (VZVirtualMachineConfiguration) SetKeyboards ¶
func (v VZVirtualMachineConfiguration) SetKeyboards(value []VZKeyboardConfiguration)
func (VZVirtualMachineConfiguration) SetMemoryBalloonDevices ¶
func (v VZVirtualMachineConfiguration) SetMemoryBalloonDevices(value []VZMemoryBalloonDeviceConfiguration)
func (VZVirtualMachineConfiguration) SetMemorySize ¶
func (v VZVirtualMachineConfiguration) SetMemorySize(value uint64)
func (VZVirtualMachineConfiguration) SetNetworkDevices ¶
func (v VZVirtualMachineConfiguration) SetNetworkDevices(value []VZNetworkDeviceConfiguration)
func (VZVirtualMachineConfiguration) SetPlatform ¶
func (v VZVirtualMachineConfiguration) SetPlatform(value IVZPlatformConfiguration)
func (VZVirtualMachineConfiguration) SetPointingDevices ¶
func (v VZVirtualMachineConfiguration) SetPointingDevices(value []VZPointingDeviceConfiguration)
func (VZVirtualMachineConfiguration) SetSerialPorts ¶
func (v VZVirtualMachineConfiguration) SetSerialPorts(value []VZSerialPortConfiguration)
func (VZVirtualMachineConfiguration) SetSocketDevices ¶
func (v VZVirtualMachineConfiguration) SetSocketDevices(value []VZSocketDeviceConfiguration)
func (VZVirtualMachineConfiguration) SetStorageDevices ¶
func (v VZVirtualMachineConfiguration) SetStorageDevices(value []VZStorageDeviceConfiguration)
func (VZVirtualMachineConfiguration) SetUsbControllers ¶
func (v VZVirtualMachineConfiguration) SetUsbControllers(value []VZUSBControllerConfiguration)
func (VZVirtualMachineConfiguration) SocketDevices ¶
func (v VZVirtualMachineConfiguration) SocketDevices() []VZSocketDeviceConfiguration
The socket device that you use to implement port-based communication with the guest operating system.
Discussion ¶
The default value of this property is an empty array. If your VM supports port-based communication with sockets, create a single VZVirtioSocketDeviceConfiguration object, add it to an array, and assign it to this property. After initializing the virtual machine, use the object in its [SocketDevices] property to configure the port information and handlers.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachineConfiguration/socketDevices
func (VZVirtualMachineConfiguration) StorageDevices ¶
func (v VZVirtualMachineConfiguration) StorageDevices() []VZStorageDeviceConfiguration
The array of storage devices that you expose to the guest operating system.
Discussion ¶
The default value of this property is an empty array. If your VM exposes one or more storage devices, assign an array of VZVirtioBlockDeviceConfiguration objects to this property.
func (VZVirtualMachineConfiguration) UsbControllers ¶
func (v VZVirtualMachineConfiguration) UsbControllers() []VZUSBControllerConfiguration
The list of configured USB controllers for the VM.
Discussion ¶
Use this property to attach USB controllers to the VM configuration, as in the following example:
This property contains an empty array if the VZVirtualMachineConfiguration doesn’t have any configured USB controllers.
func (VZVirtualMachineConfiguration) ValidateSaveRestoreSupportWithError ¶
func (v VZVirtualMachineConfiguration) ValidateSaveRestoreSupportWithError() (bool, error)
Determines whether the framework can save or restore the VM’s current configuration.
Discussion ¶
Use this method to verify that a virtual machine with this configuration is savable.
- Not all configuration options can be safely saved and restored from the configuration file on disk. - If this method returns `false`, the caller should expect future calls to [SaveMachineStateToURLCompletionHandler] to fail.
func (VZVirtualMachineConfiguration) ValidateWithError ¶
func (v VZVirtualMachineConfiguration) ValidateWithError() (bool, error)
Validates the current configuration settings and reports any issues that might prevent the successful initialization of the VM.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachineConfiguration/validate()
type VZVirtualMachineConfigurationClass ¶
type VZVirtualMachineConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZVirtualMachineConfigurationClass ¶
func GetVZVirtualMachineConfigurationClass() VZVirtualMachineConfigurationClass
GetVZVirtualMachineConfigurationClass returns the class object for VZVirtualMachineConfiguration.
func (VZVirtualMachineConfigurationClass) Alloc ¶
func (vc VZVirtualMachineConfigurationClass) Alloc() VZVirtualMachineConfiguration
Alloc allocates memory for a new instance of the class.
func (VZVirtualMachineConfigurationClass) MaximumAllowedCPUCount ¶
func (_VZVirtualMachineConfigurationClass VZVirtualMachineConfigurationClass) MaximumAllowedCPUCount() uint
The maximum number of CPUs you may configure for the VM.
Discussion ¶
The value in the [CPUCount] property must be less than or equal to the value in this property.
func (VZVirtualMachineConfigurationClass) MaximumAllowedMemorySize ¶
func (_VZVirtualMachineConfigurationClass VZVirtualMachineConfigurationClass) MaximumAllowedMemorySize() uint64
The maximum amount of memory that you may configure for the VM.
Discussion ¶
The value in the [MemorySize] property must be less than or equal to the value in this property.
func (VZVirtualMachineConfigurationClass) MinimumAllowedCPUCount ¶
func (_VZVirtualMachineConfigurationClass VZVirtualMachineConfigurationClass) MinimumAllowedCPUCount() uint
The minimum number of CPUs you may configure for the VM.
Discussion ¶
The value in the [CPUCount] property must be greater than or equal to the value in this property.
func (VZVirtualMachineConfigurationClass) MinimumAllowedMemorySize ¶
func (_VZVirtualMachineConfigurationClass VZVirtualMachineConfigurationClass) MinimumAllowedMemorySize() uint64
The minimum amount of memory that you may configure for the VM.
Discussion ¶
The value in the [MemorySize] property must be greater than or equal to the value in this property.
type VZVirtualMachineDelegate ¶
type VZVirtualMachineDelegate interface {
objectivec.IObject
}
The methods you use to respond to changes in the state of the VM.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachineDelegate
type VZVirtualMachineDelegateConfig ¶
type VZVirtualMachineDelegateConfig struct {
// Stopping the VM
// VirtualMachineDidStopWithError — Tells the delegate that the VM stopped because of an error.
VirtualMachineDidStopWithError func(virtualMachine VZVirtualMachine, error_ foundation.NSError)
// Responding to network device errors
// VirtualMachineNetworkDeviceAttachmentWasDisconnectedWithError — The method the framework calls when an error causes a VM’s network attachment to disconnect.
VirtualMachineNetworkDeviceAttachmentWasDisconnectedWithError func(virtualMachine VZVirtualMachine, networkDevice VZNetworkDevice, error_ foundation.NSError)
// Other Methods
// GuestDidStopVirtualMachine — Tells the delegate that the guest operating system stopped the VM.
GuestDidStopVirtualMachine func(virtualMachine VZVirtualMachine)
}
VZVirtualMachineDelegateConfig holds optional typed callbacks for VZVirtualMachineDelegate methods. Set non-nil fields to register the corresponding Objective-C delegate method. Methods with nil callbacks are not registered, so [NSObject.RespondsToSelector] returns false for them — matching the Objective-C delegate pattern exactly.
See Apple Documentation for protocol details.
type VZVirtualMachineDelegateObject ¶
type VZVirtualMachineDelegateObject struct {
objectivec.Object
}
VZVirtualMachineDelegateObject wraps an existing Objective-C object that conforms to the VZVirtualMachineDelegate protocol.
func NewVZVirtualMachineDelegate ¶
func NewVZVirtualMachineDelegate(config VZVirtualMachineDelegateConfig) VZVirtualMachineDelegateObject
NewVZVirtualMachineDelegate creates an Objective-C object implementing the VZVirtualMachineDelegate protocol.
Each call registers a unique Objective-C class containing only the methods set in config. This means [NSObject.RespondsToSelector] works correctly for optional delegate methods — only non-nil callbacks are registered.
The returned VZVirtualMachineDelegateObject satisfies the VZVirtualMachineDelegate interface and can be passed directly to SetDelegate and similar methods.
See Apple Documentation for protocol details.
func VZVirtualMachineDelegateObjectFromID ¶
func VZVirtualMachineDelegateObjectFromID(id objc.ID) VZVirtualMachineDelegateObject
VZVirtualMachineDelegateObjectFromID constructs a VZVirtualMachineDelegateObject from an objc.ID. The object is determined to conform to the protocol at runtime.
func (VZVirtualMachineDelegateObject) BaseObject ¶
func (o VZVirtualMachineDelegateObject) BaseObject() objectivec.Object
func (VZVirtualMachineDelegateObject) GuestDidStopVirtualMachine ¶
func (o VZVirtualMachineDelegateObject) GuestDidStopVirtualMachine(virtualMachine IVZVirtualMachine)
Tells the delegate that the guest operating system stopped the VM.
virtualMachine: The VM that called the delegate method.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachineDelegate/guestDidStop(_:)
func (VZVirtualMachineDelegateObject) VirtualMachineDidStopWithError ¶
func (o VZVirtualMachineDelegateObject) VirtualMachineDidStopWithError(virtualMachine IVZVirtualMachine, error_ foundation.INSError)
Tells the delegate that the VM stopped because of an error.
virtualMachine: The VM that called the delegate method.
error: The error.
func (VZVirtualMachineDelegateObject) VirtualMachineNetworkDeviceAttachmentWasDisconnectedWithError ¶
func (o VZVirtualMachineDelegateObject) VirtualMachineNetworkDeviceAttachmentWasDisconnectedWithError(virtualMachine IVZVirtualMachine, networkDevice IVZNetworkDevice, error_ foundation.INSError)
The method the framework calls when an error causes a VM’s network attachment to disconnect.
virtualMachine: The VM invoking the delegate method.
networkDevice: The disconnected network device.
error: The error that describes why the virtual machine disconnected the network device.
Discussion ¶
The system invokes this method when the network interface fails to start, which results in the disconnection of the network attachment. This can happen in many situations such as initial boot, device reset, reboot, and so on. The system may invoke this method several times during a VM’s life cycle. After the system calls this method, the [Attachment] property is `nil`.
type VZVirtualMachineStartOptions ¶
type VZVirtualMachineStartOptions struct {
objectivec.Object
}
The abstract class for VM start options.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachineStartOptions
func NewVZVirtualMachineStartOptions ¶
func NewVZVirtualMachineStartOptions() VZVirtualMachineStartOptions
NewVZVirtualMachineStartOptions creates a new VZVirtualMachineStartOptions instance.
func VZVirtualMachineStartOptionsFromID ¶
func VZVirtualMachineStartOptionsFromID(id objc.ID) VZVirtualMachineStartOptions
VZVirtualMachineStartOptionsFromID constructs a VZVirtualMachineStartOptions from an objc.ID.
The abstract class for VM start options.
func (VZVirtualMachineStartOptions) Autorelease ¶
func (v VZVirtualMachineStartOptions) Autorelease() VZVirtualMachineStartOptions
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtualMachineStartOptions) Init ¶
func (v VZVirtualMachineStartOptions) Init() VZVirtualMachineStartOptions
Init initializes the instance.
type VZVirtualMachineStartOptionsClass ¶
type VZVirtualMachineStartOptionsClass struct {
// contains filtered or unexported fields
}
func GetVZVirtualMachineStartOptionsClass ¶
func GetVZVirtualMachineStartOptionsClass() VZVirtualMachineStartOptionsClass
GetVZVirtualMachineStartOptionsClass returns the class object for VZVirtualMachineStartOptions.
func (VZVirtualMachineStartOptionsClass) Alloc ¶
func (vc VZVirtualMachineStartOptionsClass) Alloc() VZVirtualMachineStartOptions
Alloc allocates memory for a new instance of the class.
type VZVirtualMachineState ¶
type VZVirtualMachineState int
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachine/State-swift.enum
const ( // VZVirtualMachineStateError: The VM encountered an unrecoverable error. VZVirtualMachineStateError VZVirtualMachineState = 3 // VZVirtualMachineStatePaused: The framework has paused a started VM. VZVirtualMachineStatePaused VZVirtualMachineState = 2 // VZVirtualMachineStatePausing: The VM is pausing. VZVirtualMachineStatePausing VZVirtualMachineState = 5 // VZVirtualMachineStateRestoring: The VM is restoring from a saved state. VZVirtualMachineStateRestoring VZVirtualMachineState = 9 // VZVirtualMachineStateResuming: The VM is resuming from a paused state. VZVirtualMachineStateResuming VZVirtualMachineState = 6 // VZVirtualMachineStateRunning: The VM is running. VZVirtualMachineStateRunning VZVirtualMachineState = 1 // VZVirtualMachineStateSaving: The VM is saving its state. VZVirtualMachineStateSaving VZVirtualMachineState = 8 // VZVirtualMachineStateStarting: The VM is configuring the hardware preparing to run. VZVirtualMachineStateStarting VZVirtualMachineState = 4 // VZVirtualMachineStateStopped: The VM isn’t running. VZVirtualMachineStateStopped VZVirtualMachineState = 0 // VZVirtualMachineStateStopping: The VM is stopping. VZVirtualMachineStateStopping VZVirtualMachineState = 7 )
func (VZVirtualMachineState) String ¶
func (e VZVirtualMachineState) String() string
type VZVirtualMachineView ¶
A view that allows user interaction with a VM.
Overview ¶
The VZVirtualMachineView is a UI element that shows the contents of the VM frame buffer that you can optionally configure to respond to changes in the host’s display settings. If the VM configuration includes a keyboard and a pointing device, the view forwards keyboard and mouse events to the VM through those devices.
Configuring the VM ¶
- VZVirtualMachineView.AutomaticallyReconfiguresDisplay: A Boolean value that indicates whether the graphics display associated with this view automatically reconfigures with respect to view changes.
- VZVirtualMachineView.SetAutomaticallyReconfiguresDisplay
- VZVirtualMachineView.CapturesSystemKeys: A Boolean value that determines whether the system should send certain system keyboard shortcuts to the guest instead of the host.
- VZVirtualMachineView.SetCapturesSystemKeys
- VZVirtualMachineView.VirtualMachine: The VM to display in the view.
- VZVirtualMachineView.SetVirtualMachine
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachineView
func NewVZVirtualMachineView ¶
func NewVZVirtualMachineView() VZVirtualMachineView
NewVZVirtualMachineView creates a new VZVirtualMachineView instance.
func VZVirtualMachineViewFromID ¶
func VZVirtualMachineViewFromID(id objc.ID) VZVirtualMachineView
VZVirtualMachineViewFromID constructs a VZVirtualMachineView from an objc.ID.
A view that allows user interaction with a VM.
func (VZVirtualMachineView) AutomaticallyReconfiguresDisplay ¶
func (v VZVirtualMachineView) AutomaticallyReconfiguresDisplay() bool
A Boolean value that indicates whether the graphics display associated with this view automatically reconfigures with respect to view changes.
Discussion ¶
Set this property to true to automatically resize or reconfigure this graphics display when the view properties update. For example, resizing the display when the view has a live resize operation. When enabled, the graphics display automatically reconfigures to match the host display environment.
You can set this property on only a single VZVirtualMachineView targeting a particular VZGraphicsDisplay at a time. If multiple VZVirtualMachineView views targeting the same VZGraphicsDisplay enable this property, only one view respects the property, and the framework disables the property on the other views.
The default is false.
func (VZVirtualMachineView) Autorelease ¶
func (v VZVirtualMachineView) Autorelease() VZVirtualMachineView
Autorelease adds the receiver to the current autorelease pool.
func (VZVirtualMachineView) CapturesSystemKeys ¶
func (v VZVirtualMachineView) CapturesSystemKeys() bool
A Boolean value that determines whether the system should send certain system keyboard shortcuts to the guest instead of the host.
Discussion ¶
Defaults to `false.`
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachineView/capturesSystemKeys
func (VZVirtualMachineView) Init ¶
func (v VZVirtualMachineView) Init() VZVirtualMachineView
Init initializes the instance.
func (VZVirtualMachineView) SetAutomaticallyReconfiguresDisplay ¶
func (v VZVirtualMachineView) SetAutomaticallyReconfiguresDisplay(value bool)
func (VZVirtualMachineView) SetCapturesSystemKeys ¶
func (v VZVirtualMachineView) SetCapturesSystemKeys(value bool)
func (VZVirtualMachineView) SetVirtualMachine ¶
func (v VZVirtualMachineView) SetVirtualMachine(value IVZVirtualMachine)
func (VZVirtualMachineView) VirtualMachine ¶
func (v VZVirtualMachineView) VirtualMachine() IVZVirtualMachine
The VM to display in the view.
See: https://developer.apple.com/documentation/Virtualization/VZVirtualMachineView/virtualMachine
type VZVirtualMachineViewClass ¶
type VZVirtualMachineViewClass struct {
// contains filtered or unexported fields
}
func GetVZVirtualMachineViewClass ¶
func GetVZVirtualMachineViewClass() VZVirtualMachineViewClass
GetVZVirtualMachineViewClass returns the class object for VZVirtualMachineView.
func (VZVirtualMachineViewClass) Alloc ¶
func (vc VZVirtualMachineViewClass) Alloc() VZVirtualMachineView
Alloc allocates memory for a new instance of the class.
type VZVmnetNetworkDeviceAttachment ¶
type VZVmnetNetworkDeviceAttachment struct {
VZNetworkDeviceAttachment
}
A network device attachment that allows a custom network topology.
Overview ¶
The Virtualization framework backs this attachment by a logical network which the client creates and customizes through the vmnet framework APIs to allow custom network topology which allows multiple virtual machines to appear on the same network and connect with each other.
Creating the vmnet network device attachment ¶
- VZVmnetNetworkDeviceAttachment.InitWithNetwork: Creates the attachment and configures it with the specified data.
- VZVmnetNetworkDeviceAttachment.Network: The network object that the you initialize the attachment with.
See: https://developer.apple.com/documentation/Virtualization/VZVmnetNetworkDeviceAttachment
func NewVZVmnetNetworkDeviceAttachment ¶
func NewVZVmnetNetworkDeviceAttachment() VZVmnetNetworkDeviceAttachment
NewVZVmnetNetworkDeviceAttachment creates a new VZVmnetNetworkDeviceAttachment instance.
func NewVmnetNetworkDeviceAttachmentWithNetwork ¶
func NewVmnetNetworkDeviceAttachmentWithNetwork(network vmnet.Vmnet_network_ref) VZVmnetNetworkDeviceAttachment
Creates the attachment and configures it with the specified data.
network: The logical network object
Return Value ¶
An initialized VZVmnetNetworkDeviceAttachment object, or `nil` if there was an error.
Discussion ¶
To ensure proper isolation between application processes, a virtual machine (VM) can only use the `network` that the same application process creates. If an application’s VM tries to use a `network` that another application’s VM creates, initialization fails.
For more information on vmnet configuration requirements and restrictions, see vmnet
The following example demonstrates how to create and initialize a custom network using VZVmnetNetworkDeviceAttachment.
func VZVmnetNetworkDeviceAttachmentFromID ¶
func VZVmnetNetworkDeviceAttachmentFromID(id objc.ID) VZVmnetNetworkDeviceAttachment
VZVmnetNetworkDeviceAttachmentFromID constructs a VZVmnetNetworkDeviceAttachment from an objc.ID.
A network device attachment that allows a custom network topology.
func (VZVmnetNetworkDeviceAttachment) Autorelease ¶
func (v VZVmnetNetworkDeviceAttachment) Autorelease() VZVmnetNetworkDeviceAttachment
Autorelease adds the receiver to the current autorelease pool.
func (VZVmnetNetworkDeviceAttachment) Init ¶
func (v VZVmnetNetworkDeviceAttachment) Init() VZVmnetNetworkDeviceAttachment
Init initializes the instance.
func (VZVmnetNetworkDeviceAttachment) InitWithNetwork ¶
func (v VZVmnetNetworkDeviceAttachment) InitWithNetwork(network vmnet.Vmnet_network_ref) VZVmnetNetworkDeviceAttachment
Creates the attachment and configures it with the specified data.
network: The logical network object
Return Value ¶
An initialized VZVmnetNetworkDeviceAttachment object, or `nil` if there was an error.
Discussion ¶
To ensure proper isolation between application processes, a virtual machine (VM) can only use the `network` that the same application process creates. If an application’s VM tries to use a `network` that another application’s VM creates, initialization fails.
For more information on vmnet configuration requirements and restrictions, see vmnet
The following example demonstrates how to create and initialize a custom network using VZVmnetNetworkDeviceAttachment.
func (VZVmnetNetworkDeviceAttachment) Network ¶
func (v VZVmnetNetworkDeviceAttachment) Network() unsafe.Pointer
The network object that the you initialize the attachment with.
See: https://developer.apple.com/documentation/Virtualization/VZVmnetNetworkDeviceAttachment/network
type VZVmnetNetworkDeviceAttachmentClass ¶
type VZVmnetNetworkDeviceAttachmentClass struct {
// contains filtered or unexported fields
}
func GetVZVmnetNetworkDeviceAttachmentClass ¶
func GetVZVmnetNetworkDeviceAttachmentClass() VZVmnetNetworkDeviceAttachmentClass
GetVZVmnetNetworkDeviceAttachmentClass returns the class object for VZVmnetNetworkDeviceAttachment.
func (VZVmnetNetworkDeviceAttachmentClass) Alloc ¶
func (vc VZVmnetNetworkDeviceAttachmentClass) Alloc() VZVmnetNetworkDeviceAttachment
Alloc allocates memory for a new instance of the class.
type VZXHCIController ¶
type VZXHCIController struct {
VZUSBController
}
A class that represents a USB Extensible Host Controller Interface (XHCI) controller in a VM.
Overview ¶
Don’t create VZXHCIController objects directly. Instead, you create a VZXHCIController object at runtime though the [VZXHCIController.UsbControllers] property of the VZVirtualMachineConfiguration object by populating it with VZXHCIControllerConfiguration objects.
See: https://developer.apple.com/documentation/Virtualization/VZXHCIController
func NewVZXHCIController ¶
func NewVZXHCIController() VZXHCIController
NewVZXHCIController creates a new VZXHCIController instance.
func VZXHCIControllerFromID ¶
func VZXHCIControllerFromID(id objc.ID) VZXHCIController
VZXHCIControllerFromID constructs a VZXHCIController from an objc.ID.
A class that represents a USB Extensible Host Controller Interface (XHCI) controller in a VM.
func (VZXHCIController) Autorelease ¶
func (x VZXHCIController) Autorelease() VZXHCIController
Autorelease adds the receiver to the current autorelease pool.
func (VZXHCIController) Init ¶
func (x VZXHCIController) Init() VZXHCIController
Init initializes the instance.
type VZXHCIControllerClass ¶
type VZXHCIControllerClass struct {
// contains filtered or unexported fields
}
func GetVZXHCIControllerClass ¶
func GetVZXHCIControllerClass() VZXHCIControllerClass
GetVZXHCIControllerClass returns the class object for VZXHCIController.
func (VZXHCIControllerClass) Alloc ¶
func (vc VZXHCIControllerClass) Alloc() VZXHCIController
Alloc allocates memory for a new instance of the class.
type VZXHCIControllerConfiguration ¶
type VZXHCIControllerConfiguration struct {
VZUSBControllerConfiguration
}
The configuration object for the USB Extensible Host Controller Interface (XHCI) controller.
Overview ¶
Use this configuration to create a USB XHCI controller device for the guest.
See: https://developer.apple.com/documentation/Virtualization/VZXHCIControllerConfiguration
func NewVZXHCIControllerConfiguration ¶
func NewVZXHCIControllerConfiguration() VZXHCIControllerConfiguration
NewVZXHCIControllerConfiguration creates a new VZXHCIControllerConfiguration instance.
func VZXHCIControllerConfigurationFromID ¶
func VZXHCIControllerConfigurationFromID(id objc.ID) VZXHCIControllerConfiguration
VZXHCIControllerConfigurationFromID constructs a VZXHCIControllerConfiguration from an objc.ID.
The configuration object for the USB Extensible Host Controller Interface (XHCI) controller.
func (VZXHCIControllerConfiguration) Autorelease ¶
func (x VZXHCIControllerConfiguration) Autorelease() VZXHCIControllerConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (VZXHCIControllerConfiguration) Init ¶
func (x VZXHCIControllerConfiguration) Init() VZXHCIControllerConfiguration
Init initializes the instance.
type VZXHCIControllerConfigurationClass ¶
type VZXHCIControllerConfigurationClass struct {
// contains filtered or unexported fields
}
func GetVZXHCIControllerConfigurationClass ¶
func GetVZXHCIControllerConfigurationClass() VZXHCIControllerConfigurationClass
GetVZXHCIControllerConfigurationClass returns the class object for VZXHCIControllerConfiguration.
func (VZXHCIControllerConfigurationClass) Alloc ¶
func (vc VZXHCIControllerConfigurationClass) Alloc() VZXHCIControllerConfiguration
Alloc allocates memory for a new instance of the class.
type VirtioSocketConnectionErrorHandler ¶
type VirtioSocketConnectionErrorHandler = func(*VZVirtioSocketConnection, error)
VirtioSocketConnectionErrorHandler is the signature for a completion handler block.
Used by:
Source Files
¶
- blocks.gen.go
- delegate_class_counter.gen.go
- doc.gen.go
- enums.gen.go
- functions.gen.go
- generate.go
- global_vars.gen.go
- graphics_display_observer_protocol.gen.go
- network_block_device_storage_device_attachment_delegate_protocol.gen.go
- types.gen.go
- undefined_types.gen.go
- usb_device_configuration_protocol.gen.go
- usb_device_protocol.gen.go
- virtio_console_device_delegate_protocol.gen.go
- virtio_socket_listener_delegate_protocol.gen.go
- virtual_machine_delegate_protocol.gen.go
- vz_audio_device_configuration.gen.go
- vz_audio_input_stream_source.gen.go
- vz_audio_output_stream_sink.gen.go
- vz_boot_loader.gen.go
- vz_bridged_network_device_attachment.gen.go
- vz_bridged_network_interface.gen.go
- vz_console_device.gen.go
- vz_console_device_configuration.gen.go
- vz_console_port_configuration.gen.go
- vz_directory_share.gen.go
- vz_directory_sharing_device.gen.go
- vz_directory_sharing_device_configuration.gen.go
- vz_disk_block_device_storage_device_attachment.gen.go
- vz_disk_image_storage_device_attachment.gen.go
- vz_entropy_device_configuration.gen.go
- vz_file_handle_network_device_attachment.gen.go
- vz_file_handle_serial_port_attachment.gen.go
- vz_file_serial_port_attachment.gen.go
- vz_generic_machine_identifier.gen.go
- vz_generic_platform_configuration.gen.go
- vz_graphics_device.gen.go
- vz_graphics_device_configuration.gen.go
- vz_graphics_display.gen.go
- vz_graphics_display_configuration.gen.go
- vz_host_audio_input_stream_source.gen.go
- vz_host_audio_output_stream_sink.gen.go
- vz_keyboard_configuration.gen.go
- vz_linux_boot_loader.gen.go
- vz_linux_rosetta_abstract_socket_caching_options.gen.go
- vz_linux_rosetta_caching_options.gen.go
- vz_linux_rosetta_directory_share.gen.go
- vz_linux_rosetta_unix_socket_caching_options.gen.go
- vz_mac_auxiliary_storage.gen.go
- vz_mac_graphics_device.gen.go
- vz_mac_graphics_device_configuration.gen.go
- vz_mac_graphics_display.gen.go
- vz_mac_graphics_display_configuration.gen.go
- vz_mac_hardware_model.gen.go
- vz_mac_keyboard_configuration.gen.go
- vz_mac_machine_identifier.gen.go
- vz_mac_os_boot_loader.gen.go
- vz_mac_os_configuration_requirements.gen.go
- vz_mac_os_installer.gen.go
- vz_mac_os_restore_image.gen.go
- vz_mac_os_virtual_machine_start_options.gen.go
- vz_mac_platform_configuration.gen.go
- vz_mac_trackpad_configuration.gen.go
- vz_memory_balloon_device.gen.go
- vz_memory_balloon_device_configuration.gen.go
- vz_multiple_directory_share.gen.go
- vz_network_block_device_storage_device_attachment.gen.go
- vz_network_device.gen.go
- vz_network_device_attachment.gen.go
- vz_network_device_configuration.gen.go
- vz_platform_configuration.gen.go
- vz_pointing_device_configuration.gen.go
- vz_serial_port_attachment.gen.go
- vz_serial_port_configuration.gen.go
- vz_shared_directory.gen.go
- vz_single_directory_share.gen.go
- vz_socket_device.gen.go
- vz_socket_device_configuration.gen.go
- vz_spice_agent_port_attachment.gen.go
- vz_storage_device.gen.go
- vz_storage_device_attachment.gen.go
- vz_storage_device_configuration.gen.go
- vz_virtio_block_device_configuration.gen.go
- vz_virtio_console_device.gen.go
- vz_virtio_console_device_configuration.gen.go
- vz_virtio_console_device_serial_port_configuration.gen.go
- vz_virtio_console_port.gen.go
- vz_virtio_console_port_array.gen.go
- vz_virtio_console_port_configuration.gen.go
- vz_virtio_console_port_configuration_array.gen.go
- vz_virtio_entropy_device_configuration.gen.go
- vz_virtio_file_system_device.gen.go
- vz_virtio_file_system_device_configuration.gen.go
- vz_virtio_graphics_device.gen.go
- vz_virtio_graphics_device_configuration.gen.go
- vz_virtio_graphics_scanout.gen.go
- vz_virtio_graphics_scanout_configuration.gen.go
- vz_virtio_network_device_configuration.gen.go
- vz_virtio_socket_connection.gen.go
- vz_virtio_socket_device.gen.go
- vz_virtio_socket_device_configuration.gen.go
- vz_virtio_socket_listener.gen.go
- vz_virtio_sound_device_configuration.gen.go
- vz_virtio_sound_device_input_stream_configuration.gen.go
- vz_virtio_sound_device_output_stream_configuration.gen.go
- vz_virtio_sound_device_stream_configuration.gen.go
- vz_virtio_traditional_memory_balloon_device.gen.go
- vz_virtio_traditional_memory_balloon_device_configuration.gen.go
- vz_virtual_machine.gen.go
- vz_virtual_machine_configuration.gen.go
- vz_virtual_machine_start_options.gen.go
- vz_virtual_machine_view.gen.go
- vz_vmnet_network_device_attachment.gen.go
- vzefi_boot_loader.gen.go
- vzefi_variable_store.gen.go
- vzmac_address.gen.go
- vznat_network_device_attachment.gen.go
- vznvm_express_controller_device_configuration.gen.go
- vzusb_controller.gen.go
- vzusb_controller_configuration.gen.go
- vzusb_keyboard_configuration.gen.go
- vzusb_mass_storage_device.gen.go
- vzusb_mass_storage_device_configuration.gen.go
- vzusb_screen_coordinate_pointing_device_configuration.gen.go
- vzxhci_controller.gen.go
- vzxhci_controller_configuration.gen.go