virtualization

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package virtualization provides purego-based Go bindings for the macOS Virtualization framework.

Apple documentation: https://developer.apple.com/documentation/virtualization

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VZBridgedNetworkInterfaceNetworkInterfaces

func VZBridgedNetworkInterfaceNetworkInterfaces() *foundation.NSArray[*VZBridgedNetworkInterface]

@abstract Return the list of network interfaces available for bridging.

func VZErrorDomain

func VZErrorDomain() *foundation.NSString

func VZGenericPlatformConfigurationIsNestedVirtualizationSupported

func VZGenericPlatformConfigurationIsNestedVirtualizationSupported() bool

@abstract Indicate whether or not nested virtualization is available. @discussion Nested virtualization is only available on some hardware and software configurations. It may also be disabled by policy. Use this property to check if support is available for the platform. If nested virtualization is supported, use `nestedVirtualizationEnabled` to enable the feature. @see nestedVirtualizationEnabled.

func VZLinuxRosettaAbstractSocketCachingOptionsMaximumNameLength

func VZLinuxRosettaAbstractSocketCachingOptionsMaximumNameLength() uint

@abstract The maximum allowed length of name, as defined by the sockaddr_un structure in Linux.

func VZLinuxRosettaDirectoryShareInstallRosettaWithCompletionHandler

func VZLinuxRosettaDirectoryShareInstallRosettaWithCompletionHandler(completionHandler func(unsafe.Pointer))

@abstract Download and install Rosetta support for Linux binaries if necessary. @param completionHandler The completion handler gets called with a valid error on failure and a nil error on success. It will also be invoked on an arbitrary queue. @discussion The call prompts the user through the download and install flow for Rosetta. This call is successful if the error is nil. @see +[VZLinuxRosettaDirectoryShare availability]

func VZLinuxRosettaUnixSocketCachingOptionsMaximumPathLength

func VZLinuxRosettaUnixSocketCachingOptionsMaximumPathLength() uint

@abstract The maximum allowed length of path, as defined by the sockaddr_un structure in Linux.

func VZMacOSRestoreImageFetchLatestSupportedWithCompletionHandler

func VZMacOSRestoreImageFetchLatestSupportedWithCompletionHandler(completionHandler func(*VZMacOSRestoreImage, unsafe.Pointer))

@abstract Fetch the latest restore image supported by this host from the network. @param completionHandler Block called after the restore image fetch has succeeded or failed. The error parameter passed to the block is nil if the restore image was fetched successfully. The completion handler will be invoked on an arbitrary thread. @discussion A VZMacOSInstaller object must be constructed with a VZMacOSRestoreImage loaded from a file on the local filesystem. A VZMacOSRestoreImage fetched with the fetchLatestSupportedWithCompletionHandler method will have a URL property referring to a restore image on the network. To use such a restore image, the file referred to by the URL property should be downloaded locally (using NSURLSession or similar API). After the restore image has been downloaded, a VZMacOSInstaller can be initialized using a URL referring to the local file.

func VZMacOSRestoreImageLoadFileURLCompletionHandler

func VZMacOSRestoreImageLoadFileURLCompletionHandler(fileURL *foundation.NSURL, completionHandler func(*VZMacOSRestoreImage, unsafe.Pointer))

@abstract Load a restore image from a file on the local file system. @param fileURL A file URL indicating the macOS restore image to load. @param completionHandler Block called after the restore image has successfully loaded or has failed to load. The error parameter passed to the block is nil if the restore image was loaded successfully. The completion handler will be invoked on an arbitrary thread. @discussion VZMacOSRestoreImage can load IPSW installation media from a local file. If the fileURL parameter does not refer to a local file, an exception will be raised.

func VZMultipleDirectoryShareCanonicalizedNameFromName

func VZMultipleDirectoryShareCanonicalizedNameFromName(name *foundation.NSString) *foundation.NSString

@abstract Canonicalize a string to be a valid directory name. @param name The name to canonicalize. @discussion This returns nil when it cannot produce a valid name. When not nil, the result is a valid directory name. @see +[VZMultipleDirectoryShare validateName:error:]

func VZMultipleDirectoryShareValidateNameError

func VZMultipleDirectoryShareValidateNameError(name *foundation.NSString) (bool, error)

@abstract Check if a name is a valid directory name. @param name The name to validate. @param error If not nil, assigned with an error describing why the name is not valid. @discussion The name must not be empty, have characters unsafe for file systems, be longer than NAME_MAX, or other restrictions. @see +[VZMultipleDirectoryShare canonicalizedNameFromName:]

func VZNetworkBlockDeviceStorageDeviceAttachmentValidateURLError

func VZNetworkBlockDeviceStorageDeviceAttachmentValidateURLError(uRL *foundation.NSURL) (bool, error)

@abstract Check if URL is a valid NBD URL. @param URL The NBD URL to validate. @param error If not nil, assigned with an error describing why the URL is not valid. @discussion See https://github.com/NetworkBlockDevice/nbd/blob/master/doc/uri.md for more detailed descriptions of valid URIs. This method checks that the URL is well-formed, it does not attempt to access the URL.

func VZSpiceAgentPortAttachmentSpiceAgentPortName

func VZSpiceAgentPortAttachmentSpiceAgentPortName() *foundation.NSString

@abstract The Spice agent port name. @discussion A console port configured with this name will spawn a Spice guest agent if supported by the guest. VZConsolePortConfiguration.attachment must be set to VZSpiceAgentPortAttachment. VZVirtioConsolePortConfiguration.isConsole must remain false on a Spice agent port.

func VZVirtioBlockDeviceConfigurationValidateBlockDeviceIdentifierError

func VZVirtioBlockDeviceConfigurationValidateBlockDeviceIdentifierError(blockDeviceIdentifier *foundation.NSString) (bool, error)

@abstract Check if blockDeviceIdentifier is a valid Virtio block device identifier. @param blockDeviceIdentifier The device identifier to validate. @param error If not nil, assigned with an error describing why the device identifier is not valid. @discussion The device identifier must be at most 20 bytes in length and ASCII-encodable.

func VZVirtioFileSystemDeviceConfigurationMacOSGuestAutomountTag

func VZVirtioFileSystemDeviceConfigurationMacOSGuestAutomountTag() *foundation.NSString

@abstract The macOS automount tag. @discussion A device configured with this tag will be automatically mounted in a macOS guest.

func VZVirtioFileSystemDeviceConfigurationValidateTagError

func VZVirtioFileSystemDeviceConfigurationValidateTagError(tag *foundation.NSString) (bool, error)

@abstract Check if tag is a valid Virtio file system tag. @param tag The tag to validate. @param error If not nil, assigned with an error describing why the tag is not valid. @discussion The tag must be non-empty and less than 36 bytes when encoded in UTF-8.

func VZVirtualMachineConfigurationMaximumAllowedCPUCount

func VZVirtualMachineConfigurationMaximumAllowedCPUCount() uint

@abstract Maximum number of CPUs for a virtual machine. @see VZVirtualMachineConfiguration.CPUCount

func VZVirtualMachineConfigurationMaximumAllowedMemorySize

func VZVirtualMachineConfigurationMaximumAllowedMemorySize() uint64

@abstract Maximum amount of memory allowed for a virtual machine. @see VZVirtualMachineConfiguration.memorySize

func VZVirtualMachineConfigurationMinimumAllowedCPUCount

func VZVirtualMachineConfigurationMinimumAllowedCPUCount() uint

@abstract Minimum number of CPUs for a virtual machine. @see VZVirtualMachineConfiguration.CPUCount

func VZVirtualMachineConfigurationMinimumAllowedMemorySize

func VZVirtualMachineConfigurationMinimumAllowedMemorySize() uint64

@abstract Minimum amount of memory required by virtual machines. @see VZVirtualMachineConfiguration.memorySize

func VZVirtualMachineIsSupported

func VZVirtualMachineIsSupported() bool

@abstract Indicate whether or not virtualization is available. @discussion If virtualization is unavailable, no VZVirtualMachineConfiguration will validate. The validation error of the VZVirtualMachineConfiguration provides more information about why virtualization is unavailable.

Types

type Acl_entry_id_t

type Acl_entry_id_t int64
const (
	ACL_FIRST_ENTRY Acl_entry_id_t = 0
	ACL_NEXT_ENTRY  Acl_entry_id_t = -1
	ACL_LAST_ENTRY  Acl_entry_id_t = -2
)

func (Acl_entry_id_t) String

func (e Acl_entry_id_t) String() string

type Acl_flag_t

type Acl_flag_t int64
const (
	ACL_FLAG_DEFER_INHERIT      Acl_flag_t = 1
	ACL_FLAG_NO_INHERIT         Acl_flag_t = 131072
	ACL_ENTRY_INHERITED         Acl_flag_t = 16
	ACL_ENTRY_FILE_INHERIT      Acl_flag_t = 32
	ACL_ENTRY_DIRECTORY_INHERIT Acl_flag_t = 64
	ACL_ENTRY_LIMIT_INHERIT     Acl_flag_t = 128
	ACL_ENTRY_ONLY_INHERIT      Acl_flag_t = 256
)

func (Acl_flag_t) String

func (e Acl_flag_t) String() string

type Acl_perm_t

type Acl_perm_t int64
const (
	ACL_READ_DATA           Acl_perm_t = 2
	ACL_LIST_DIRECTORY      Acl_perm_t = 2
	ACL_WRITE_DATA          Acl_perm_t = 4
	ACL_ADD_FILE            Acl_perm_t = 4
	ACL_EXECUTE             Acl_perm_t = 8
	ACL_SEARCH              Acl_perm_t = 8
	ACL_DELETE              Acl_perm_t = 16
	ACL_APPEND_DATA         Acl_perm_t = 32
	ACL_ADD_SUBDIRECTORY    Acl_perm_t = 32
	ACL_DELETE_CHILD        Acl_perm_t = 64
	ACL_READ_ATTRIBUTES     Acl_perm_t = 128
	ACL_WRITE_ATTRIBUTES    Acl_perm_t = 256
	ACL_READ_EXTATTRIBUTES  Acl_perm_t = 512
	ACL_WRITE_EXTATTRIBUTES Acl_perm_t = 1024
	ACL_READ_SECURITY       Acl_perm_t = 2048
	ACL_WRITE_SECURITY      Acl_perm_t = 4096
	ACL_CHANGE_OWNER        Acl_perm_t = 8192
	ACL_SYNCHRONIZE         Acl_perm_t = 1048576
)

func (Acl_perm_t) String

func (e Acl_perm_t) String() string

type Acl_tag_t

type Acl_tag_t int64
const (
	ACL_UNDEFINED_TAG  Acl_tag_t = 0
	ACL_EXTENDED_ALLOW Acl_tag_t = 1
	ACL_EXTENDED_DENY  Acl_tag_t = 2
)

func (Acl_tag_t) String

func (e Acl_tag_t) String() string

type Acl_type_t

type Acl_type_t int64
const (
	ACL_TYPE_EXTENDED Acl_type_t = 256
	ACL_TYPE_ACCESS   Acl_type_t = 0
	ACL_TYPE_DEFAULT  Acl_type_t = 1
	ACL_TYPE_AFS      Acl_type_t = 2
	ACL_TYPE_CODA     Acl_type_t = 3
	ACL_TYPE_NTFS     Acl_type_t = 4
	ACL_TYPE_NWFS     Acl_type_t = 5
)

func (Acl_type_t) String

func (e Acl_type_t) String() string

type CGLCPContextPriorityRequest

type CGLCPContextPriorityRequest int64
const (
	KCGLCPContextPriorityRequestHigh   CGLCPContextPriorityRequest = 0
	KCGLCPContextPriorityRequestNormal CGLCPContextPriorityRequest = 1
	KCGLCPContextPriorityRequestLow    CGLCPContextPriorityRequest = 2
)

func (CGLCPContextPriorityRequest) String

type Clockid_t

type Clockid_t int64

func (Clockid_t) String

func (e Clockid_t) String() string

type Dispatch_autorelease_frequency_t

type Dispatch_autorelease_frequency_t uint64
const (
	DISPATCH_AUTORELEASE_FREQUENCY_INHERIT   Dispatch_autorelease_frequency_t = 0
	DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM Dispatch_autorelease_frequency_t = 1
	DISPATCH_AUTORELEASE_FREQUENCY_NEVER     Dispatch_autorelease_frequency_t = 2
)

func (Dispatch_autorelease_frequency_t) String

type Dispatch_block_flags_t

type Dispatch_block_flags_t uint64
const (
	DISPATCH_BLOCK_BARRIER           Dispatch_block_flags_t = 1
	DISPATCH_BLOCK_DETACHED          Dispatch_block_flags_t = 2
	DISPATCH_BLOCK_ASSIGN_CURRENT    Dispatch_block_flags_t = 4
	DISPATCH_BLOCK_NO_QOS_CLASS      Dispatch_block_flags_t = 8
	DISPATCH_BLOCK_INHERIT_QOS_CLASS Dispatch_block_flags_t = 16
	DISPATCH_BLOCK_ENFORCE_QOS_CLASS Dispatch_block_flags_t = 32
)

func (Dispatch_block_flags_t) String

func (e Dispatch_block_flags_t) String() string

type EvCmd

type EvCmd int64
const (
	EVNOP   EvCmd = 0
	EVHIDE  EvCmd = 1
	EVSHOW  EvCmd = 2
	EVMOVE  EvCmd = 3
	EVLEVEL EvCmd = 4
)

func (EvCmd) String

func (e EvCmd) String() string

type Filesec_property_t

type Filesec_property_t int64
const (
	FILESEC_OWNER         Filesec_property_t = 1
	FILESEC_GROUP         Filesec_property_t = 2
	FILESEC_UUID          Filesec_property_t = 3
	FILESEC_MODE          Filesec_property_t = 4
	FILESEC_ACL           Filesec_property_t = 5
	FILESEC_GRPUUID       Filesec_property_t = 6
	FILESEC_ACL_RAW       Filesec_property_t = 100
	FILESEC_ACL_ALLOCSIZE Filesec_property_t = 101
)

func (Filesec_property_t) String

func (e Filesec_property_t) String() string

type Idtype_t

type Idtype_t int64
const (
	P_ALL  Idtype_t = 0
	P_PID  Idtype_t = 1
	P_PGID Idtype_t = 2
)

func (Idtype_t) String

func (e Idtype_t) String() string

type Ipc_info_object_type_t

type Ipc_info_object_type_t int64
const (
	IPC_OTYPE_NONE                 Ipc_info_object_type_t = 0
	IPC_OTYPE_THREAD_CONTROL       Ipc_info_object_type_t = 1
	IPC_OTYPE_TASK_CONTROL         Ipc_info_object_type_t = 2
	IPC_OTYPE_HOST                 Ipc_info_object_type_t = 3
	IPC_OTYPE_HOST_PRIV            Ipc_info_object_type_t = 4
	IPC_OTYPE_PROCESSOR            Ipc_info_object_type_t = 5
	IPC_OTYPE_PROCESSOR_SET        Ipc_info_object_type_t = 6
	IPC_OTYPE_PROCESSOR_SET_NAME   Ipc_info_object_type_t = 7
	IPC_OTYPE_TIMER                Ipc_info_object_type_t = 8
	IPC_OTYPE_PORT_SUBST_ONCE      Ipc_info_object_type_t = 9
	IPC_OTYPE_MIG                  Ipc_info_object_type_t = 10
	IPC_OTYPE_MEMORY_OBJECT        Ipc_info_object_type_t = 11
	IPC_OTYPE_XMM_PAGER            Ipc_info_object_type_t = 12
	IPC_OTYPE_XMM_KERNEL           Ipc_info_object_type_t = 13
	IPC_OTYPE_XMM_REPLY            Ipc_info_object_type_t = 14
	IPC_OTYPE_UND_REPLY            Ipc_info_object_type_t = 15
	IPC_OTYPE_HOST_NOTIFY          Ipc_info_object_type_t = 16
	IPC_OTYPE_HOST_SECURITY        Ipc_info_object_type_t = 17
	IPC_OTYPE_LEDGER               Ipc_info_object_type_t = 18
	IPC_OTYPE_MAIN_DEVICE          Ipc_info_object_type_t = 19
	IPC_OTYPE_TASK_NAME            Ipc_info_object_type_t = 20
	IPC_OTYPE_SUBSYSTEM            Ipc_info_object_type_t = 21
	IPC_OTYPE_IO_DONE_QUEUE        Ipc_info_object_type_t = 22
	IPC_OTYPE_SEMAPHORE            Ipc_info_object_type_t = 23
	IPC_OTYPE_LOCK_SET             Ipc_info_object_type_t = 24
	IPC_OTYPE_CLOCK                Ipc_info_object_type_t = 25
	IPC_OTYPE_CLOCK_CTRL           Ipc_info_object_type_t = 26
	IPC_OTYPE_IOKIT_IDENT          Ipc_info_object_type_t = 27
	IPC_OTYPE_NAMED_ENTRY          Ipc_info_object_type_t = 28
	IPC_OTYPE_IOKIT_CONNECT        Ipc_info_object_type_t = 29
	IPC_OTYPE_IOKIT_OBJECT         Ipc_info_object_type_t = 30
	IPC_OTYPE_UPL                  Ipc_info_object_type_t = 31
	IPC_OTYPE_MEM_OBJ_CONTROL      Ipc_info_object_type_t = 32
	IPC_OTYPE_AU_SESSIONPORT       Ipc_info_object_type_t = 33
	IPC_OTYPE_FILEPORT             Ipc_info_object_type_t = 34
	IPC_OTYPE_LABELH               Ipc_info_object_type_t = 35
	IPC_OTYPE_TASK_RESUME          Ipc_info_object_type_t = 36
	IPC_OTYPE_VOUCHER              Ipc_info_object_type_t = 37
	IPC_OTYPE_VOUCHER_ATTR_CONTROL Ipc_info_object_type_t = 38
	IPC_OTYPE_WORK_INTERVAL        Ipc_info_object_type_t = 39
	IPC_OTYPE_UX_HANDLER           Ipc_info_object_type_t = 40
	IPC_OTYPE_UEXT_OBJECT          Ipc_info_object_type_t = 41
	IPC_OTYPE_ARCADE_REG           Ipc_info_object_type_t = 42
	IPC_OTYPE_EVENTLINK            Ipc_info_object_type_t = 43
	IPC_OTYPE_TASK_INSPECT         Ipc_info_object_type_t = 44
	IPC_OTYPE_TASK_READ            Ipc_info_object_type_t = 45
	IPC_OTYPE_THREAD_INSPECT       Ipc_info_object_type_t = 46
	IPC_OTYPE_THREAD_READ          Ipc_info_object_type_t = 47
	IPC_OTYPE_SUID_CRED            Ipc_info_object_type_t = 48
	IPC_OTYPE_HYPERVISOR           Ipc_info_object_type_t = 49
	IPC_OTYPE_TASK_ID_TOKEN        Ipc_info_object_type_t = 50
	IPC_OTYPE_TASK_FATAL           Ipc_info_object_type_t = 51
	IPC_OTYPE_KCDATA               Ipc_info_object_type_t = 52
	IPC_OTYPE_EXCLAVES_RESOURCE    Ipc_info_object_type_t = 53
	IPC_OTYPE_THREAD_RESUME        Ipc_info_object_type_t = 54
	IPC_OTYPE_UNKNOWN              Ipc_info_object_type_t = 4294967295
)

func (Ipc_info_object_type_t) String

func (e Ipc_info_object_type_t) String() string

type Launch_data_type_t

type Launch_data_type_t int64
const (
	LAUNCH_DATA_DICTIONARY Launch_data_type_t = 1
	LAUNCH_DATA_ARRAY      Launch_data_type_t = 2
	LAUNCH_DATA_FD         Launch_data_type_t = 3
	LAUNCH_DATA_INTEGER    Launch_data_type_t = 4
	LAUNCH_DATA_REAL       Launch_data_type_t = 5
	LAUNCH_DATA_BOOL       Launch_data_type_t = 6
	LAUNCH_DATA_STRING     Launch_data_type_t = 7
	LAUNCH_DATA_OPAQUE     Launch_data_type_t = 8
	LAUNCH_DATA_ERRNO      Launch_data_type_t = 9
	LAUNCH_DATA_MACHPORT   Launch_data_type_t = 10
)

func (Launch_data_type_t) String

func (e Launch_data_type_t) String() string

type MDLabelDomain

type MDLabelDomain int64

@typedef MDLabelDomain @abstract These constants are used to specify a domain to MDLabelCreate().

const (
	KMDLabelUserDomain  MDLabelDomain = 0
	KMDLabelLocalDomain MDLabelDomain = 1
)

func (MDLabelDomain) String

func (e MDLabelDomain) String() string

type MDQueryOptionFlags

type MDQueryOptionFlags int64
const (
	KMDQuerySynchronous        MDQueryOptionFlags = 1
	KMDQueryWantsUpdates       MDQueryOptionFlags = 4
	KMDQueryAllowFSTranslation MDQueryOptionFlags = 8
)

func (MDQueryOptionFlags) String

func (e MDQueryOptionFlags) String() string

type MDQuerySortOptionFlags

type MDQuerySortOptionFlags int64

@enum MDQuerySortOptionFlags @constant kMDQueryReverseSortOrderFlag Sort the attribute in reverse order.

const (
	KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)

func (MDQuerySortOptionFlags) String

func (e MDQuerySortOptionFlags) String() string

type Mach_vm_range_flags_t

type Mach_vm_range_flags_t int64
const (
	MACH_VM_RANGE_NONE Mach_vm_range_flags_t = 0
)

func (Mach_vm_range_flags_t) String

func (e Mach_vm_range_flags_t) String() string

type Mach_vm_range_flavor_t

type Mach_vm_range_flavor_t int64
const (
	MACH_VM_RANGE_FLAVOR_INVALID Mach_vm_range_flavor_t = 0
	MACH_VM_RANGE_FLAVOR_V1      Mach_vm_range_flavor_t = 1
)

func (Mach_vm_range_flavor_t) String

func (e Mach_vm_range_flavor_t) String() string

type Mach_vm_range_tag_t

type Mach_vm_range_tag_t int64
const (
	MACH_VM_RANGE_DEFAULT Mach_vm_range_tag_t = 0
	MACH_VM_RANGE_DATA    Mach_vm_range_tag_t = 1
	MACH_VM_RANGE_FIXED   Mach_vm_range_tag_t = 2
)

func (Mach_vm_range_tag_t) String

func (e Mach_vm_range_tag_t) String() string

type Mpo_flags_t

type Mpo_flags_t int64
const (
	MPO_PORT                            Mpo_flags_t = 0
	MPO_SERVICE_PORT                    Mpo_flags_t = 1024
	MPO_CONNECTION_PORT                 Mpo_flags_t = 2048
	MPO_REPLY_PORT                      Mpo_flags_t = 4096
	MPO_WEAK_REPLY_PORT                 Mpo_flags_t = 16384
	MPO_NOTIFICATION_PORT               Mpo_flags_t = 17408
	MPO_EXCEPTION_PORT                  Mpo_flags_t = 32768
	MPO_CONNECTION_PORT_WITH_PORT_ARRAY Mpo_flags_t = 65536
)

func (Mpo_flags_t) String

func (e Mpo_flags_t) String() string

type NXMouseButton

type NXMouseButton int64
const (
	NX_OneButton   NXMouseButton = 0
	NX_LeftButton  NXMouseButton = 1
	NX_RightButton NXMouseButton = 2
)

func (NXMouseButton) String

func (e NXMouseButton) String() string

type Os_clockid_t

type Os_clockid_t int64
const (
	OS_CLOCK_MACH_ABSOLUTE_TIME Os_clockid_t = 32
)

func (Os_clockid_t) String

func (e Os_clockid_t) String() string

type Os_unfair_lock_flags_t

type Os_unfair_lock_flags_t int64
const (
	OS_UNFAIR_LOCK_FLAG_NONE          Os_unfair_lock_flags_t = 0
	OS_UNFAIR_LOCK_FLAG_ADAPTIVE_SPIN Os_unfair_lock_flags_t = 262144
)

func (Os_unfair_lock_flags_t) String

func (e Os_unfair_lock_flags_t) String() string

type PMPageToPaperMappingType

type PMPageToPaperMappingType int64
const (
	KPMPageToPaperMappingNone       PMPageToPaperMappingType = 1
	KPMPageToPaperMappingScaleToFit PMPageToPaperMappingType = 2
)

func (PMPageToPaperMappingType) String

func (e PMPageToPaperMappingType) String() string

type Ptrauth_key

type Ptrauth_key int64
const (
	Ptrauth_key_none                     Ptrauth_key = -1
	Ptrauth_key_asia                     Ptrauth_key = 0
	Ptrauth_key_asib                     Ptrauth_key = 1
	Ptrauth_key_asda                     Ptrauth_key = 2
	Ptrauth_key_asdb                     Ptrauth_key = 3
	Ptrauth_key_process_independent_code Ptrauth_key = 0
	Ptrauth_key_process_dependent_code   Ptrauth_key = 1
	Ptrauth_key_process_independent_data Ptrauth_key = 2
	Ptrauth_key_process_dependent_data   Ptrauth_key = 3
	Ptrauth_key_return_address           Ptrauth_key = 1
	Ptrauth_key_frame_pointer            Ptrauth_key = 3
	Ptrauth_key_function_pointer         Ptrauth_key = 0
	Ptrauth_key_block_function           Ptrauth_key = 0
	Ptrauth_key_cxx_vtable_pointer       Ptrauth_key = 2
	Ptrauth_key_method_list_pointer      Ptrauth_key = 2
	Ptrauth_key_objc_isa_pointer         Ptrauth_key = 2
	Ptrauth_key_objc_super_pointer       Ptrauth_key = 2
	Ptrauth_key_objc_sel_pointer         Ptrauth_key = 3
	Ptrauth_key_objc_class_ro_pointer    Ptrauth_key = 2
	Ptrauth_key_block_descriptor_pointer Ptrauth_key = 2
	Ptrauth_key_init_fini_pointer        Ptrauth_key = 0
)

func (Ptrauth_key) String

func (e Ptrauth_key) String() string

type Qos_class_t

type Qos_class_t uint32
const (
	QOS_CLASS_USER_INTERACTIVE Qos_class_t = 33
	QOS_CLASS_USER_INITIATED   Qos_class_t = 25
	QOS_CLASS_DEFAULT          Qos_class_t = 21
	QOS_CLASS_UTILITY          Qos_class_t = 17
	QOS_CLASS_BACKGROUND       Qos_class_t = 9
	QOS_CLASS_UNSPECIFIED      Qos_class_t = 0
)

func (Qos_class_t) String

func (e Qos_class_t) String() string

type VZAudioOutputStreamSink

type VZAudioOutputStreamSink struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzaudiooutputstreamsink

func VZAudioOutputStreamSinkFromID

func VZAudioOutputStreamSinkFromID(id objc.ID) *VZAudioOutputStreamSink

type VZBootLoader

type VZBootLoader struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzbootloader

func VZBootLoaderFromID

func VZBootLoaderFromID(id objc.ID) *VZBootLoader

type VZBridgedNetworkDeviceAttachment

type VZBridgedNetworkDeviceAttachment struct {
	VZNetworkDeviceAttachment
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzbridgednetworkdeviceattachment

func VZBridgedNetworkDeviceAttachmentFromID

func VZBridgedNetworkDeviceAttachmentFromID(id objc.ID) *VZBridgedNetworkDeviceAttachment

func (*VZBridgedNetworkDeviceAttachment) InitWithInterface

@abstract Initialize a VZBridgedNetworkDeviceAttachment with a host network interface. @param interface Host network interface controller.

func (*VZBridgedNetworkDeviceAttachment) Interface

type VZBridgedNetworkInterface

type VZBridgedNetworkInterface struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzbridgednetworkinterface

func VZBridgedNetworkInterfaceFromID

func VZBridgedNetworkInterfaceFromID(id objc.ID) *VZBridgedNetworkInterface

func (*VZBridgedNetworkInterface) Identifier

@abstract Return the unique identifier for this interface. The identifier is the BSD name associated with the interface (e.g. "en0").

func (*VZBridgedNetworkInterface) LocalizedDisplayName

func (o *VZBridgedNetworkInterface) LocalizedDisplayName() *foundation.NSString

@abstract Return a display name if available (e.g. "Ethernet").

type VZConsoleDevice

type VZConsoleDevice struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzconsoledevice

func VZConsoleDeviceFromID

func VZConsoleDeviceFromID(id objc.ID) *VZConsoleDevice

type VZConsolePortConfiguration

type VZConsolePortConfiguration struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzconsoleportconfiguration

func VZConsolePortConfigurationFromID

func VZConsolePortConfigurationFromID(id objc.ID) *VZConsolePortConfiguration

func (*VZConsolePortConfiguration) Attachment

func (*VZConsolePortConfiguration) SetAttachment

func (o *VZConsolePortConfiguration) SetAttachment(attachment *VZSerialPortAttachment)

type VZDirectoryShare

type VZDirectoryShare struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzdirectoryshare

func VZDirectoryShareFromID

func VZDirectoryShareFromID(id objc.ID) *VZDirectoryShare

type VZDiskBlockDeviceStorageDeviceAttachment

type VZDiskBlockDeviceStorageDeviceAttachment struct {
	VZStorageDeviceAttachment
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzdiskblockdevicestoragedeviceattachment

func VZDiskBlockDeviceStorageDeviceAttachmentFromID

func VZDiskBlockDeviceStorageDeviceAttachmentFromID(id objc.ID) *VZDiskBlockDeviceStorageDeviceAttachment

func (*VZDiskBlockDeviceStorageDeviceAttachment) FileHandle

@abstract File handle to the underlying disk used for storage by the attachment.

func (*VZDiskBlockDeviceStorageDeviceAttachment) InitWithFileHandleReadOnlySynchronizationModeError

func (o *VZDiskBlockDeviceStorageDeviceAttachment) InitWithFileHandleReadOnlySynchronizationModeError(fileHandle *foundation.NSFileHandle, readOnly bool, synchronizationMode VZDiskSynchronizationMode) (*VZDiskBlockDeviceStorageDeviceAttachment, error)

@abstract Initialize the disk attachment from a file handle. @param fileHandle File handle to a block device. @param readOnly If YES, the disk attachment is read only, otherwise, if the file handle allows writes, the device can write data into it. @param synchronizationMode Defines how the disk synchronizes with the underlying storage when the guest operating system flushes data. @param error If not nil, assigned with the error if the initialization failed. @return An initialized `VZDiskBlockDeviceStorageDeviceAttachment` or nil if there was an error. @discussion The file handle is retained by the disk attachment. The handle must be open when the virtual machine starts. The `readOnly` parameter affects how the disk is exposed to the guest operating system by the storage controller. If the disk is intended to be used read-only, it is also recommended to open the file handle as read-only.

func (*VZDiskBlockDeviceStorageDeviceAttachment) IsReadOnly

@abstract Whether the underlying disk attachment is read-only.

func (*VZDiskBlockDeviceStorageDeviceAttachment) SynchronizationMode

@abstract The mode in which the disk image synchronizes data with the underlying storage device.

type VZDiskImageCachingMode

type VZDiskImageCachingMode int64
const (
	VZDiskImageCachingModeAutomatic VZDiskImageCachingMode = 0
	VZDiskImageCachingModeUncached  VZDiskImageCachingMode = 1
	VZDiskImageCachingModeCached    VZDiskImageCachingMode = 2
)

func (VZDiskImageCachingMode) String

func (e VZDiskImageCachingMode) String() string

type VZDiskImageStorageDeviceAttachment

type VZDiskImageStorageDeviceAttachment struct {
	VZStorageDeviceAttachment
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzdiskimagestoragedeviceattachment

func VZDiskImageStorageDeviceAttachmentFromID

func VZDiskImageStorageDeviceAttachmentFromID(id objc.ID) *VZDiskImageStorageDeviceAttachment

func (*VZDiskImageStorageDeviceAttachment) CachingMode

@abstract How disk image data is cached by the host.

func (*VZDiskImageStorageDeviceAttachment) InitWithURLReadOnlyCachingModeSynchronizationModeError

func (o *VZDiskImageStorageDeviceAttachment) InitWithURLReadOnlyCachingModeSynchronizationModeError(url *foundation.NSURL, readOnly bool, cachingMode VZDiskImageCachingMode, synchronizationMode VZDiskImageSynchronizationMode) (*VZDiskImageStorageDeviceAttachment, error)

@abstract Initialize the attachment from a local file url. @param url Local file URL to the disk image in RAW format. @param readOnly If YES, the device attachment is read-only, otherwise the device can write data to the disk image. @param cachingMode Whether host data caching is enabled for the disk image. @param synchronizationMode How the disk image synchronizes with the underlying storage when the guest operating system flushes data. @param error If not nil, assigned with the error if the initialization failed. @return A newly initialized VZDiskImageStorageDeviceAttachment. If an error was encountered returns @c nil, and @c error contains the error.

func (*VZDiskImageStorageDeviceAttachment) InitWithURLReadOnlyError

func (o *VZDiskImageStorageDeviceAttachment) InitWithURLReadOnlyError(url *foundation.NSURL, readOnly bool) (*VZDiskImageStorageDeviceAttachment, error)

@abstract Initialize the attachment from a local file url. @param url Local file URL to the disk image in RAW format. @param readOnly If YES, the device attachment is read-only, otherwise the device can write data to the disk image. @param error If not nil, assigned with the error if the initialization failed. @return A newly initialized VZDiskImageStorageDeviceAttachment. If an error was encountered returns @c nil, and @c error contains the error.

func (*VZDiskImageStorageDeviceAttachment) IsReadOnly

func (o *VZDiskImageStorageDeviceAttachment) IsReadOnly() bool

@abstract Whether the underlying disk image is read-only.

func (*VZDiskImageStorageDeviceAttachment) SynchronizationMode

@abstract The mode in which the disk image synchronizes data with the underlying storage device.

func (*VZDiskImageStorageDeviceAttachment) URL

@abstract URL of the underlying disk image.

type VZDiskImageSynchronizationMode

type VZDiskImageSynchronizationMode int64
const (
	// The data is synchronized to the permanent storage holding the disk image. No synchronized data is lost on panic or loss of power.
	VZDiskImageSynchronizationModeFull VZDiskImageSynchronizationMode = 1
	// Synchronize the data to the drive. This mode synchronizes the data with the drive, but does not ensure the data is moved from the disk's internal cache to permanent storage. This is a best-effort mode with the same guarantees as the fsync() system call.
	VZDiskImageSynchronizationModeFsync VZDiskImageSynchronizationMode = 2
	// Do not synchronize the data with the permanent storage. This option does not guarantee data integrity if any error condition occurs such as disk full on the host, panic, power loss, etc. This mode is useful when a virtual machine is only run once to perform a task to completion or failure. In that case, the disk image cannot safely be reused on failure. Using this mode may result in improved performance since no synchronization with the underlying storage is necessary.
	VZDiskImageSynchronizationModeNone VZDiskImageSynchronizationMode = 3
)

func (VZDiskImageSynchronizationMode) String

type VZDiskSynchronizationMode

type VZDiskSynchronizationMode int64
const (
	// Perform all synchronization operations as requested by the guest OS. With VZDiskSynchronizationModeFull, "flush" and "barrier" commands from the guest result in their counterpart synchronization commands being sent to the disk implementation.
	VZDiskSynchronizationModeFull VZDiskSynchronizationMode = 0
	// Do not synchronize the data with the permanent storage. This option does not guarantee data integrity if any error condition occurs such as disk full on the host, panic, power loss, etc. This mode is useful when a virtual machine is only run once to perform a task to completion or failure. In case of failure, the state of blocks on disk and their order is undefined. Using this mode may result in improved performance since no synchronization with the underlying storage is necessary.
	VZDiskSynchronizationModeNone VZDiskSynchronizationMode = 1
)

func (VZDiskSynchronizationMode) String

func (e VZDiskSynchronizationMode) String() string

type VZEFIBootLoader

type VZEFIBootLoader struct {
	VZBootLoader
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzefibootloader

func VZEFIBootLoaderFromID

func VZEFIBootLoaderFromID(id objc.ID) *VZEFIBootLoader

func (*VZEFIBootLoader) Init

func (o *VZEFIBootLoader) Init() *VZEFIBootLoader

func (*VZEFIBootLoader) SetVariableStore

func (o *VZEFIBootLoader) SetVariableStore(variableStore *VZEFIVariableStore)

func (*VZEFIBootLoader) VariableStore

func (o *VZEFIBootLoader) VariableStore() *VZEFIVariableStore

type VZEFIVariableStore

type VZEFIVariableStore struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzefivariablestore

func VZEFIVariableStoreFromID

func VZEFIVariableStoreFromID(id objc.ID) *VZEFIVariableStore

func (*VZEFIVariableStore) InitCreatingVariableStoreAtURLOptionsError

func (o *VZEFIVariableStore) InitCreatingVariableStoreAtURLOptionsError(uRL *foundation.NSURL, options VZEFIVariableStoreInitializationOptions) (*VZEFIVariableStore, error)

@abstract Write an initialized VZEFIVariableStore to a URL on a file system. @param URL The URL to write the variable store to on the local file system. @param options Initialization options. @param error If not nil, used to report errors if creation fails. @return A newly initialized VZEFIVariableStore on success. If an error was encountered returns @c nil, and @c error contains the error.

func (*VZEFIVariableStore) InitWithURL

func (o *VZEFIVariableStore) InitWithURL(uRL *foundation.NSURL) *VZEFIVariableStore

@abstract Initialize the variable store from the URL of an existing file. @param URL The URL of the variable store on the local file system. @discussion To create a new variable store, use -[VZEFIVariableStore initCreatingVariableStoreAtURL:options:error].

func (*VZEFIVariableStore) URL

type VZEFIVariableStoreInitializationOptions

type VZEFIVariableStoreInitializationOptions uint64
const (
	VZEFIVariableStoreInitializationOptionAllowOverwrite VZEFIVariableStoreInitializationOptions = 1
)

func (VZEFIVariableStoreInitializationOptions) String

type VZErrorCode

type VZErrorCode int64
const (
	VZErrorInternal                             VZErrorCode = 1
	VZErrorInvalidVirtualMachineConfiguration   VZErrorCode = 2
	VZErrorInvalidVirtualMachineState           VZErrorCode = 3
	VZErrorInvalidVirtualMachineStateTransition VZErrorCode = 4
	VZErrorInvalidDiskImage                     VZErrorCode = 5
	VZErrorVirtualMachineLimitExceeded          VZErrorCode = 6
	VZErrorNetworkError                         VZErrorCode = 7
	VZErrorOutOfDiskSpace                       VZErrorCode = 8
	VZErrorOperationCancelled                   VZErrorCode = 9
	VZErrorNotSupported                         VZErrorCode = 10
	VZErrorSave                                 VZErrorCode = 11
	VZErrorRestore                              VZErrorCode = 12
	VZErrorRestoreImageCatalogLoadFailed        VZErrorCode = 10001
	VZErrorInvalidRestoreImageCatalog           VZErrorCode = 10002
	VZErrorNoSupportedRestoreImagesInCatalog    VZErrorCode = 10003
	VZErrorRestoreImageLoadFailed               VZErrorCode = 10004
	VZErrorInvalidRestoreImage                  VZErrorCode = 10005
	VZErrorInstallationRequiresUpdate           VZErrorCode = 10006
	VZErrorInstallationFailed                   VZErrorCode = 10007
	VZErrorNetworkBlockDeviceNegotiationFailed  VZErrorCode = 20001
	VZErrorNetworkBlockDeviceDisconnected       VZErrorCode = 20002
	VZErrorUSBControllerNotFound                VZErrorCode = 30001
	VZErrorDeviceAlreadyAttached                VZErrorCode = 30002
	VZErrorDeviceInitializationFailure          VZErrorCode = 30003
	VZErrorDeviceNotFound                       VZErrorCode = 30004
)

func (VZErrorCode) String

func (e VZErrorCode) String() string

type VZFileHandleNetworkDeviceAttachment

type VZFileHandleNetworkDeviceAttachment struct {
	VZNetworkDeviceAttachment
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzfilehandlenetworkdeviceattachment

func VZFileHandleNetworkDeviceAttachmentFromID

func VZFileHandleNetworkDeviceAttachmentFromID(id objc.ID) *VZFileHandleNetworkDeviceAttachment

func (*VZFileHandleNetworkDeviceAttachment) FileHandle

@abstract The file handle associated with this attachment.

func (*VZFileHandleNetworkDeviceAttachment) InitWithFileHandle

@abstract Initialize the attachment with a file handle. @param fileHandle File handle holding a connected datagram socket.

func (*VZFileHandleNetworkDeviceAttachment) MaximumTransmissionUnit

func (o *VZFileHandleNetworkDeviceAttachment) MaximumTransmissionUnit() int

@abstract 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`, which can be set using the `setsockopt` system call. The value of `SO_RCVBUF` is expected to be at least double the value of `SO_SNDBUF`, and for optimal performance, the value of `SO_RCVBUF` is recommended to be 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 will result in an invalid virtual machine configuration.

func (*VZFileHandleNetworkDeviceAttachment) SetMaximumTransmissionUnit

func (o *VZFileHandleNetworkDeviceAttachment) SetMaximumTransmissionUnit(maximumTransmissionUnit int)

type VZFileHandleSerialPortAttachment

type VZFileHandleSerialPortAttachment struct {
	VZSerialPortAttachment
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzfilehandleserialportattachment

func VZFileHandleSerialPortAttachmentFromID

func VZFileHandleSerialPortAttachmentFromID(id objc.ID) *VZFileHandleSerialPortAttachment

func (*VZFileHandleSerialPortAttachment) FileHandleForReading

func (o *VZFileHandleSerialPortAttachment) FileHandleForReading() *foundation.NSFileHandle

@abstract File handle for reading from the file. @discussion Data written to fileHandleForReading goes to the guest.

func (*VZFileHandleSerialPortAttachment) FileHandleForWriting

func (o *VZFileHandleSerialPortAttachment) FileHandleForWriting() *foundation.NSFileHandle

@abstract File handle for writing to the file. @discussion Data sent from the guest appears on fileHandleForWriting.

func (*VZFileHandleSerialPortAttachment) InitWithFileHandleForReadingFileHandleForWriting

func (o *VZFileHandleSerialPortAttachment) InitWithFileHandleForReadingFileHandleForWriting(fileHandleForReading *foundation.NSFileHandle, fileHandleForWriting *foundation.NSFileHandle) *VZFileHandleSerialPortAttachment

@abstract Initialize the VZFileHandleSerialPortAttachment from file handles. @param fileHandleForReading File handle for reading from the file. @param fileHandleForWriting File handle for writing to the file. @discussion Each file handle must either be nil or have a valid file descriptor.

type VZFileSerialPortAttachment

type VZFileSerialPortAttachment struct {
	VZSerialPortAttachment
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzfileserialportattachment

func VZFileSerialPortAttachmentFromID

func VZFileSerialPortAttachmentFromID(id objc.ID) *VZFileSerialPortAttachment

func (*VZFileSerialPortAttachment) Append

func (o *VZFileSerialPortAttachment) Append() bool

@abstract True if the file should be opened in append mode, false otherwise.

func (*VZFileSerialPortAttachment) InitWithURLAppendError

func (o *VZFileSerialPortAttachment) InitWithURLAppendError(url *foundation.NSURL, shouldAppend bool) (*VZFileSerialPortAttachment, error)

@abstract Initialize the VZFileSerialPortAttachment from a URL of a file. @param url The URL of the file for the attachment on the local file system. @param shouldAppend True if the file should be opened in append mode, false otherwise. When a file is opened in append mode, writing to that file will append to the end of it. @param error If not nil, used to report errors if initialization fails. @return A newly initialized VZFileSerialPortAttachment. If an error was encountered returns @c nil, and @c error contains the error.

func (*VZFileSerialPortAttachment) URL

@abstract The URL of the file for the attachment on the local file system.

type VZGenericMachineIdentifier

type VZGenericMachineIdentifier struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzgenericmachineidentifier

func VZGenericMachineIdentifierFromID

func VZGenericMachineIdentifierFromID(id objc.ID) *VZGenericMachineIdentifier

func (*VZGenericMachineIdentifier) DataRepresentation

func (o *VZGenericMachineIdentifier) DataRepresentation() *foundation.NSData

func (*VZGenericMachineIdentifier) Init

@abstract Create a new unique machine identifier.

func (*VZGenericMachineIdentifier) InitWithDataRepresentation

func (o *VZGenericMachineIdentifier) InitWithDataRepresentation(dataRepresentation *foundation.NSData) *VZGenericMachineIdentifier

@abstract Get the machine identifier described by the specified data representation. @param dataRepresentation The opaque data representation of the machine identifier to be obtained. @return A unique identifier identical to the one that generated the dataRepresentation, or nil if the data is invalid. @see VZGenericMachineIdentifier.dataRepresentation

type VZGenericPlatformConfiguration

type VZGenericPlatformConfiguration struct {
	VZPlatformConfiguration
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzgenericplatformconfiguration

func VZGenericPlatformConfigurationFromID

func VZGenericPlatformConfigurationFromID(id objc.ID) *VZGenericPlatformConfiguration

func (*VZGenericPlatformConfiguration) Init

func (*VZGenericPlatformConfiguration) IsNestedVirtualizationEnabled

func (o *VZGenericPlatformConfiguration) IsNestedVirtualizationEnabled() bool

@abstract Enable nested virtualization for the platform. @discussion If nested virtualization is available, enable it for the current platform configuration. You can use `nestedVirtualizationSupported` to discover the nested virtualization availability before enabling it. The default value is NO, nested virtualization is disabled. @see nestedVirtualizationSupported.

func (*VZGenericPlatformConfiguration) MachineIdentifier

@abstract The unique machine identifier. @discussion Running two virtual machines concurrently with the same identifier results in undefined behavior in the guest operating system. When restoring a virtual machine from saved state, this `machineIdentifier` must match the `machineIdentifier` of the saved virtual machine.

func (*VZGenericPlatformConfiguration) SetMachineIdentifier

func (o *VZGenericPlatformConfiguration) SetMachineIdentifier(machineIdentifier *VZGenericMachineIdentifier)

func (*VZGenericPlatformConfiguration) SetNestedVirtualizationEnabled

func (o *VZGenericPlatformConfiguration) SetNestedVirtualizationEnabled(nestedVirtualizationEnabled bool)

type VZGraphicsDevice

type VZGraphicsDevice struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzgraphicsdevice

func VZGraphicsDeviceFromID

func VZGraphicsDeviceFromID(id objc.ID) *VZGraphicsDevice

func (*VZGraphicsDevice) Displays

type VZGraphicsDisplay

type VZGraphicsDisplay struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzgraphicsdisplay

func VZGraphicsDisplayFromID

func VZGraphicsDisplayFromID(id objc.ID) *VZGraphicsDisplay

func (*VZGraphicsDisplay) AddObserver

func (o *VZGraphicsDisplay) AddObserver(observer VZGraphicsDisplayObserver)

@abstract Add an observer. @param observer The new observer to be notified of display state changes.

func (*VZGraphicsDisplay) ReconfigureWithConfigurationError

func (o *VZGraphicsDisplay) ReconfigureWithConfigurationError(configuration *VZGraphicsDisplayConfiguration) (bool, error)

@abstract Reconfigure this display. @param configuration New display configuration. @param error If not nil, assigned with an error describing why the new configuration is not valid. @return YES if the reconfiguration is successful, NO otherwise. @discussion The type of the configuration must match the corresponding type that caused this display to be created. If successful, the new configuration will be passed to the guest but the guest may or may not respond to parts of the configuration. The guest not using the new configuration does not return an error. Reconfiguration triggers a display state change which can be tracked by VZGraphicsDisplayObservers.

func (*VZGraphicsDisplay) ReconfigureWithSizeInPixelsError

func (o *VZGraphicsDisplay) ReconfigureWithSizeInPixelsError(sizeInPixels corefoundation.CGSize) (bool, error)

@abstract Resize this display. @param sizeInPixels New display width and height in pixels. @param error If not nil, assigned with an error describing why the new size is not valid. @return YES if the resize is successful, NO otherwise. @discussion If successful, the new size will be passed to the guest but the guest may or may not respond to the new size. The guest not using the size does not return an error. Reconfiguration triggers a display state change which can be tracked by VZGraphicsDisplayObservers.

func (*VZGraphicsDisplay) RemoveObserver

func (o *VZGraphicsDisplay) RemoveObserver(observer VZGraphicsDisplayObserver)

@abstract Remove an observer. @param observer The observer to be removed.

func (*VZGraphicsDisplay) SizeInPixels

func (o *VZGraphicsDisplay) SizeInPixels() corefoundation.CGSize

@abstract The size of the display, in pixels.

type VZGraphicsDisplayObserver

type VZGraphicsDisplayObserver interface {
}

VZGraphicsDisplayObserver wraps the ObjC protocol VZGraphicsDisplayObserver.

type VZHostAudioInputStreamSource

type VZHostAudioInputStreamSource struct {
	VZAudioInputStreamSource
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzhostaudioinputstreamsource

func VZHostAudioInputStreamSourceFromID

func VZHostAudioInputStreamSourceFromID(id objc.ID) *VZHostAudioInputStreamSource

func (*VZHostAudioInputStreamSource) Init

type VZHostAudioOutputStreamSink

type VZHostAudioOutputStreamSink struct {
	VZAudioOutputStreamSink
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzhostaudiooutputstreamsink

func VZHostAudioOutputStreamSinkFromID

func VZHostAudioOutputStreamSinkFromID(id objc.ID) *VZHostAudioOutputStreamSink

func (*VZHostAudioOutputStreamSink) Init

type VZKeyboardConfiguration

type VZKeyboardConfiguration struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzkeyboardconfiguration

func VZKeyboardConfigurationFromID

func VZKeyboardConfigurationFromID(id objc.ID) *VZKeyboardConfiguration

type VZLinuxBootLoader

type VZLinuxBootLoader struct {
	VZBootLoader
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzlinuxbootloader

func VZLinuxBootLoaderFromID

func VZLinuxBootLoaderFromID(id objc.ID) *VZLinuxBootLoader

func (*VZLinuxBootLoader) CommandLine

func (o *VZLinuxBootLoader) CommandLine() *foundation.NSString

@abstract Define the command-line parameters passed to the kernel on boot. @link https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html

func (*VZLinuxBootLoader) InitWithKernelURL

func (o *VZLinuxBootLoader) InitWithKernelURL(kernelURL *foundation.NSURL) *VZLinuxBootLoader

@abstract Create a VZLinuxBootLoader with the Linux kernel passed as URL. @param kernelURL The URL of Linux kernel on the local file system.

func (*VZLinuxBootLoader) InitialRamdiskURL

func (o *VZLinuxBootLoader) InitialRamdiskURL() *foundation.NSURL

@abstract Set the optional initial RAM disk. The RAM disk is mapped into memory before booting the kernel.

func (*VZLinuxBootLoader) KernelURL

func (o *VZLinuxBootLoader) KernelURL() *foundation.NSURL

@abstract URL of the Linux kernel.

func (*VZLinuxBootLoader) SetCommandLine

func (o *VZLinuxBootLoader) SetCommandLine(commandLine *foundation.NSString)

func (*VZLinuxBootLoader) SetInitialRamdiskURL

func (o *VZLinuxBootLoader) SetInitialRamdiskURL(initialRamdiskURL *foundation.NSURL)

func (*VZLinuxBootLoader) SetKernelURL

func (o *VZLinuxBootLoader) SetKernelURL(kernelURL *foundation.NSURL)

type VZLinuxRosettaAbstractSocketCachingOptions

type VZLinuxRosettaAbstractSocketCachingOptions struct {
	VZLinuxRosettaCachingOptions
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzlinuxrosettaabstractsocketcachingoptions

func VZLinuxRosettaAbstractSocketCachingOptionsFromID

func VZLinuxRosettaAbstractSocketCachingOptionsFromID(id objc.ID) *VZLinuxRosettaAbstractSocketCachingOptions

func (*VZLinuxRosettaAbstractSocketCachingOptions) InitWithNameError

@abstract Initialize options to be set on a VZLinuxRosettaDirectoryShare. @param name The name of the Abstract Socket to be used to communicate with the Rosetta translation daemon. This cannot exceed maximumNameLength UTF-8 bytes long. @param error If not nil, assigned with the error if the initialization failed. @discussion Rosetta can be optionally configured to use cached translations from the Rosetta translation daemon communicating through an Abstract Socket. If name exceeds maximumNameLength UTF-8 bytes, nil is returned and the error is set.

func (*VZLinuxRosettaAbstractSocketCachingOptions) Name

@abstract Name set by initWithName. @discussion This is the name of the Abstract Socket to be used by Rosetta.

type VZLinuxRosettaAvailability

type VZLinuxRosettaAvailability int64
const (
	// Rosetta support for Linux binaries is not available on the host system.
	VZLinuxRosettaAvailabilityNotSupported VZLinuxRosettaAvailability = 0
	// Rosetta support for Linux binaries is not installed on the host system.
	VZLinuxRosettaAvailabilityNotInstalled VZLinuxRosettaAvailability = 1
	// Rosetta support for Linux is installed on the host system.
	VZLinuxRosettaAvailabilityInstalled VZLinuxRosettaAvailability = 2
)

func VZLinuxRosettaDirectoryShareAvailability

func VZLinuxRosettaDirectoryShareAvailability() VZLinuxRosettaAvailability

@abstract Check the availability of Rosetta support for the directory share.

func (VZLinuxRosettaAvailability) String

type VZLinuxRosettaDirectoryShare

type VZLinuxRosettaDirectoryShare struct {
	VZDirectoryShare
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzlinuxrosettadirectoryshare

func VZLinuxRosettaDirectoryShareFromID

func VZLinuxRosettaDirectoryShareFromID(id objc.ID) *VZLinuxRosettaDirectoryShare

func (*VZLinuxRosettaDirectoryShare) InitWithError

@abstract Initialize a Rosetta directory share if Rosetta support for Linux binaries is installed. @param error Error object to store the error, if an error exists. @discussion The call returns an error if Rosetta is not available for a directory share. To install Rosetta support, use +[VZLinuxRosettaDirectoryShare installRosettaIfNeeded:]. @see +[VZLinuxRosettaDirectoryShare installRosettaIfNeeded:]

func (*VZLinuxRosettaDirectoryShare) Options

@abstract Enable translation caching and configure the socket communication type for Rosetta.

func (*VZLinuxRosettaDirectoryShare) SetOptions

type VZLinuxRosettaUnixSocketCachingOptions

type VZLinuxRosettaUnixSocketCachingOptions struct {
	VZLinuxRosettaCachingOptions
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzlinuxrosettaunixsocketcachingoptions

func VZLinuxRosettaUnixSocketCachingOptionsFromID

func VZLinuxRosettaUnixSocketCachingOptionsFromID(id objc.ID) *VZLinuxRosettaUnixSocketCachingOptions

func (*VZLinuxRosettaUnixSocketCachingOptions) Init

@abstract Initialize default options to be set on a VZLinuxRosettaDirectoryShare. @discussion The default translation caching configuration uses a Unix Domain Socket at /run/rosettad/rosetta.sock.

func (*VZLinuxRosettaUnixSocketCachingOptions) InitWithPathError

@abstract Initialize options to be set on a VZLinuxRosettaDirectoryShare. @param path The path of the Unix Domain Socket to be used to communicate with the Rosetta translation daemon. This cannot exceed maximumPathLength UTF-8 bytes long. @param error If not nil, assigned with the error if the initialization failed. @discussion Rosetta can be optionally configured to use cached translations from the Rosetta translation daemon communicating through a Unix Domain Socket. If path exceeds maximumPathLength UTF-8 bytes, nil is returned and the error is set. The guest operating system must have a directory at path created in order for translation caching to operate correctly.

func (*VZLinuxRosettaUnixSocketCachingOptions) Path

@abstract Path set by initWithPath. @discussion This is the path of the Unix Domain Socket to be used by Rosetta.

type VZMACAddress

type VZMACAddress struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzmacaddress

func VZMACAddressFromID

func VZMACAddressFromID(id objc.ID) *VZMACAddress

func VZMACAddressRandomLocallyAdministeredAddress

func VZMACAddressRandomLocallyAdministeredAddress() *VZMACAddress

@abstract Create a valid, random, unicast, locally administered address. @discussion The generated address is not guaranteed to be unique.

func (*VZMACAddress) EthernetAddress

func (o *VZMACAddress) EthernetAddress() unsafe.Pointer

@abstract The address represented as an ether_addr_t.

func (*VZMACAddress) InitWithEthernetAddress

func (o *VZMACAddress) InitWithEthernetAddress(ethernetAddress unsafe.Pointer) *VZMACAddress

@abstract Initialize the VZMACAddress from a 48-bit ethernet address. @param ethernetAddress A 48-bit ethernet address.

func (*VZMACAddress) InitWithString

func (o *VZMACAddress) InitWithString(string_ *foundation.NSString) *VZMACAddress

@abstract Initialize the VZMACAddress from a string representation of a MAC address. @param string The string should be formatted representing the 6 bytes in hexadecimal separated by a colon character. e.g. "01:23:45:ab:cd:ef" The alphabetical characters can appear lowercase or uppercase. @return A VZMACAddress or nil if the string is not formatted correctly.

func (*VZMACAddress) IsBroadcastAddress

func (o *VZMACAddress) IsBroadcastAddress() bool

@abstract True if the address is the broadcast address, false otherwise.

func (*VZMACAddress) IsLocallyAdministeredAddress

func (o *VZMACAddress) IsLocallyAdministeredAddress() bool

@abstract True if the address is a locally administered addresses (LAA), false otherwise.

func (*VZMACAddress) IsMulticastAddress

func (o *VZMACAddress) IsMulticastAddress() bool

@abstract True if the address is a multicast address, false otherwise.

func (*VZMACAddress) IsUnicastAddress

func (o *VZMACAddress) IsUnicastAddress() bool

@abstract True if the address is a unicast address, false otherwise.

func (*VZMACAddress) IsUniversallyAdministeredAddress

func (o *VZMACAddress) IsUniversallyAdministeredAddress() bool

@abstract True if the address is a universally administered addresses (UAA), false otherwise.

func (*VZMACAddress) String

func (o *VZMACAddress) String() *foundation.NSString

@abstract The address represented as a string. @discussion The 6 bytes are represented in hexadecimal form, separated by a colon character. Alphabetical characters are lowercase. The address is compatible with the parameter of -[VZMACAddress initWithString:].

type VZMacAuxiliaryStorage

type VZMacAuxiliaryStorage struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzmacauxiliarystorage

func VZMacAuxiliaryStorageFromID

func VZMacAuxiliaryStorageFromID(id objc.ID) *VZMacAuxiliaryStorage

func (*VZMacAuxiliaryStorage) InitCreatingStorageAtURLHardwareModelOptionsError

func (o *VZMacAuxiliaryStorage) InitCreatingStorageAtURLHardwareModelOptionsError(uRL *foundation.NSURL, hardwareModel *VZMacHardwareModel, options VZMacAuxiliaryStorageInitializationOptions) (*VZMacAuxiliaryStorage, error)

@abstract Write an initialized VZMacAuxiliaryStorage to a URL on a file system. @param URL The URL to write the auxiliary storage to on the local file system. @param hardwareModel The hardware model to use. The auxiliary storage can be laid out differently for different hardware models. @param options Initialization options. @param error If not nil, used to report errors if creation fails. @return A newly initialized VZMacAuxiliaryStorage on success. If an error was encountered returns @c nil, and @c error contains the error.

func (*VZMacAuxiliaryStorage) InitWithContentsOfURL deprecated

func (o *VZMacAuxiliaryStorage) InitWithContentsOfURL(uRL *foundation.NSURL) *VZMacAuxiliaryStorage

Deprecated: since macOS API_TO_BE_DEPRECATED.

func (*VZMacAuxiliaryStorage) InitWithURL

@abstract Initialize the auxiliary storage from the URL of an existing file. @param URL The URL of the auxiliary storage on the local file system. @discussion To create a new auxiliary storage, use -[VZMacAuxiliaryStorage initCreatingStorageAtURL:hardwareModel:options:error].

func (*VZMacAuxiliaryStorage) URL

type VZMacAuxiliaryStorageInitializationOptions

type VZMacAuxiliaryStorageInitializationOptions uint64
const (
	// Overwrite an existing auxiliary storage.
	VZMacAuxiliaryStorageInitializationOptionAllowOverwrite VZMacAuxiliaryStorageInitializationOptions = 1
)

func (VZMacAuxiliaryStorageInitializationOptions) String

type VZMacGraphicsDevice

type VZMacGraphicsDevice struct {
	VZGraphicsDevice
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzmacgraphicsdevice

func VZMacGraphicsDeviceFromID

func VZMacGraphicsDeviceFromID(id objc.ID) *VZMacGraphicsDevice

type VZMacGraphicsDeviceConfiguration

type VZMacGraphicsDeviceConfiguration struct {
	VZGraphicsDeviceConfiguration
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzmacgraphicsdeviceconfiguration

func VZMacGraphicsDeviceConfigurationFromID

func VZMacGraphicsDeviceConfigurationFromID(id objc.ID) *VZMacGraphicsDeviceConfiguration

func (*VZMacGraphicsDeviceConfiguration) Displays

func (*VZMacGraphicsDeviceConfiguration) Init

func (*VZMacGraphicsDeviceConfiguration) SetDisplays

type VZMacGraphicsDisplay

type VZMacGraphicsDisplay struct {
	VZGraphicsDisplay
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzmacgraphicsdisplay

func VZMacGraphicsDisplayFromID

func VZMacGraphicsDisplayFromID(id objc.ID) *VZMacGraphicsDisplay

func (*VZMacGraphicsDisplay) PixelsPerInch

func (o *VZMacGraphicsDisplay) PixelsPerInch() int

type VZMacGraphicsDisplayConfiguration

type VZMacGraphicsDisplayConfiguration struct {
	VZGraphicsDisplayConfiguration
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzmacgraphicsdisplayconfiguration

func VZMacGraphicsDisplayConfigurationFromID

func VZMacGraphicsDisplayConfigurationFromID(id objc.ID) *VZMacGraphicsDisplayConfiguration

func (*VZMacGraphicsDisplayConfiguration) HeightInPixels

func (o *VZMacGraphicsDisplayConfiguration) HeightInPixels() int

@abstract The height of the display, in pixels.

func (*VZMacGraphicsDisplayConfiguration) InitForScreenSizeInPoints

func (o *VZMacGraphicsDisplayConfiguration) InitForScreenSizeInPoints(screen *appkit.NSScreen, sizeInPoints corefoundation.CGSize) *VZMacGraphicsDisplayConfiguration

@abstract Create a display configuration suitable for showing on the specified screen. @param screen The screen on which you intend to present the VZVirtualMachineView for the display. @param sizeInPoints The intended logical size of the display. @discussion The pixel dimensions and pixel density will be initialized based on the specified screen and size. Note: an instance of macOS running in the virtual machine may not necessarily provide a display mode with a backing scale factor matching the specified screen.

func (*VZMacGraphicsDisplayConfiguration) InitWithWidthInPixelsHeightInPixelsPixelsPerInch

func (o *VZMacGraphicsDisplayConfiguration) InitWithWidthInPixelsHeightInPixelsPixelsPerInch(widthInPixels int, heightInPixels int, pixelsPerInch int) *VZMacGraphicsDisplayConfiguration

@abstract Create a display configuration with the specified pixel dimensions and pixel density. @param widthInPixels The width of the display, in pixels. @param heightInPixels The height of the display, in pixels. @param pixelsPerInch The pixel density as a number of pixels per inch.

func (*VZMacGraphicsDisplayConfiguration) PixelsPerInch

func (o *VZMacGraphicsDisplayConfiguration) PixelsPerInch() int

@abstract The pixel density as a number of pixels per inch.

func (*VZMacGraphicsDisplayConfiguration) SetHeightInPixels

func (o *VZMacGraphicsDisplayConfiguration) SetHeightInPixels(heightInPixels int)

func (*VZMacGraphicsDisplayConfiguration) SetPixelsPerInch

func (o *VZMacGraphicsDisplayConfiguration) SetPixelsPerInch(pixelsPerInch int)

func (*VZMacGraphicsDisplayConfiguration) SetWidthInPixels

func (o *VZMacGraphicsDisplayConfiguration) SetWidthInPixels(widthInPixels int)

func (*VZMacGraphicsDisplayConfiguration) WidthInPixels

func (o *VZMacGraphicsDisplayConfiguration) WidthInPixels() int

@abstract The width of the display, in pixels.

type VZMacHardwareModel

type VZMacHardwareModel struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzmachardwaremodel

func VZMacHardwareModelFromID

func VZMacHardwareModelFromID(id objc.ID) *VZMacHardwareModel

func (*VZMacHardwareModel) DataRepresentation

func (o *VZMacHardwareModel) DataRepresentation() *foundation.NSData

@abstract Opaque data representation of the hardware model. @discussion This can be used to recreate the same hardware model with -[VZMacHardwareModel initWithDataRepresentation:].

func (*VZMacHardwareModel) InitWithDataRepresentation

func (o *VZMacHardwareModel) InitWithDataRepresentation(dataRepresentation *foundation.NSData) *VZMacHardwareModel

@abstract Get the hardware model described by the specified data representation. @param dataRepresentation The opaque data representation of the hardware model to be obtained.

func (*VZMacHardwareModel) IsSupported

func (o *VZMacHardwareModel) IsSupported() bool

@abstract Indicate whether this hardware model is supported by the host. @discussion If this hardware model is not supported by the host, no VZVirtualMachineConfiguration using it will validate. The validation error of the VZVirtualMachineConfiguration provides more information about why the hardware model is unsupported.

type VZMacKeyboardConfiguration

type VZMacKeyboardConfiguration struct {
	VZKeyboardConfiguration
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzmackeyboardconfiguration

func VZMacKeyboardConfigurationFromID

func VZMacKeyboardConfigurationFromID(id objc.ID) *VZMacKeyboardConfiguration

func (*VZMacKeyboardConfiguration) Init

type VZMacMachineIdentifier

type VZMacMachineIdentifier struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzmacmachineidentifier

func VZMacMachineIdentifierFromID

func VZMacMachineIdentifierFromID(id objc.ID) *VZMacMachineIdentifier

func (*VZMacMachineIdentifier) DataRepresentation

func (o *VZMacMachineIdentifier) DataRepresentation() *foundation.NSData

func (*VZMacMachineIdentifier) Init

@abstract Create a new unique machine identifier.

func (*VZMacMachineIdentifier) InitWithDataRepresentation

func (o *VZMacMachineIdentifier) InitWithDataRepresentation(dataRepresentation *foundation.NSData) *VZMacMachineIdentifier

@abstract Get the machine identifier described by the specified data representation. @param dataRepresentation The opaque data representation of the machine identifier to be obtained. @return A unique identifier identical to the one that generated the dataRepresentation, or nil if the data is invalid. @see VZMacMachineIdentifier.dataRepresentation

type VZMacOSBootLoader

type VZMacOSBootLoader struct {
	VZBootLoader
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzmacosbootloader

func VZMacOSBootLoaderFromID

func VZMacOSBootLoaderFromID(id objc.ID) *VZMacOSBootLoader

func (*VZMacOSBootLoader) Init

@abstract Create a VZMacOSBootLoader.

type VZMacOSConfigurationRequirements

type VZMacOSConfigurationRequirements struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzmacosconfigurationrequirements

func VZMacOSConfigurationRequirementsFromID

func VZMacOSConfigurationRequirementsFromID(id objc.ID) *VZMacOSConfigurationRequirements

func (*VZMacOSConfigurationRequirements) HardwareModel

@abstract The hardware model for this configuration. @discussion The hardware model can be used to configure a new virtual machine that meets the requirements. Use VZMacPlatformConfiguration.hardwareModel to configure the Mac platform, and -[VZMacAuxiliaryStorage initCreatingStorageAtURL:hardwareModel:options:error:] to create its auxiliary storage. @seealso VZMacPlatformConfiguration @seealso VZMacAuxiliaryStorage

func (*VZMacOSConfigurationRequirements) MinimumSupportedCPUCount

func (o *VZMacOSConfigurationRequirements) MinimumSupportedCPUCount() uint

@abstract The minimum supported number of CPUs for this configuration. @discussion A VZMacOSConfigurationRequirements object is associated with a specific VZMacOSRestoreImage object, and thus a specific macOS configuration. This property specifies the minimum number of CPUs required by the associated macOS configuration. Installing or running the associated configuration of macOS on a virtual machine with fewer than this number of CPUs will result in undefined behavior.

func (*VZMacOSConfigurationRequirements) MinimumSupportedMemorySize

func (o *VZMacOSConfigurationRequirements) MinimumSupportedMemorySize() uint64

@abstract The minimum supported memory size for this configuration. @discussion A VZMacOSConfigurationRequirements object is associated with a specific VZMacOSRestoreImage object, and thus a specific macOS configuration. This property specifies the minimum amount of memory required by the associated macOS configuration. Installing or running the associated configuration of macOS on a virtual machine with less than this amount of memory will result in undefined behavior.

type VZMacOSInstaller

type VZMacOSInstaller struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzmacosinstaller

func VZMacOSInstallerFromID

func VZMacOSInstallerFromID(id objc.ID) *VZMacOSInstaller

func (*VZMacOSInstaller) InitWithVirtualMachineRestoreImageURL

func (o *VZMacOSInstaller) InitWithVirtualMachineRestoreImageURL(virtualMachine *VZVirtualMachine, restoreImageFileURL *foundation.NSURL) *VZMacOSInstaller

@abstract Initialize a VZMacOSInstaller object. @param virtualMachine The virtual machine that the operating system will be installed onto. @param restoreImageFileURL A file URL indicating the macOS restore image to install. @discussion The virtual machine platform must be macOS and the restore image URL must be a file URL referring to a file on disk or an exception will be raised. This method must be called on the virtual machine's queue.

func (*VZMacOSInstaller) InstallWithCompletionHandler

func (o *VZMacOSInstaller) InstallWithCompletionHandler(completionHandler func(unsafe.Pointer))

@abstract Start installing macOS. @param completionHandler Block called after installation has successfully completed or has failed. The error parameter passed to the block is nil if installation was successful. The block will be invoked on the virtual machine's queue. @discussion This method starts the installation process. The virtual machine must be in a stopped state. During the installation operation, pausing or stopping the virtual machine will result in undefined behavior. If installation is started on the same VZMacOSInstaller object more than once, an exception will be raised. This method must be called on the virtual machine's queue.

func (*VZMacOSInstaller) Progress

func (o *VZMacOSInstaller) Progress() *foundation.NSProgress

@abstract An NSProgress object that can be used to observe or cancel installation. @discussion If the progress object is cancelled before installation is started, an exception will be raised.

func (*VZMacOSInstaller) RestoreImageURL

func (o *VZMacOSInstaller) RestoreImageURL() *foundation.NSURL

@abstract The restore image URL that this installer was initialized with.

func (*VZMacOSInstaller) VirtualMachine

func (o *VZMacOSInstaller) VirtualMachine() *VZVirtualMachine

@abstract The virtual machine that this installer was initialized with.

type VZMacOSRestoreImage

type VZMacOSRestoreImage struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzmacosrestoreimage

func VZMacOSRestoreImageFromID

func VZMacOSRestoreImageFromID(id objc.ID) *VZMacOSRestoreImage

func (*VZMacOSRestoreImage) BuildVersion

func (o *VZMacOSRestoreImage) BuildVersion() *foundation.NSString

@abstract The build version this restore image contains.

func (*VZMacOSRestoreImage) IsSupported

func (o *VZMacOSRestoreImage) IsSupported() bool

@abstract Whether this restore image is supported on the current host.

func (*VZMacOSRestoreImage) MostFeaturefulSupportedConfiguration

func (o *VZMacOSRestoreImage) MostFeaturefulSupportedConfiguration() *VZMacOSConfigurationRequirements

@abstract The configuration requirements for the most featureful configuration supported by the current host and by this restore image. @discussion A VZMacOSRestoreImage can contain installation media for multiple Mac hardware models (VZMacHardwareModel). Some of these hardware models may not be supported by the current host. The mostFeaturefulSupportedConfiguration property can be used to determine the hardware model and configuration requirements that will provide the most complete feature set on the current host. If none of the hardware models are supported on the current host, this property is nil.

func (*VZMacOSRestoreImage) OperatingSystemVersion

func (o *VZMacOSRestoreImage) OperatingSystemVersion() foundation.NSOperatingSystemVersion

@abstract The operating system version this restore image contains.

func (*VZMacOSRestoreImage) URL

@abstract The URL of this restore image. @discussion If the restore image was loaded using +[VZMacOSRestoreImage loadFileURL:completionHandler:], the value of this property will be a file URL. If the restore image was fetched using +[VZMacOSRestoreImage fetchLatestSupportedWithCompletionHandler:], the value of this property will be a network URL referring to an installation media file.

type VZMacOSVirtualMachineStartOptions

type VZMacOSVirtualMachineStartOptions struct {
	VZVirtualMachineStartOptions
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzmacosvirtualmachinestartoptions

func VZMacOSVirtualMachineStartOptionsFromID

func VZMacOSVirtualMachineStartOptionsFromID(id objc.ID) *VZMacOSVirtualMachineStartOptions

func (*VZMacOSVirtualMachineStartOptions) SetStartUpFromMacOSRecovery

func (o *VZMacOSVirtualMachineStartOptions) SetStartUpFromMacOSRecovery(startUpFromMacOSRecovery bool)

func (*VZMacOSVirtualMachineStartOptions) StartUpFromMacOSRecovery

func (o *VZMacOSVirtualMachineStartOptions) StartUpFromMacOSRecovery() bool

type VZMacPlatformConfiguration

type VZMacPlatformConfiguration struct {
	VZPlatformConfiguration
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzmacplatformconfiguration

func VZMacPlatformConfigurationFromID

func VZMacPlatformConfigurationFromID(id objc.ID) *VZMacPlatformConfiguration

func (*VZMacPlatformConfiguration) AuxiliaryStorage

func (o *VZMacPlatformConfiguration) AuxiliaryStorage() *VZMacAuxiliaryStorage

@abstract The Mac auxiliary storage. @discussion When creating a virtual machine from scratch, the hardware model of the `auxiliaryStorage` must match the hardware model of the `hardwareModel` property.

func (*VZMacPlatformConfiguration) HardwareModel

func (o *VZMacPlatformConfiguration) HardwareModel() *VZMacHardwareModel

@abstract The Mac hardware model.

func (*VZMacPlatformConfiguration) Init

func (*VZMacPlatformConfiguration) MachineIdentifier

func (o *VZMacPlatformConfiguration) MachineIdentifier() *VZMacMachineIdentifier

@abstract The unique Mac machine identifier. @discussion Running two virtual machines concurrently with the same identifier results in undefined behavior in the guest operating system.

func (*VZMacPlatformConfiguration) SetAuxiliaryStorage

func (o *VZMacPlatformConfiguration) SetAuxiliaryStorage(auxiliaryStorage *VZMacAuxiliaryStorage)

func (*VZMacPlatformConfiguration) SetHardwareModel

func (o *VZMacPlatformConfiguration) SetHardwareModel(hardwareModel *VZMacHardwareModel)

func (*VZMacPlatformConfiguration) SetMachineIdentifier

func (o *VZMacPlatformConfiguration) SetMachineIdentifier(machineIdentifier *VZMacMachineIdentifier)

type VZMacTrackpadConfiguration

type VZMacTrackpadConfiguration struct {
	VZPointingDeviceConfiguration
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzmactrackpadconfiguration

func VZMacTrackpadConfigurationFromID

func VZMacTrackpadConfigurationFromID(id objc.ID) *VZMacTrackpadConfiguration

func (*VZMacTrackpadConfiguration) Init

type VZMemoryBalloonDevice

type VZMemoryBalloonDevice struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzmemoryballoondevice

func VZMemoryBalloonDeviceFromID

func VZMemoryBalloonDeviceFromID(id objc.ID) *VZMemoryBalloonDevice

type VZMultipleDirectoryShare

type VZMultipleDirectoryShare struct {
	VZDirectoryShare
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzmultipledirectoryshare

func VZMultipleDirectoryShareFromID

func VZMultipleDirectoryShareFromID(id objc.ID) *VZMultipleDirectoryShare

func (*VZMultipleDirectoryShare) Directories

@abstract The directories on the host to expose to the guest. @discussion The dictionary string keys will be the name for the directory. The keys must be valid names or an exception will be raised. @see +[VZMultipleDirectoryShare validateName:error:]

func (*VZMultipleDirectoryShare) Init

@abstract Initialize the directory share with an empty set of directories.

func (*VZMultipleDirectoryShare) InitWithDirectories

@abstract Initialize the directory share with a set of directories on the host. @param directories Directories on the host to expose to the guest by name. @discussion The dictionary string keys will be the name for the directory. The keys must be valid names or an exception will be raised. @see +[VZMultipleDirectoryShare validateName:error:]

type VZNATNetworkDeviceAttachment

type VZNATNetworkDeviceAttachment struct {
	VZNetworkDeviceAttachment
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vznatnetworkdeviceattachment

func VZNATNetworkDeviceAttachmentFromID

func VZNATNetworkDeviceAttachmentFromID(id objc.ID) *VZNATNetworkDeviceAttachment

func (*VZNATNetworkDeviceAttachment) Init

type VZNVMExpressControllerDeviceConfiguration

type VZNVMExpressControllerDeviceConfiguration struct {
	VZStorageDeviceConfiguration
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vznvmexpresscontrollerdeviceconfiguration

func VZNVMExpressControllerDeviceConfigurationFromID

func VZNVMExpressControllerDeviceConfigurationFromID(id objc.ID) *VZNVMExpressControllerDeviceConfiguration

func (*VZNVMExpressControllerDeviceConfiguration) InitWithAttachment

@abstract Initialize a VZNVMExpressControllerDeviceConfiguration with a device attachment. @param attachment The storage device attachment. This defines how the virtualized device operates on the host side. @see VZDiskImageStorageDeviceAttachment

type VZNetworkBlockDeviceStorageDeviceAttachment

type VZNetworkBlockDeviceStorageDeviceAttachment struct {
	VZStorageDeviceAttachment
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vznetworkblockdevicestoragedeviceattachment

func VZNetworkBlockDeviceStorageDeviceAttachmentFromID

func VZNetworkBlockDeviceStorageDeviceAttachmentFromID(id objc.ID) *VZNetworkBlockDeviceStorageDeviceAttachment

func (*VZNetworkBlockDeviceStorageDeviceAttachment) Delegate

@abstract The attachment's delegate.

func (*VZNetworkBlockDeviceStorageDeviceAttachment) InitWithURLError

@abstract Convenience initializer to create the attachment from an NBD URL. @param URL The URL referring to the NBD server to which the NBD client is to be connected. @param error If not nil, assigned with the error if the initialization failed. @return An initialized `VZNetworkBlockDeviceStorageDeviceAttachment` or nil if there was an error. @discussion This initializer automatically assigns optimized default values for the `timeout`, `forcedReadOnly`, and `synchronizationMode` properties.

func (*VZNetworkBlockDeviceStorageDeviceAttachment) InitWithURLTimeoutForcedReadOnlySynchronizationModeError

func (o *VZNetworkBlockDeviceStorageDeviceAttachment) InitWithURLTimeoutForcedReadOnlySynchronizationModeError(uRL *foundation.NSURL, timeout float64, forcedReadOnly bool, synchronizationMode VZDiskSynchronizationMode) (*VZNetworkBlockDeviceStorageDeviceAttachment, error)

@abstract Initialize the attachment from an NBD Uniform Resource Indicator (URI) represented as an URL. @param URL The URL referring to the NBD server to which the NBD client is to be connected. @param 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 will take place. @param forcedReadOnly If YES, the disk attachment is forced to be read-only, regardless of whether or not the NBD server supports write requests. @param error If not nil, assigned with the error if the initialization failed. @return An initialized `VZNetworkBlockDeviceStorageDeviceAttachment` or nil if there was an error. @discussion The `forcedReadOnly` parameter affects how the NBD client is exposed to the guest operating system by the storage controller. As part of the NBD protocol, whether or not the disk exposed by the NBD client is read-only is advertised by the NBD server during the handshake phase of the protocol. Setting `forcedReadOnly` to YES will force 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) IsForcedReadOnly

func (o *VZNetworkBlockDeviceStorageDeviceAttachment) IsForcedReadOnly() bool

@abstract Whether the underlying disk attachment is forced to be read-only. @discussion The `forcedReadOnly` parameter affects how the NBD client is exposed to the guest operating system by the storage controller. As part of the NBD protocol, whether or not the disk exposed by the NBD client is read-only is advertised by the NBD server during the handshake phase of the protocol. Setting `forcedReadOnly` to YES will force 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 (*VZNetworkBlockDeviceStorageDeviceAttachment) SynchronizationMode

@abstract The mode in which the NBD client synchronizes data with the NBD server.

func (*VZNetworkBlockDeviceStorageDeviceAttachment) Timeout

@abstract The timeout value in seconds for the connection between the client and server. When the timeout expires, an attempt to reconnect with the server will take place.

func (*VZNetworkBlockDeviceStorageDeviceAttachment) URL

@abstract URL referring to the NBD server to which the NBD client is to be connected.

type VZNetworkBlockDeviceStorageDeviceAttachmentDelegate

type VZNetworkBlockDeviceStorageDeviceAttachmentDelegate interface {
}

VZNetworkBlockDeviceStorageDeviceAttachmentDelegate wraps the ObjC protocol VZNetworkBlockDeviceStorageDeviceAttachmentDelegate.

type VZNetworkDevice

type VZNetworkDevice struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vznetworkdevice

func VZNetworkDeviceFromID

func VZNetworkDeviceFromID(id objc.ID) *VZNetworkDevice

func (*VZNetworkDevice) Attachment

func (o *VZNetworkDevice) Attachment() *VZNetworkDeviceAttachment

func (*VZNetworkDevice) SetAttachment

func (o *VZNetworkDevice) SetAttachment(attachment *VZNetworkDeviceAttachment)

type VZNetworkDeviceConfiguration

type VZNetworkDeviceConfiguration struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vznetworkdeviceconfiguration

func VZNetworkDeviceConfigurationFromID

func VZNetworkDeviceConfigurationFromID(id objc.ID) *VZNetworkDeviceConfiguration

func (*VZNetworkDeviceConfiguration) Attachment

@abstract Network device attachment. Defines how the virtual device interfaces with the host system. The default is nil. @see VZBridgedNetworkDeviceAttachment @see VZFileHandleNetworkDeviceAttachment @see VZNATNetworkDeviceAttachment

func (*VZNetworkDeviceConfiguration) MACAddress

func (o *VZNetworkDeviceConfiguration) MACAddress() *VZMACAddress

@abstract The media access control address of the device. The default is a random, locally administered, unicast address.

func (*VZNetworkDeviceConfiguration) SetAttachment

func (o *VZNetworkDeviceConfiguration) SetAttachment(attachment *VZNetworkDeviceAttachment)

func (*VZNetworkDeviceConfiguration) SetMACAddress

func (o *VZNetworkDeviceConfiguration) SetMACAddress(mACAddress *VZMACAddress)

type VZPlatformConfiguration

type VZPlatformConfiguration struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzplatformconfiguration

func VZPlatformConfigurationFromID

func VZPlatformConfigurationFromID(id objc.ID) *VZPlatformConfiguration

type VZSerialPortAttachment

type VZSerialPortAttachment struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzserialportattachment

func VZSerialPortAttachmentFromID

func VZSerialPortAttachmentFromID(id objc.ID) *VZSerialPortAttachment

type VZSerialPortConfiguration

type VZSerialPortConfiguration struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzserialportconfiguration

func VZSerialPortConfigurationFromID

func VZSerialPortConfigurationFromID(id objc.ID) *VZSerialPortConfiguration

func (*VZSerialPortConfiguration) Attachment

func (*VZSerialPortConfiguration) SetAttachment

func (o *VZSerialPortConfiguration) SetAttachment(attachment *VZSerialPortAttachment)

type VZSharedDirectory

type VZSharedDirectory struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzshareddirectory

func VZSharedDirectoryFromID

func VZSharedDirectoryFromID(id objc.ID) *VZSharedDirectory

func (*VZSharedDirectory) InitWithURLReadOnly

func (o *VZSharedDirectory) InitWithURLReadOnly(url *foundation.NSURL, readOnly bool) *VZSharedDirectory

@abstract Initialize with a host directory. @param url Local file URL to expose to the guest. @param readOnly Whether or not the directory will be exposed as read-only to the guest.

func (*VZSharedDirectory) IsReadOnly

func (o *VZSharedDirectory) IsReadOnly() bool

@abstract Whether or not the directory will be exposed as read-only to the guest.

func (*VZSharedDirectory) URL

@abstract File URL to a directory on the host to expose to the guest. @discussion The URL must point to an existing directory path in the host file system.

type VZSingleDirectoryShare

type VZSingleDirectoryShare struct {
	VZDirectoryShare
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzsingledirectoryshare

func VZSingleDirectoryShareFromID

func VZSingleDirectoryShareFromID(id objc.ID) *VZSingleDirectoryShare

func (*VZSingleDirectoryShare) Directory

func (o *VZSingleDirectoryShare) Directory() *VZSharedDirectory

func (*VZSingleDirectoryShare) InitWithDirectory

func (o *VZSingleDirectoryShare) InitWithDirectory(directory *VZSharedDirectory) *VZSingleDirectoryShare

@abstract Initialize the directory share with a directory on the host. @param directory Directory to share.

type VZSocketDevice

type VZSocketDevice struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzsocketdevice

func VZSocketDeviceFromID

func VZSocketDeviceFromID(id objc.ID) *VZSocketDevice

type VZSpiceAgentPortAttachment

type VZSpiceAgentPortAttachment struct {
	VZSerialPortAttachment
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzspiceagentportattachment

func VZSpiceAgentPortAttachmentFromID

func VZSpiceAgentPortAttachmentFromID(id objc.ID) *VZSpiceAgentPortAttachment

func (*VZSpiceAgentPortAttachment) Init

func (*VZSpiceAgentPortAttachment) SetSharesClipboard

func (o *VZSpiceAgentPortAttachment) SetSharesClipboard(sharesClipboard bool)

func (*VZSpiceAgentPortAttachment) SharesClipboard

func (o *VZSpiceAgentPortAttachment) SharesClipboard() bool

@abstract Enable the Spice agent clipboard sharing capability. @discussion If enabled, the clipboard capability will be advertised to the Spice guest agent. Copy and paste events will be shared between the host and the virtual machine. This property is enabled by default.

type VZStorageDevice

type VZStorageDevice struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzstoragedevice

func VZStorageDeviceFromID

func VZStorageDeviceFromID(id objc.ID) *VZStorageDevice

type VZStorageDeviceConfiguration

type VZStorageDeviceConfiguration struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzstoragedeviceconfiguration

func VZStorageDeviceConfigurationFromID

func VZStorageDeviceConfigurationFromID(id objc.ID) *VZStorageDeviceConfiguration

func (*VZStorageDeviceConfiguration) Attachment

type VZUSBController

type VZUSBController struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzusbcontroller

func VZUSBControllerFromID

func VZUSBControllerFromID(id objc.ID) *VZUSBController

func (*VZUSBController) AttachDeviceCompletionHandler

func (o *VZUSBController) AttachDeviceCompletionHandler(device VZUSBDevice, completionHandler func(unsafe.Pointer))

@abstract Attach a USB device. @discussion If the device is successfully attached to the controller, it will appear in the usbDevices property, its usbController property will be set to point to the USB controller that it is attached to and completion handler will return nil. If the device was previously attached to this or another USB controller, attach function will fail with the `VZErrorDeviceAlreadyAttached`. If the device cannot be initialized correctly, attach function will fail with `VZErrorDeviceInitializationFailure`. This method must be called on the virtual machine's queue. @param device USB device to attach. @param completionHandler Block called after the device has been attached or on error. The error parameter passed to the block is nil if the attach was successful. It will be also invoked on an virtual machine's queue. @see VZUSBDevice

func (*VZUSBController) DetachDeviceCompletionHandler

func (o *VZUSBController) DetachDeviceCompletionHandler(device VZUSBDevice, completionHandler func(unsafe.Pointer))

@abstract Detach a USB device. @discussion If the device is successfully detached from the controller, it will disappear from the usbDevices property, its usbController property will be set to nil and completion handler will return nil. If the device wasn't attached to the controller at the time of calling detach method, it will fail with the `VZErrorDeviceNotFound` error. This method must be called on the virtual machine's queue. @param device USB device to detach. @param completionHandler Block called after the device has been detached or on error. The error parameter passed to the block is nil if the detach was successful. It will be also invoked on an virtual machine's queue. @see VZUSBDevice

func (*VZUSBController) UsbDevices

func (o *VZUSBController) UsbDevices() *foundation.NSArray[VZUSBDevice]

type VZUSBControllerConfiguration

type VZUSBControllerConfiguration struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzusbcontrollerconfiguration

func VZUSBControllerConfigurationFromID

func VZUSBControllerConfigurationFromID(id objc.ID) *VZUSBControllerConfiguration

func (*VZUSBControllerConfiguration) SetUsbDevices

func (*VZUSBControllerConfiguration) UsbDevices

type VZUSBDevice

type VZUSBDevice interface {
	UsbController() *VZUSBController
	Uuid() *foundation.NSUUID
}

VZUSBDevice wraps the ObjC protocol VZUSBDevice.

type VZUSBDeviceConfiguration

type VZUSBDeviceConfiguration interface {
	Uuid() *foundation.NSUUID
	SetUuid(uuid *foundation.NSUUID)
}

VZUSBDeviceConfiguration wraps the ObjC protocol VZUSBDeviceConfiguration.

type VZUSBKeyboardConfiguration

type VZUSBKeyboardConfiguration struct {
	VZKeyboardConfiguration
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzusbkeyboardconfiguration

func VZUSBKeyboardConfigurationFromID

func VZUSBKeyboardConfigurationFromID(id objc.ID) *VZUSBKeyboardConfiguration

func (*VZUSBKeyboardConfiguration) Init

type VZUSBMassStorageDevice

type VZUSBMassStorageDevice struct {
	VZStorageDevice
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzusbmassstoragedevice

func VZUSBMassStorageDeviceFromID

func VZUSBMassStorageDeviceFromID(id objc.ID) *VZUSBMassStorageDevice

func (*VZUSBMassStorageDevice) InitWithConfiguration

func (o *VZUSBMassStorageDevice) InitWithConfiguration(configuration *VZUSBMassStorageDeviceConfiguration) *VZUSBMassStorageDevice

@abstract Initialize the runtime USB Mass Storage device object. @param configuration The configuration of the USB Mass Storage device. @see VZUSBMassStorageDeviceConfiguration

type VZUSBMassStorageDeviceConfiguration

type VZUSBMassStorageDeviceConfiguration struct {
	VZStorageDeviceConfiguration
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzusbmassstoragedeviceconfiguration

func VZUSBMassStorageDeviceConfigurationFromID

func VZUSBMassStorageDeviceConfigurationFromID(id objc.ID) *VZUSBMassStorageDeviceConfiguration

func (*VZUSBMassStorageDeviceConfiguration) InitWithAttachment

@abstract Initialize a VZUSBMassStorageDeviceConfiguration with a device attachment. @param attachment The storage device attachment. This defines how the virtualized device operates on the host side. @see VZDiskImageStorageDeviceAttachment

type VZVirtioBlockDeviceConfiguration

type VZVirtioBlockDeviceConfiguration struct {
	VZStorageDeviceConfiguration
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvirtioblockdeviceconfiguration

func VZVirtioBlockDeviceConfigurationFromID

func VZVirtioBlockDeviceConfigurationFromID(id objc.ID) *VZVirtioBlockDeviceConfiguration

func (*VZVirtioBlockDeviceConfiguration) BlockDeviceIdentifier

func (o *VZVirtioBlockDeviceConfiguration) BlockDeviceIdentifier() *foundation.NSString

func (*VZVirtioBlockDeviceConfiguration) InitWithAttachment

@abstract Initialize a VZVirtioBlockDeviceConfiguration with a device attachment. @param attachment The storage device attachment. This defines how the virtualized device operates on the host side. @see VZDiskImageStorageDeviceAttachment

func (*VZVirtioBlockDeviceConfiguration) SetBlockDeviceIdentifier

func (o *VZVirtioBlockDeviceConfiguration) SetBlockDeviceIdentifier(blockDeviceIdentifier *foundation.NSString)

type VZVirtioConsoleDevice

type VZVirtioConsoleDevice struct {
	VZConsoleDevice
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvirtioconsoledevice

func VZVirtioConsoleDeviceFromID

func VZVirtioConsoleDeviceFromID(id objc.ID) *VZVirtioConsoleDevice

func (*VZVirtioConsoleDevice) Delegate

@abstract Pointer to a delegate object for the console device.

func (*VZVirtioConsoleDevice) Ports

@abstract The console ports currently being used by this console device.

func (*VZVirtioConsoleDevice) SetDelegate

func (o *VZVirtioConsoleDevice) SetDelegate(delegate VZVirtioConsoleDeviceDelegate)

type VZVirtioConsoleDeviceConfiguration

type VZVirtioConsoleDeviceConfiguration struct {
	VZConsoleDeviceConfiguration
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvirtioconsoledeviceconfiguration

func VZVirtioConsoleDeviceConfigurationFromID

func VZVirtioConsoleDeviceConfigurationFromID(id objc.ID) *VZVirtioConsoleDeviceConfiguration

func (*VZVirtioConsoleDeviceConfiguration) Init

func (*VZVirtioConsoleDeviceConfiguration) Ports

type VZVirtioConsoleDeviceDelegate

type VZVirtioConsoleDeviceDelegate interface {
}

VZVirtioConsoleDeviceDelegate wraps the ObjC protocol VZVirtioConsoleDeviceDelegate.

type VZVirtioConsolePort

type VZVirtioConsolePort struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvirtioconsoleport

func VZVirtioConsolePortFromID

func VZVirtioConsolePortFromID(id objc.ID) *VZVirtioConsolePort

func (*VZVirtioConsolePort) Attachment

@abstract The console port attachment that's currently connected to this console port. @discussion This property may change at any time while the VM is running.

func (*VZVirtioConsolePort) Name

@abstract The console port name currently being used by this port. @discussion This property may not change while the VM is running. A null value indicates no name has been set.

func (*VZVirtioConsolePort) SetAttachment

func (o *VZVirtioConsolePort) SetAttachment(attachment *VZSerialPortAttachment)

type VZVirtioConsolePortArray

type VZVirtioConsolePortArray struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvirtioconsoleportarray

func VZVirtioConsolePortArrayFromID

func VZVirtioConsolePortArrayFromID(id objc.ID) *VZVirtioConsolePortArray

func (*VZVirtioConsolePortArray) MaximumPortCount

func (o *VZVirtioConsolePortArray) MaximumPortCount() uint32

func (*VZVirtioConsolePortArray) ObjectAtIndexedSubscript

func (o *VZVirtioConsolePortArray) ObjectAtIndexedSubscript(portIndex uint) *VZVirtioConsolePort

@abstract Get a port at the specified index.

type VZVirtioConsolePortConfiguration

type VZVirtioConsolePortConfiguration struct {
	VZConsolePortConfiguration
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvirtioconsoleportconfiguration

func VZVirtioConsolePortConfigurationFromID

func VZVirtioConsolePortConfigurationFromID(id objc.ID) *VZVirtioConsolePortConfiguration

func (*VZVirtioConsolePortConfiguration) Init

func (*VZVirtioConsolePortConfiguration) IsConsole

func (o *VZVirtioConsolePortConfiguration) IsConsole() bool

@abstract The console port may be marked for use as the system console. The default is false.

func (*VZVirtioConsolePortConfiguration) Name

@abstract The console port's name. The default behavior is to not use a name unless set.

func (*VZVirtioConsolePortConfiguration) SetIsConsole

func (o *VZVirtioConsolePortConfiguration) SetIsConsole(isConsole bool)

func (*VZVirtioConsolePortConfiguration) SetName

type VZVirtioConsolePortConfigurationArray

type VZVirtioConsolePortConfigurationArray struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvirtioconsoleportconfigurationarray

func VZVirtioConsolePortConfigurationArrayFromID

func VZVirtioConsolePortConfigurationArrayFromID(id objc.ID) *VZVirtioConsolePortConfigurationArray

func (*VZVirtioConsolePortConfigurationArray) MaximumPortCount

func (o *VZVirtioConsolePortConfigurationArray) MaximumPortCount() uint32

@abstract The maximum number of ports allocated by this device. The default is the number of ports attached to this device.

func (*VZVirtioConsolePortConfigurationArray) ObjectAtIndexedSubscript

func (o *VZVirtioConsolePortConfigurationArray) ObjectAtIndexedSubscript(portIndex uint) *VZVirtioConsolePortConfiguration

@abstract Get a port configuration at the specified index.

func (*VZVirtioConsolePortConfigurationArray) SetMaximumPortCount

func (o *VZVirtioConsolePortConfigurationArray) SetMaximumPortCount(maximumPortCount uint32)

func (*VZVirtioConsolePortConfigurationArray) SetObjectAtIndexedSubscript

func (o *VZVirtioConsolePortConfigurationArray) SetObjectAtIndexedSubscript(configuration *VZVirtioConsolePortConfiguration, portIndex uint)

@abstract Set a port configuration at the specified index.

type VZVirtioEntropyDeviceConfiguration

type VZVirtioEntropyDeviceConfiguration struct {
	VZEntropyDeviceConfiguration
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvirtioentropydeviceconfiguration

func VZVirtioEntropyDeviceConfigurationFromID

func VZVirtioEntropyDeviceConfigurationFromID(id objc.ID) *VZVirtioEntropyDeviceConfiguration

func (*VZVirtioEntropyDeviceConfiguration) Init

type VZVirtioFileSystemDevice

type VZVirtioFileSystemDevice struct {
	VZDirectorySharingDevice
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvirtiofilesystemdevice

func VZVirtioFileSystemDeviceFromID

func VZVirtioFileSystemDeviceFromID(id objc.ID) *VZVirtioFileSystemDevice

func (*VZVirtioFileSystemDevice) SetShare

func (o *VZVirtioFileSystemDevice) SetShare(share *VZDirectoryShare)

func (*VZVirtioFileSystemDevice) Share

@abstract Directory share. Defines how host resources are exposed to the guest virtual machine. @discussion Setting this property to VZLinuxRosettaDirectoryShare is not supported and will cause an exception to be raised. @see VZSingleDirectoryShare @see VZMultipleDirectoryShare

func (*VZVirtioFileSystemDevice) Tag

@abstract The tag is a string identifying the device. @discussion The tag is presented as a label in the guest identifying this device for mounting.

type VZVirtioFileSystemDeviceConfiguration

type VZVirtioFileSystemDeviceConfiguration struct {
	VZDirectorySharingDeviceConfiguration
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvirtiofilesystemdeviceconfiguration

func VZVirtioFileSystemDeviceConfigurationFromID

func VZVirtioFileSystemDeviceConfigurationFromID(id objc.ID) *VZVirtioFileSystemDeviceConfiguration

func (*VZVirtioFileSystemDeviceConfiguration) InitWithTag

@abstract Configuration of the Virtio file system device. @param tag The label identifying this device in the guest. @discussion The tag is presented as a label in the guest identifying this device for mounting. The tag must be valid, which can be checked with +[VZVirtioFileSystemDeviceConfiguration validateTag:error:]. @see +[VZVirtioFileSystemDeviceConfiguration validateTag:error:]

func (*VZVirtioFileSystemDeviceConfiguration) SetShare

func (*VZVirtioFileSystemDeviceConfiguration) SetTag

func (*VZVirtioFileSystemDeviceConfiguration) Share

@abstract Directory share. Defines how host resources are exposed to the guest virtual machine. @see VZSingleDirectoryShare @see VZMultipleDirectoryShare @see VZLinuxRosettaDirectoryShare

func (*VZVirtioFileSystemDeviceConfiguration) Tag

@abstract The tag is a string identifying the device. @discussion The tag is presented as a label in the guest identifying this device for mounting. The tag must be valid, which can be checked with +[VZVirtioFileSystemDeviceConfiguration validateTag:error:]. @see +[VZVirtioFileSystemDeviceConfiguration validateTag:error:]

type VZVirtioGraphicsDevice

type VZVirtioGraphicsDevice struct {
	VZGraphicsDevice
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvirtiographicsdevice

func VZVirtioGraphicsDeviceFromID

func VZVirtioGraphicsDeviceFromID(id objc.ID) *VZVirtioGraphicsDevice

type VZVirtioGraphicsDeviceConfiguration

type VZVirtioGraphicsDeviceConfiguration struct {
	VZGraphicsDeviceConfiguration
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvirtiographicsdeviceconfiguration

func VZVirtioGraphicsDeviceConfigurationFromID

func VZVirtioGraphicsDeviceConfigurationFromID(id objc.ID) *VZVirtioGraphicsDeviceConfiguration

func (*VZVirtioGraphicsDeviceConfiguration) Init

func (*VZVirtioGraphicsDeviceConfiguration) Scanouts

func (*VZVirtioGraphicsDeviceConfiguration) SetScanouts

type VZVirtioGraphicsScanoutConfiguration

type VZVirtioGraphicsScanoutConfiguration struct {
	VZGraphicsDisplayConfiguration
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvirtiographicsscanoutconfiguration

func VZVirtioGraphicsScanoutConfigurationFromID

func VZVirtioGraphicsScanoutConfigurationFromID(id objc.ID) *VZVirtioGraphicsScanoutConfiguration

func (*VZVirtioGraphicsScanoutConfiguration) HeightInPixels

func (o *VZVirtioGraphicsScanoutConfiguration) HeightInPixels() int

@abstract The height of the scanout, in pixels.

func (*VZVirtioGraphicsScanoutConfiguration) InitWithWidthInPixelsHeightInPixels

func (o *VZVirtioGraphicsScanoutConfiguration) InitWithWidthInPixelsHeightInPixels(widthInPixels int, heightInPixels int) *VZVirtioGraphicsScanoutConfiguration

@abstract Create a scanout configuration with the specified pixel dimensions. @param widthInPixels The width of the scanout, in pixels. @param heightInPixels The height of the scanout, in pixels.

func (*VZVirtioGraphicsScanoutConfiguration) SetHeightInPixels

func (o *VZVirtioGraphicsScanoutConfiguration) SetHeightInPixels(heightInPixels int)

func (*VZVirtioGraphicsScanoutConfiguration) SetWidthInPixels

func (o *VZVirtioGraphicsScanoutConfiguration) SetWidthInPixels(widthInPixels int)

func (*VZVirtioGraphicsScanoutConfiguration) WidthInPixels

func (o *VZVirtioGraphicsScanoutConfiguration) WidthInPixels() int

@abstract The width of the scanout, in pixels.

type VZVirtioNetworkDeviceConfiguration

type VZVirtioNetworkDeviceConfiguration struct {
	VZNetworkDeviceConfiguration
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvirtionetworkdeviceconfiguration

func VZVirtioNetworkDeviceConfigurationFromID

func VZVirtioNetworkDeviceConfigurationFromID(id objc.ID) *VZVirtioNetworkDeviceConfiguration

func (*VZVirtioNetworkDeviceConfiguration) Init

type VZVirtioSocketConnection

type VZVirtioSocketConnection struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvirtiosocketconnection

func VZVirtioSocketConnectionFromID

func VZVirtioSocketConnectionFromID(id objc.ID) *VZVirtioSocketConnection

func (*VZVirtioSocketConnection) Close

func (o *VZVirtioSocketConnection) Close()

@abstract Close the file descriptor that's associated with the socket.

func (*VZVirtioSocketConnection) DestinationPort

func (o *VZVirtioSocketConnection) DestinationPort() uint32

@abstract The destination port number of the connection.

func (*VZVirtioSocketConnection) FileDescriptor

func (o *VZVirtioSocketConnection) FileDescriptor() int

@abstract The file descriptor associated with the socket. @discussion Data is sent by writing to the file descriptor. Data is received by reading from the file descriptor. A file descriptor of -1 indicates a closed connection. The file descriptor is owned by the VZVirtioSocketConnection. It is automatically closed when the object is destroyed.

func (*VZVirtioSocketConnection) SourcePort

func (o *VZVirtioSocketConnection) SourcePort() uint32

@abstract The source port number of the connection.

type VZVirtioSocketDevice

type VZVirtioSocketDevice struct {
	VZSocketDevice
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvirtiosocketdevice

func VZVirtioSocketDeviceFromID

func VZVirtioSocketDeviceFromID(id objc.ID) *VZVirtioSocketDevice

func (*VZVirtioSocketDevice) ConnectToPortCompletionHandler

func (o *VZVirtioSocketDevice) ConnectToPortCompletionHandler(port uint32, completionHandler func(*VZVirtioSocketConnection, unsafe.Pointer))

@abstract Connects to a specified port. @discussion Does nothing if the guest does not listen on that port. @param port The port number to connect to. @param completionHandler Block called after the connection has been successfully established or on error. The error parameter passed to the block is nil if the connection was successful.

func (*VZVirtioSocketDevice) RemoveSocketListenerForPort

func (o *VZVirtioSocketDevice) RemoveSocketListenerForPort(port uint32)

@abstract Removes the listener at a specified port. @discussion Does nothing if the port had no listener. @param port The port number at which the listener is to be removed.

func (*VZVirtioSocketDevice) SetSocketListenerForPort

func (o *VZVirtioSocketDevice) SetSocketListenerForPort(listener *VZVirtioSocketListener, port uint32)

@abstract Sets a listener at a specified port. @discussion There is only one listener per port, any existing listener will be removed, and the specified listener here will be set instead. The same listener can be registered on multiple ports. The listener's delegate will be called whenever the guest connects to that port. @param listener The VZVirtioSocketListener object to be set. @param port The port number to set the listener at.

type VZVirtioSocketDeviceConfiguration

type VZVirtioSocketDeviceConfiguration struct {
	VZSocketDeviceConfiguration
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvirtiosocketdeviceconfiguration

func VZVirtioSocketDeviceConfigurationFromID

func VZVirtioSocketDeviceConfigurationFromID(id objc.ID) *VZVirtioSocketDeviceConfiguration

func (*VZVirtioSocketDeviceConfiguration) Init

type VZVirtioSocketListener

type VZVirtioSocketListener struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvirtiosocketlistener

func VZVirtioSocketListenerFromID

func VZVirtioSocketListenerFromID(id objc.ID) *VZVirtioSocketListener

func (*VZVirtioSocketListener) Delegate

func (*VZVirtioSocketListener) SetDelegate

func (o *VZVirtioSocketListener) SetDelegate(delegate VZVirtioSocketListenerDelegate)

type VZVirtioSocketListenerDelegate

type VZVirtioSocketListenerDelegate interface {
}

VZVirtioSocketListenerDelegate wraps the ObjC protocol VZVirtioSocketListenerDelegate.

type VZVirtioSoundDeviceConfiguration

type VZVirtioSoundDeviceConfiguration struct {
	VZAudioDeviceConfiguration
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvirtiosounddeviceconfiguration

func VZVirtioSoundDeviceConfigurationFromID

func VZVirtioSoundDeviceConfigurationFromID(id objc.ID) *VZVirtioSoundDeviceConfiguration

func (*VZVirtioSoundDeviceConfiguration) Init

func (*VZVirtioSoundDeviceConfiguration) SetStreams

func (*VZVirtioSoundDeviceConfiguration) Streams

type VZVirtioSoundDeviceInputStreamConfiguration

type VZVirtioSoundDeviceInputStreamConfiguration struct {
	VZVirtioSoundDeviceStreamConfiguration
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvirtiosounddeviceinputstreamconfiguration

func VZVirtioSoundDeviceInputStreamConfigurationFromID

func VZVirtioSoundDeviceInputStreamConfigurationFromID(id objc.ID) *VZVirtioSoundDeviceInputStreamConfiguration

func (*VZVirtioSoundDeviceInputStreamConfiguration) Init

@abstract Initialize the input stream configuration.

func (*VZVirtioSoundDeviceInputStreamConfiguration) SetSource

func (*VZVirtioSoundDeviceInputStreamConfiguration) Source

type VZVirtioSoundDeviceOutputStreamConfiguration

type VZVirtioSoundDeviceOutputStreamConfiguration struct {
	VZVirtioSoundDeviceStreamConfiguration
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvirtiosounddeviceoutputstreamconfiguration

func VZVirtioSoundDeviceOutputStreamConfigurationFromID

func VZVirtioSoundDeviceOutputStreamConfigurationFromID(id objc.ID) *VZVirtioSoundDeviceOutputStreamConfiguration

func (*VZVirtioSoundDeviceOutputStreamConfiguration) Init

@abstract Initialize the output stream configuration.

func (*VZVirtioSoundDeviceOutputStreamConfiguration) SetSink

func (*VZVirtioSoundDeviceOutputStreamConfiguration) Sink

type VZVirtioTraditionalMemoryBalloonDevice

type VZVirtioTraditionalMemoryBalloonDevice struct {
	VZMemoryBalloonDevice
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvirtiotraditionalmemoryballoondevice

func VZVirtioTraditionalMemoryBalloonDeviceFromID

func VZVirtioTraditionalMemoryBalloonDeviceFromID(id objc.ID) *VZVirtioTraditionalMemoryBalloonDevice

func (*VZVirtioTraditionalMemoryBalloonDevice) SetTargetVirtualMachineMemorySize

func (o *VZVirtioTraditionalMemoryBalloonDevice) SetTargetVirtualMachineMemorySize(targetVirtualMachineMemorySize uint64)

func (*VZVirtioTraditionalMemoryBalloonDevice) TargetVirtualMachineMemorySize

func (o *VZVirtioTraditionalMemoryBalloonDevice) TargetVirtualMachineMemorySize() uint64

type VZVirtualMachine

type VZVirtualMachine struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvirtualmachine

func VZVirtualMachineFromID

func VZVirtualMachineFromID(id objc.ID) *VZVirtualMachine

func (*VZVirtualMachine) CanPause

func (o *VZVirtualMachine) CanPause() bool

@abstract Return YES if the machine is in a state that can be paused. @see -[VZVirtualMachine pauseWithCompletionHandler:] @see -[VZVirtualMachine state]

func (*VZVirtualMachine) CanRequestStop

func (o *VZVirtualMachine) CanRequestStop() bool

@abstract Returns whether the machine is in a state where the guest can be asked to stop. @see -[VZVirtualMachine requestStopWithError:] @see -[VZVirtualMachine state]

func (*VZVirtualMachine) CanResume

func (o *VZVirtualMachine) CanResume() bool

@abstract Return YES if the machine is in a state that can be resumed. @see -[VZVirtualMachine resumeWithCompletionHandler:] @see -[VZVirtualMachine state]

func (*VZVirtualMachine) CanStart

func (o *VZVirtualMachine) CanStart() bool

@abstract Return YES if the machine is in a state that can be started. @see -[VZVirtualMachine startWithCompletionHandler:]. @see -[VZVirtualMachine state]

func (*VZVirtualMachine) CanStop

func (o *VZVirtualMachine) CanStop() bool

@abstract Return YES if the machine is in a state that can be stopped. @see -[VZVirtualMachine stopWithCompletionHandler:] @see -[VZVirtualMachine state]

func (*VZVirtualMachine) ConsoleDevices

func (o *VZVirtualMachine) ConsoleDevices() *foundation.NSArray[*VZConsoleDevice]

@abstract Return the list of console devices configured on this virtual machine. Return an empty array if no console device is configured. @see VZVirtioConsoleDeviceConfiguration @see VZVirtualMachineConfiguration

func (*VZVirtualMachine) Delegate

@abstract The virtual machine delegate.

func (*VZVirtualMachine) DirectorySharingDevices

func (o *VZVirtualMachine) DirectorySharingDevices() *foundation.NSArray[*VZDirectorySharingDevice]

@abstract Return the list of directory sharing devices configured on this virtual machine. Return an empty array if no directory sharing device is configured. @see VZVirtioFileSystemDeviceConfiguration @see VZVirtualMachineConfiguration

func (*VZVirtualMachine) GraphicsDevices

func (o *VZVirtualMachine) GraphicsDevices() *foundation.NSArray[*VZGraphicsDevice]

@abstract Return the list of graphics devices configured on this virtual machine. Return an empty array if no graphics device is configured. @see VZGraphicsDeviceConfiguration @see VZVirtualMachineConfiguration

func (*VZVirtualMachine) InitWithConfiguration

func (o *VZVirtualMachine) InitWithConfiguration(configuration *VZVirtualMachineConfiguration) *VZVirtualMachine

@abstract Initialize the virtual machine. @discussion This initializer uses the main queue to operate the virtual machine. Every call must be done on the main queue and the callbacks are invoked on the main queue. @param configuration The configuration of the virtual machine. The configuration must be valid. Validation can be performed at runtime with [VZVirtualMachineConfiguration validateWithError:]. The configuration is copied by the initializer.

func (*VZVirtualMachine) InitWithConfigurationQueue

func (o *VZVirtualMachine) InitWithConfigurationQueue(configuration *VZVirtualMachineConfiguration, queue *foundation.NSObject) *VZVirtualMachine

@abstract Initialize the virtual machine. @param configuration The configuration of the virtual machine. The configuration must be valid. Validation can be performed at runtime with [VZVirtualMachineConfiguration validateWithError:]. The configuration is copied by the initializer. @param queue The serial queue on which the virtual machine operates. Every operation on the virtual machine must be done on that queue. The callbacks and delegate methods are invoked on that queue. If the queue is not serial, the behavior is undefined.

func (*VZVirtualMachine) MemoryBalloonDevices

func (o *VZVirtualMachine) MemoryBalloonDevices() *foundation.NSArray[*VZMemoryBalloonDevice]

@abstract Return the list of memory balloon devices configured on this virtual machine. Return an empty array if no memory balloon device is configured. @see VZVirtioTraditionalMemoryBalloonDeviceConfiguration @see VZVirtualMachineConfiguration

func (*VZVirtualMachine) NetworkDevices

func (o *VZVirtualMachine) NetworkDevices() *foundation.NSArray[*VZNetworkDevice]

@abstract Return the list of network devices configured on this virtual machine. Return an empty array if no network device is configured. @see VZVirtioNetworkDeviceConfiguration @see VZVirtualMachineConfiguration

func (*VZVirtualMachine) PauseWithCompletionHandler

func (o *VZVirtualMachine) PauseWithCompletionHandler(completionHandler func(unsafe.Pointer))

@abstract Pause a virtual machine. @discussion Pause a virtual machine that is in Running state. @param completionHandler Block called after the virtual machine has been successfully paused or on error. The error parameter passed to the block is nil if the pause was successful.

func (*VZVirtualMachine) Queue

func (o *VZVirtualMachine) Queue() *foundation.NSObject

@abstract The queue associated with this virtual machine. @discussion This property is a reference to the queue used to create the virtual machine. If no queue was passed, the default queue is the main queue. The property can be accessed from any queue or actor. Other properties or function calls on the VZVirtualMachine must happen on this queue. The completion handlers from the asynchronous functions are also invoked on this queue.

func (*VZVirtualMachine) RequestStopWithError

func (o *VZVirtualMachine) RequestStopWithError() (bool, error)

@abstract Request that the guest turns itself off. @param error If not nil, assigned with the error if the request failed. @return YES if the request was made successfully. @discussion The -[VZVirtualMachineDelegate guestDidStopVirtualMachine:] delegate method is invoked when the guest has turned itself off. @seealso -[VZVirtualMachineDelegate guestDidStopVirtualMachine:].

func (*VZVirtualMachine) RestoreMachineStateFromURLCompletionHandler

func (o *VZVirtualMachine) RestoreMachineStateFromURLCompletionHandler(saveFileURL *foundation.NSURL, completionHandler func(unsafe.Pointer))

@abstract Restore a virtual machine. @discussion Restore a stopped virtual machine to a state previously saved to file through `saveMachineStateToURL:completionHandler:`. If the file cannot be read, or contains otherwise invalid contents, this operation will fail with a `VZErrorRestore` error. If the virtual machine is not in the stopped state, this operation will fail with a `VZErrorInvalidVirtualMachineStateTransition` error. If the virtual machine cannot be started due to an internal error, this operation will fail with a `VZErrorInternal` error. The `VZVirtualMachineConfiguration` must also support restoring, which can be checked with `-[VZVirtualMachineConfiguration validateSaveRestoreSupportWithError:]`. If this operation fails, the virtual machine state is unchanged. If successful, the virtual machine is restored and placed in the paused state. @param saveFileURL URL to file containing saved state of a suspended virtual machine. The file must have been generated by `saveMachineStateToURL:completionHandler:` on the same host. Otherwise, this operation will fail with a `VZErrorRestore` error indicating a permission denied failure reason. The virtual machine must also be configured compatibly with the state contained in the file. If the `VZVirtualMachineConfiguration` is not compatible with the content of the file, this operation will fail with a `VZErrorRestore` error indicating an invalid argument failure reason. Files generated with `saveMachineStateToURL:completionHandler:` on a software version that is newer than the current version will also be rejected with an invalid argument failure reason. In some cases, `restoreMachineStateFromURL:completionHandler:` can fail if a software update has changed the host in a way that would be incompatible with the previous format. In this case, an invalid argument error will be surfaced. In most cases, the virtual machine should be restarted with `startWithCompletionHandler:`. @param completionHandler Block called after the virtual machine has been successfully started or on error. The error parameter passed to the block is nil if the restore was successful. @see -[VZVirtualMachineConfiguration validateSaveRestoreSupportWithError:]

func (*VZVirtualMachine) ResumeWithCompletionHandler

func (o *VZVirtualMachine) ResumeWithCompletionHandler(completionHandler func(unsafe.Pointer))

@abstract Resume a virtual machine. @discussion Resume a virtual machine that is in the Paused state. @param completionHandler Block called after the virtual machine has been successfully resumed or on error. The error parameter passed to the block is nil if the resumption was successful.

func (*VZVirtualMachine) SaveMachineStateToURLCompletionHandler

func (o *VZVirtualMachine) SaveMachineStateToURLCompletionHandler(saveFileURL *foundation.NSURL, completionHandler func(unsafe.Pointer))

@abstract Save a virtual machine. @discussion Save a paused virtual machine to file. The contents of this file can be used later to restore the state of the paused virtual machine. If the virtual machine is not paused, this operation will fail with a `VZErrorInvalidVirtualMachineState` error. If the virtual machine cannot be saved, this operation will fail with a `VZErrorSave` error. The `VZVirtualMachineConfiguration` must also support saving, which can be checked with `-[VZVirtualMachineConfiguration validateSaveRestoreSupportWithError:]`. If this operation fails, the virtual machine state is unchanged. If successful, the file is written out and the virtual machine state is unchanged. @param saveFileURL URL to location where the saved state of the virtual machine is to be written. Each file is protected by an encryption key that is tied to the host on which it is created. @param completionHandler Block called after the virtual machine has been successfully saved or on error. The error parameter passed to the block is nil if the save was successful. @see -[VZVirtualMachineConfiguration validateSaveRestoreSupportWithError:]

func (*VZVirtualMachine) SetDelegate

func (o *VZVirtualMachine) SetDelegate(delegate VZVirtualMachineDelegate)

func (*VZVirtualMachine) SocketDevices

func (o *VZVirtualMachine) SocketDevices() *foundation.NSArray[*VZSocketDevice]

@abstract Return the list of socket devices configured on this virtual machine. Return an empty array if no socket device is configured. @see VZVirtioSocketDeviceConfiguration @see VZVirtualMachineConfiguration

func (*VZVirtualMachine) StartWithCompletionHandler

func (o *VZVirtualMachine) StartWithCompletionHandler(completionHandler func(unsafe.Pointer))

@abstract Start a virtual machine. @discussion Start a virtual machine that is in either Stopped or Error state. @param completionHandler Block called after the virtual machine has been successfully started or on error. The error parameter passed to the block is nil if the start was successful.

func (*VZVirtualMachine) StartWithOptionsCompletionHandler

func (o *VZVirtualMachine) StartWithOptionsCompletionHandler(options *VZVirtualMachineStartOptions, completionHandler func(unsafe.Pointer))

@abstract Start a virtual machine with options. @discussion Start a virtual machine that is in either Stopped or Error state. @param options Options used to control how the virtual machine is started. @param completionHandler Block called after the virtual machine has been successfully started or on error. The error parameter passed to the block is nil if the start was successful. @seealso VZMacOSVirtualMachineStartOptions

func (*VZVirtualMachine) State

@abstract Execution state of the virtual machine.

func (*VZVirtualMachine) StopWithCompletionHandler

func (o *VZVirtualMachine) StopWithCompletionHandler(completionHandler func(unsafe.Pointer))

@abstract Stop a virtual machine. @discussion Stop a virtual machine that is in either Running or Paused state. @param completionHandler Block called after the virtual machine has been successfully stopped or on error. The error parameter passed to the block is nil if the stop was successful. @discussion This is a destructive operation. It stops the virtual machine without giving the guest a chance to stop cleanly. @seealso -[VZVirtualMachine requestStopWithError:]

func (*VZVirtualMachine) UsbControllers

func (o *VZVirtualMachine) UsbControllers() *foundation.NSArray[*VZUSBController]

@abstract Return the list of USB controllers configured on this virtual machine. Return an empty array if no USB controller is configured. @see VZUSBControllerConfiguration @see VZVirtualMachineConfiguration

type VZVirtualMachineConfiguration

type VZVirtualMachineConfiguration struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvirtualmachineconfiguration

func VZVirtualMachineConfigurationFromID

func VZVirtualMachineConfigurationFromID(id objc.ID) *VZVirtualMachineConfiguration

func (*VZVirtualMachineConfiguration) AudioDevices

@abstract List of audio devices. Empty by default. @see VZVirtioSoundDeviceConfiguration

func (*VZVirtualMachineConfiguration) BootLoader

@abstract Boot loader used when the virtual machine starts. @see VZLinuxBootLoader @see VZMacOSBootLoader

func (*VZVirtualMachineConfiguration) CPUCount

func (o *VZVirtualMachineConfiguration) CPUCount() uint

@abstract Number of CPUs. @discussion The number of CPUs must be a value between VZVirtualMachineConfiguration.minimumAllowedCPUCount and VZVirtualMachineConfiguration.maximumAllowedCPUCount. @see VZVirtualMachineConfiguration.minimumAllowedCPUCount @see VZVirtualMachineConfiguration.maximumAllowedCPUCount

func (*VZVirtualMachineConfiguration) ConsoleDevices

@abstract List of console devices. Empty by default. @see VZVirtioConsoleDeviceConfiguration

func (*VZVirtualMachineConfiguration) DirectorySharingDevices

@abstract List of directory sharing devices. Empty by default. @see VZVirtioFileSystemDeviceConfiguration

func (*VZVirtualMachineConfiguration) EntropyDevices

@abstract List of entropy devices. Empty by default. @see VZVirtioEntropyDeviceConfiguration

func (*VZVirtualMachineConfiguration) GraphicsDevices

@abstract List of graphics devices. Empty by default. @see VZMacGraphicsDeviceConfiguration

func (*VZVirtualMachineConfiguration) Keyboards

@abstract List of keyboards. Empty by default. @see VZUSBKeyboardConfiguration @see VZMacKeyboardConfiguration

func (*VZVirtualMachineConfiguration) MemoryBalloonDevices

@abstract List of memory balloon devices. Empty by default. @see VZVirtioTraditionalMemoryBalloonDeviceConfiguration

func (*VZVirtualMachineConfiguration) MemorySize

func (o *VZVirtualMachineConfiguration) MemorySize() uint64

@abstract Virtual machine memory size in bytes. @discussion The memory size must be a multiple of a 1 megabyte (1024 * 1024 bytes) between VZVirtualMachineConfiguration.minimumAllowedMemorySize and VZVirtualMachineConfiguration.maximumAllowedMemorySize. The memorySize represents the total physical memory seen by a guest OS running in the virtual machine. Not all memory is allocated on start, the virtual machine allocates memory on demand. @see VZVirtualMachineConfiguration.minimumAllowedMemorySize @see VZVirtualMachineConfiguration.maximumAllowedMemorySize

func (*VZVirtualMachineConfiguration) NetworkDevices

@abstract List of network adapters. Empty by default. @see VZVirtioNetworkDeviceConfiguration

func (*VZVirtualMachineConfiguration) Platform

@abstract The hardware platform to use. @discussion Can be an instance of a VZGenericPlatformConfiguration or VZMacPlatformConfiguration. Defaults to VZGenericPlatformConfiguration. When restoring from saved state you must ensure your configuration matches that of the saved virtual machine. @see VZGenericPlatformConfiguration @see VZMacPlatformConfiguration

func (*VZVirtualMachineConfiguration) PointingDevices

@abstract List of pointing devices. Empty by default. @see VZUSBScreenCoordinatePointingDeviceConfiguration @see VZMacTrackpadConfiguration

func (*VZVirtualMachineConfiguration) SerialPorts

@abstract List of serial ports. Empty by default. @see VZVirtioConsoleDeviceSerialPortConfiguration

func (*VZVirtualMachineConfiguration) SetAudioDevices

func (o *VZVirtualMachineConfiguration) SetAudioDevices(audioDevices *foundation.NSArray[*VZAudioDeviceConfiguration])

func (*VZVirtualMachineConfiguration) SetBootLoader

func (o *VZVirtualMachineConfiguration) SetBootLoader(bootLoader *VZBootLoader)

func (*VZVirtualMachineConfiguration) SetCPUCount

func (o *VZVirtualMachineConfiguration) SetCPUCount(cPUCount uint)

func (*VZVirtualMachineConfiguration) SetConsoleDevices

func (o *VZVirtualMachineConfiguration) SetConsoleDevices(consoleDevices *foundation.NSArray[*VZConsoleDeviceConfiguration])

func (*VZVirtualMachineConfiguration) SetDirectorySharingDevices

func (o *VZVirtualMachineConfiguration) SetDirectorySharingDevices(directorySharingDevices *foundation.NSArray[*VZDirectorySharingDeviceConfiguration])

func (*VZVirtualMachineConfiguration) SetEntropyDevices

func (o *VZVirtualMachineConfiguration) SetEntropyDevices(entropyDevices *foundation.NSArray[*VZEntropyDeviceConfiguration])

func (*VZVirtualMachineConfiguration) SetGraphicsDevices

func (o *VZVirtualMachineConfiguration) SetGraphicsDevices(graphicsDevices *foundation.NSArray[*VZGraphicsDeviceConfiguration])

func (*VZVirtualMachineConfiguration) SetKeyboards

func (*VZVirtualMachineConfiguration) SetMemoryBalloonDevices

func (o *VZVirtualMachineConfiguration) SetMemoryBalloonDevices(memoryBalloonDevices *foundation.NSArray[*VZMemoryBalloonDeviceConfiguration])

func (*VZVirtualMachineConfiguration) SetMemorySize

func (o *VZVirtualMachineConfiguration) SetMemorySize(memorySize uint64)

func (*VZVirtualMachineConfiguration) SetNetworkDevices

func (o *VZVirtualMachineConfiguration) SetNetworkDevices(networkDevices *foundation.NSArray[*VZNetworkDeviceConfiguration])

func (*VZVirtualMachineConfiguration) SetPlatform

func (o *VZVirtualMachineConfiguration) SetPlatform(platform *VZPlatformConfiguration)

func (*VZVirtualMachineConfiguration) SetPointingDevices

func (o *VZVirtualMachineConfiguration) SetPointingDevices(pointingDevices *foundation.NSArray[*VZPointingDeviceConfiguration])

func (*VZVirtualMachineConfiguration) SetSerialPorts

func (*VZVirtualMachineConfiguration) SetSocketDevices

func (o *VZVirtualMachineConfiguration) SetSocketDevices(socketDevices *foundation.NSArray[*VZSocketDeviceConfiguration])

func (*VZVirtualMachineConfiguration) SetStorageDevices

func (o *VZVirtualMachineConfiguration) SetStorageDevices(storageDevices *foundation.NSArray[*VZStorageDeviceConfiguration])

func (*VZVirtualMachineConfiguration) SetUsbControllers

func (o *VZVirtualMachineConfiguration) SetUsbControllers(usbControllers *foundation.NSArray[*VZUSBControllerConfiguration])

func (*VZVirtualMachineConfiguration) SocketDevices

@abstract List of socket devices. Empty by default. @see VZVirtioSocketDeviceConfiguration

func (*VZVirtualMachineConfiguration) StorageDevices

@abstract List of disk devices. Empty by default. @see VZNVMExpressControllerDeviceConfiguration @see VZUSBMassStorageDeviceConfiguration @see VZVirtioBlockDeviceConfiguration

func (*VZVirtualMachineConfiguration) UsbControllers

@abstract List of USB Controllers. Empty by default. @discussion This list represents a set of USB controllers that the virtual machine will start with. For each entry in this list, there will be a corresponding runtime object created in VZVirtualMachine.usbControllers property. @see VZUSBControllerConfiguration

func (*VZVirtualMachineConfiguration) ValidateSaveRestoreSupportWithError

func (o *VZVirtualMachineConfiguration) ValidateSaveRestoreSupportWithError() (bool, error)

@abstract Validate the configuration is savable. @discussion Verify that a virtual machine with this configuration is savable. Not all configuration options can be safely saved and restored from file. If this evaluates to NO, the caller should expect future calls to saveMachineStateToURL:completionHandler: to fail. @param error If not nil, assigned with an error describing the unsupported configuration option. @return YES if the configuration is savable.

func (*VZVirtualMachineConfiguration) ValidateWithError

func (o *VZVirtualMachineConfiguration) ValidateWithError() (bool, error)

@abstract Validate the configuration. @param error If not nil, assigned with the validation error if the validation failed. @return YES if the configuration is valid.

type VZVirtualMachineDelegate

type VZVirtualMachineDelegate interface {
}

VZVirtualMachineDelegate wraps the ObjC protocol VZVirtualMachineDelegate.

type VZVirtualMachineState

type VZVirtualMachineState int64
const (
	// Initial state before the virtual machine is started.
	VZVirtualMachineStateStopped VZVirtualMachineState = 0
	// Running virtual machine.
	VZVirtualMachineStateRunning VZVirtualMachineState = 1
	// A started virtual machine is paused. This state can only be transitioned from VZVirtualMachineStatePausing.
	VZVirtualMachineStatePaused VZVirtualMachineState = 2
	// The virtual machine has encountered an internal error.
	VZVirtualMachineStateError VZVirtualMachineState = 3
	// The virtual machine is configuring the hardware and starting.
	VZVirtualMachineStateStarting VZVirtualMachineState = 4
	// The virtual machine is being paused. This is the intermediate state between VZVirtualMachineStateRunning and VZVirtualMachineStatePaused.
	VZVirtualMachineStatePausing VZVirtualMachineState = 5
	// The virtual machine is being resumed. This is the intermediate state between VZVirtualMachineStatePaused and VZVirtualMachineStateRunning.
	VZVirtualMachineStateResuming VZVirtualMachineState = 6
	// The virtual machine is being stopped. This is the intermediate state between VZVirtualMachineStateRunning and VZVirtualMachineStateStop.
	VZVirtualMachineStateStopping VZVirtualMachineState = 7
	// The virtual machine is being saved. This is the intermediate state between VZVirtualMachineStatePaused and VZVirtualMachineStatePaused.
	VZVirtualMachineStateSaving VZVirtualMachineState = 8
	// The virtual machine is being restored. This is the intermediate state between VZVirtualMachineStateStopped and either VZVirtualMachineStatePaused on success or VZVirtualMachineStateStopped on failure.
	VZVirtualMachineStateRestoring VZVirtualMachineState = 9
)

func (VZVirtualMachineState) String

func (e VZVirtualMachineState) String() string

type VZVirtualMachineView

type VZVirtualMachineView struct {
	appkit.NSView
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvirtualmachineview

func VZVirtualMachineViewFromID

func VZVirtualMachineViewFromID(id objc.ID) *VZVirtualMachineView

func (*VZVirtualMachineView) AutomaticallyReconfiguresDisplay

func (o *VZVirtualMachineView) AutomaticallyReconfiguresDisplay() bool

@abstract Automatically reconfigures the graphics display associated with this view with respect to view changes. Defaults to NO. @discussion 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 will automatically be reconfigured to match the host display environment. This property can only be set on a single VZVirtualMachineView targeting a particular VZGraphicsDisplay at a time. If multiple VZVirtualMachineViews targeting the same VZGraphicsDisplay enable this property, only one view will respect the property, and the other view will have had the property disabled.

func (*VZVirtualMachineView) CapturesSystemKeys

func (o *VZVirtualMachineView) CapturesSystemKeys() bool

@abstract Whether certain system hot keys should be sent to the guest instead of the host. Defaults to NO.

func (*VZVirtualMachineView) SetAutomaticallyReconfiguresDisplay

func (o *VZVirtualMachineView) SetAutomaticallyReconfiguresDisplay(automaticallyReconfiguresDisplay bool)

func (*VZVirtualMachineView) SetCapturesSystemKeys

func (o *VZVirtualMachineView) SetCapturesSystemKeys(capturesSystemKeys bool)

func (*VZVirtualMachineView) SetVirtualMachine

func (o *VZVirtualMachineView) SetVirtualMachine(virtualMachine *VZVirtualMachine)

func (*VZVirtualMachineView) VirtualMachine

func (o *VZVirtualMachineView) VirtualMachine() *VZVirtualMachine

@abstract The virtual machine to display in the view.

type VZVmnetNetworkDeviceAttachment

type VZVmnetNetworkDeviceAttachment struct {
	VZNetworkDeviceAttachment
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzvmnetnetworkdeviceattachment

func VZVmnetNetworkDeviceAttachmentFromID

func VZVmnetNetworkDeviceAttachmentFromID(id objc.ID) *VZVmnetNetworkDeviceAttachment

func (*VZVmnetNetworkDeviceAttachment) InitWithNetwork

@abstract Initialize a `VZVmnetNetworkDeviceAttachment` with a logical network. @param network The logical network object. @return An initialized `VZVmnetNetworkDeviceAttachment`. @discussion To ensure proper isolation between application processes, a VM can only use the `network` that is created by the same application process. If a VM created by one application tries to use a `network` created by another application, starting the interface with this attachment will fail. The vmnet framework requires an entitlement to create or configure a network. For more information, please refer to the vmnet framework API documentation. An example use of this API is: ``` vmnet_return_t status; auto network_configuration = vmnet_network_configuration_create(VMNET_SHARED_MODE, &status); if (!network_configuration) { // Handle error return `status`. } auto network = vmnet_network_create(network_configuration, &status); if (!network) { // Handle error return `status`. } VZVmnetNetworkDeviceAttachment *attachment = [[VZVmnetNetworkDeviceAttachment alloc] initWithNetwork:network]; VZVirtioNetworkDeviceConfiguration virtioNetworkDevice = [[VZVirtioNetworkDeviceConfiguration alloc] init]; virtioNetworkDevice.attachment = attachment; ```

func (*VZVmnetNetworkDeviceAttachment) Network

type VZXHCIController

type VZXHCIController struct {
	VZUSBController
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzxhcicontroller

func VZXHCIControllerFromID

func VZXHCIControllerFromID(id objc.ID) *VZXHCIController

type VZXHCIControllerConfiguration

type VZXHCIControllerConfiguration struct {
	VZUSBControllerConfiguration
}

Apple documentation: https://developer.apple.com/documentation/virtualization/vzxhcicontrollerconfiguration

func VZXHCIControllerConfigurationFromID

func VZXHCIControllerConfigurationFromID(id objc.ID) *VZXHCIControllerConfiguration

func (*VZXHCIControllerConfiguration) Init

type Virtual_memory_guard_exception_code_t

type Virtual_memory_guard_exception_code_t int64
const (
	KGUARD_EXC_DEALLOC_GAP                   Virtual_memory_guard_exception_code_t = 1
	KGUARD_EXC_RECLAIM_COPYIO_FAILURE        Virtual_memory_guard_exception_code_t = 2
	KGUARD_EXC_RECLAIM_INDEX_FAILURE         Virtual_memory_guard_exception_code_t = 4
	KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE    Virtual_memory_guard_exception_code_t = 8
	KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE    Virtual_memory_guard_exception_code_t = 9
	KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE         Virtual_memory_guard_exception_code_t = 10
	KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE         Virtual_memory_guard_exception_code_t = 11
	KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION  Virtual_memory_guard_exception_code_t = 12
	KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY    Virtual_memory_guard_exception_code_t = 13
	KGUARD_EXC_SEC_ACCESS_FAULT              Virtual_memory_guard_exception_code_t = 98
	KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT        Virtual_memory_guard_exception_code_t = 99
	KGUARD_EXC_SEC_COPY_DENIED               Virtual_memory_guard_exception_code_t = 100
	KGUARD_EXC_SEC_SHARING_DENIED            Virtual_memory_guard_exception_code_t = 101
	KGUARD_EXC_MTE_SYNC_FAULT                Virtual_memory_guard_exception_code_t = 200
	KGUARD_EXC_MTE_ASYNC_USER_FAULT          Virtual_memory_guard_exception_code_t = 201
	KGUARD_EXC_MTE_ASYNC_KERN_FAULT          Virtual_memory_guard_exception_code_t = 202
	KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT Virtual_memory_guard_exception_code_t = 203
	KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT Virtual_memory_guard_exception_code_t = 204
)

func (Virtual_memory_guard_exception_code_t) String

type Xpc_listener_create_flags_t

type Xpc_listener_create_flags_t int64
const (
	XPC_LISTENER_CREATE_NONE             Xpc_listener_create_flags_t = 0
	XPC_LISTENER_CREATE_INACTIVE         Xpc_listener_create_flags_t = 1
	XPC_LISTENER_CREATE_FORCE_MACH       Xpc_listener_create_flags_t = 2
	XPC_LISTENER_CREATE_FORCE_XPCSERVICE Xpc_listener_create_flags_t = 4
)

func (Xpc_listener_create_flags_t) String

type Xpc_session_create_flags_t

type Xpc_session_create_flags_t int64
const (
	XPC_SESSION_CREATE_NONE            Xpc_session_create_flags_t = 0
	XPC_SESSION_CREATE_INACTIVE        Xpc_session_create_flags_t = 1
	XPC_SESSION_CREATE_MACH_PRIVILEGED Xpc_session_create_flags_t = 2
)

func (Xpc_session_create_flags_t) String

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL