# IMachine Interface Reference

The IMachine interface represents a virtual machine, or guest, created in VirtualBox. More...

List of all members.

## Public Member Functions
void | setBootOrder (in unsigned long position, in DeviceType device)
| Puts the given device to the specified position in the boot order.
void | getBootOrder (in unsigned long position,[retval] out DeviceType device)
| Returns the device type that occupies the specified position in the boot order.
void | attachDevice (in wstring name, in long controllerPort, in long device, in DeviceType type, in wstringUUID id)
| Attaches a device and optionally mounts a medium to the given storage controller (IStorageController, identified by name), at the indicated port and device.
void | detachDevice (in wstring name, in long controllerPort, in long device)
| Detaches the device attached to a device slot of the specified bus.
void | passthroughDevice (in wstring name, in long controllerPort, in long device, in boolean passthrough)
| Sets the passthrough mode of an existing DVD device.
void | mountMedium (in wstring name, in long controllerPort, in long device, in wstringUUID medium, in boolean force)
| Mounts a medium (IMedium, identified by the given UUID id) to the given storage controller (IStorageController, identified by name), at the indicated port and device.
void | getMedium (in wstring name, in long controllerPort, in long device,[retval] out IMedium medium)
| Returns the virtual medium attached to a device slot of the specified bus.
void | getMediumAttachmentsOfController (in wstring name,[retval] out IMediumAttachment[] mediumAttachments)
| Returns an array of medium attachments which are attached to the the controller with the given name.
void | getMediumAttachment (in wstring name, in long controllerPort, in long device,[retval] out IMediumAttachment attachment)
| Returns a medium attachment which corresponds to the controller with the given name, on the given port and device slot.
void | getNetworkAdapter (in unsigned long slot,[retval] out INetworkAdapter adapter)
| Returns the network adapter associated with the given slot.
void | addStorageController (in wstring name, in StorageBus connectionType,[retval] out IStorageController controller)
| Adds a new storage controller (SCSI or SATA controller) to the machine and returns it as an instance of IStorageController.
void | getStorageControllerByName (in wstring name,[retval] out IStorageController storageController)
| Returns a storage controller with the given name.
void | getStorageControllerByInstance (in unsigned long instance,[retval] out IStorageController storageController)
| Returns a storage controller with the given instance number.
void | removeStorageController (in wstring name)
| Removes a storage controller from the machine.
void | getSerialPort (in unsigned long slot,[retval] out ISerialPort port)
| Returns the serial port associated with the given slot.
void | getParallelPort (in unsigned long slot,[retval] out IParallelPort port)
| Returns the parallel port associated with the given slot.
void | getExtraDataKeys ([retval] out wstring[] value)
| Returns an array representing the machine-specific extra data keys which currently have values defined.
void | getExtraData (in wstring key,[retval] out wstring value)
| Returns associated machine-specific extra data.
void | setExtraData (in wstring key, in wstring value)
| Sets associated machine-specific extra data.
void | getCpuProperty (in CpuPropertyType property,[retval] out boolean value)
| Returns the virtual CPU boolean value of the specified property.
void | setCpuProperty (in CpuPropertyType property, in boolean value)
| Sets the virtual CPU boolean value of the specified property.
void | getCpuIdLeaf (in unsigned long id, out unsigned long valEax, out unsigned long valEbx, out unsigned long valEcx, out unsigned long valEdx)
| Returns the virtual CPU cpuid information for the specified leaf.
void | setCpuIdLeaf (in unsigned long id, in unsigned long valEax, in unsigned long valEbx, in unsigned long valEcx, in unsigned long valEdx)
| Sets the virtual CPU cpuid information for the specified leaf.
void | removeCpuIdLeaf (in unsigned long id)
| Removes the virtual CPU cpuid leaf for the specified index.
void | removeAllCpuIdLeafs ()
| Removes all the virtual CPU cpuid leafs.
void | getHWVirtExProperty (in HWVirtExPropertyType property,[retval] out boolean value)
| Returns the value of the specified hardware virtualization boolean property.
void | setHWVirtExProperty (in HWVirtExPropertyType property, in boolean value)
| Sets a new value for the specified hardware virtualization boolean property.
void | saveSettings ()
| Saves any changes to machine settings made since the session has been opened or a new machine has been created, or since the last call to saveSettings or discardSettings.
void | discardSettings ()
| Discards any changes to the machine settings made since the session has been opened or since the last call to saveSettings or discardSettings.
void | deleteSettings ()
| Deletes the settings file of this machine from disk.
void | export (in IAppliance aAppliance,[retval] out IVirtualSystemDescription aDescription)
| Exports the machine to an OVF appliance.
void | getSnapshot (in wstringUUID id,[retval] out ISnapshot snapshot)
| Returns a snapshot of this machine with the given UUID.
void | findSnapshot (in wstring name,[retval] out ISnapshot snapshot)
| Returns a snapshot of this machine with the given name.
void | setCurrentSnapshot (in wstringUUID id)
| Sets the current snapshot of this machine.
void | createSharedFolder (in wstring name, in wstring hostPath, in boolean writable)
| Creates a new permanent shared folder by associating the given logical name with the given host path, adds it to the collection of shared folders and starts sharing it.
void | removeSharedFolder (in wstring name)
| Removes the permanent shared folder with the given name previously created by createSharedFolder from the collection of shared folders and stops sharing it.
void | canShowConsoleWindow ([retval] out boolean canShow)
| Returns `true` if the VM console process can activate the console window and bring it to foreground on the desktop of the host PC.
void | showConsoleWindow ([retval] out unsigned long long winId)
| Activates the console window and brings it to foreground on the desktop of the host PC.
void | getGuestProperty (in wstring name, out wstring value, out unsigned long long timestamp, out wstring flags)
| Reads an entry from the machine's guest property store.
void | getGuestPropertyValue (in wstring property,[retval] out wstring value)
| Reads a value from the machine's guest property store.
void | getGuestPropertyTimestamp (in wstring property,[retval] out unsigned long long value)
| Reads a property timestamp from the machine's guest property store.
void | setGuestProperty (in wstring property, in wstring value, in wstring flags)
| Sets, changes or deletes an entry in the machine's guest property store.
void | setGuestPropertyValue (in wstring property, in wstring value)
| Sets, changes or deletes a value in the machine's guest property store.
void | enumerateGuestProperties (in wstring patterns, out wstring[] name, out wstring[] value, out unsigned long long[] timestamp, out wstring[] flags)
| Return a list of the guest properties matching a set of patterns along with their values, time stamps and flags.
void | querySavedThumbnailSize (out unsigned long size, out unsigned long width, out unsigned long height)
| Returns size in bytes and dimensions in pixels of a saved thumbnail bitmap from saved state.
void | readSavedThumbnailToArray (in boolean BGR, out unsigned long width, out unsigned long height,[retval] out octet[] data)
| Thumbnail is retrieved to an array of bytes in uncompressed 32-bit BGRA or RGBA format.
void | querySavedScreenshotPNGSize (out unsigned long size, out unsigned long width, out unsigned long height)
| Returns size in bytes and dimensions of a saved PNG image of screenshot from saved state.
void | readSavedScreenshotPNGToArray (out unsigned long width, out unsigned long height,[retval] out octet[] data)
| Screenshot in PNG format is retrieved to an array of bytes.
## Public Attributes
readonly attribute IVirtualBox | parent
| Associated parent object.
readonly attribute boolean | accessible
| Whether this virtual machine is currently accessible or not.
readonly attribute IVirtualBoxErrorInfo | accessError
| Error information describing the reason of machine inaccessibility.
attribute wstring | name
| Name of the virtual machine.
attribute wstring | description
| Description of the virtual machine.
readonly attribute wstringUUID | id
| UUID of the virtual machine.
attribute wstring | OSTypeId
| User-defined identifier of the Guest OS type.
attribute wstring | HardwareVersion
| Hardware version identifier.
attribute wstringUUID | hardwareUUID
| The UUID presented to the guest via memory tables, hardware and guest properties.
attribute unsigned long | CPUCount
| Number of virtual CPUs in the VM.
attribute unsigned long | memorySize
| System memory size in megabytes.
attribute unsigned long | memoryBalloonSize
| Initial memory balloon size in megabytes.
attribute unsigned long | statisticsUpdateInterval
| Initial interval to update guest statistics in seconds.
attribute unsigned long | VRAMSize
| Video memory size in megabytes.
attribute boolean | accelerate3DEnabled
| This setting determines whether VirtualBox allows this machine to make use of the 3D graphics support available on the host.
attribute boolean | accelerate2DVideoEnabled
| This setting determines whether VirtualBox allows this machine to make use of the 2D video acceleration support available on the host.
attribute unsigned long | monitorCount
| Number of virtual monitors.
readonly attribute IBIOSSettings | BIOSSettings
| Object containing all BIOS settings.
attribute FirmwareType | firmwareType
| Type of firmware (such as legacy BIOS or EFI), used for initial bootstrap in this VM.
attribute wstring | snapshotFolder
| Full path to the directory used to store snapshot data (differencing media and saved state files) of this machine.
readonly attribute IVRDPServer | VRDPServer
| VRDP server object.
readonly attribute IMediumAttachment[] | mediumAttachments
| Array of media attached to this machine.
readonly attribute IUSBController | USBController
| Associated USB controller object.
readonly attribute IAudioAdapter | audioAdapter
| Associated audio adapter, always present.
readonly attribute IStorageController[] | storageControllers
| Array of storage controllers attached to this machine.
readonly attribute wstring | settingsFilePath
| Full name of the file containing machine settings data.
readonly attribute boolean | settingsModified
| Whether the settings of this machine have been modified (but neither yet saved nor discarded).
readonly attribute SessionState | sessionState
| Current session state for this machine.
readonly attribute wstring | sessionType
| Type of the session.
readonly attribute unsigned long | sessionPid
| Identifier of the session process.
readonly attribute MachineState | state
| Current execution state of this machine.
readonly attribute long long | lastStateChange
| Time stamp of the last execution state change, in milliseconds since 1970-01-01 UTC.
readonly attribute wstring | stateFilePath
| Full path to the file that stores the execution state of the machine when it is in the MachineState_Saved state.
readonly attribute wstring | logFolder
| Full path to the folder that stores a set of rotated log files recorded during machine execution.
readonly attribute ISnapshot | currentSnapshot
| Current snapshot of this machine.
readonly attribute unsigned long | snapshotCount
| Number of snapshots taken on this machine.
readonly attribute boolean | currentStateModified
| Returns `true` if the current state of the machine is not identical to the state stored in the current snapshot.
readonly attribute ISharedFolder[] | sharedFolders
| Collection of shared folders for this machine (permanent shared folders).
attribute ClipboardMode | clipboardMode
| Synchronization mode between the host OS clipboard and the guest OS clipboard.
attribute wstring | guestPropertyNotificationPatterns
| A comma-separated list of simple glob patterns.
attribute boolean | teleporterEnabled
| When set to true, the virtual machine becomes a target teleporter the next time it is powered on.
attribute unsigned long | teleporterPort
| The TCP port the target teleporter will listen for incoming teleportations on.
attribute wstring | teleporterAddress
| The address the target teleporter will listen on.
attribute wstring | teleporterPassword
| The password the to check for on the target teleporter.

## Detailed Description

The IMachine interface represents a virtual machine, or guest, created in VirtualBox.

This interface is used in two contexts. First of all, a collection of objects implementing this interface is stored in the IVirtualBox::machines attribute which lists all the virtual machines that are currently registered with this VirtualBox installation. Also, once a session has been opened for the given virtual machine (e.g. the virtual machine is running), the machine object associated with the open session can be queried from the session object; see ISession for details.

The main role of this interface is to expose the settings of the virtual machine and provide methods to change various aspects of the virtual machine's configuration. For machine objects stored in the IVirtualBox::machines collection, all attributes are read-only unless explicitly stated otherwise in individual attribute and method descriptions. In order to change a machine setting, a session for this machine must be opened using one of IVirtualBox::openSession, IVirtualBox::openRemoteSession or IVirtualBox::openExistingSession methods. After the session has been successfully opened, a mutable machine object needs to be queried from the session object and then the desired settings changes can be applied to the returned object using IMachine attributes and methods. See the ISession interface description for more information about sessions.

Note that IMachine does not provide methods to control virtual machine execution (such as start the machine, or power it down) -- these methods are grouped in a separate interface called IConsole.

See also:
  ISession, IConsole

Interface ID:
  `{99404F50-DD10-40D3-889B-DD2F79F1E95E}`

## Member Function Documentation

void IMachine::setBootOrder | ( | in unsigned long | position,
|  | in DeviceType | device |
| ) |  |  |

Puts the given device to the specified position in the boot order.

To indicate that no device is associated with the given position, DeviceType_Null should be used.

Todo:
  setHardDiskBootOrder(), setNetworkBootOrder()

Parameters:

  | position | Position in the boot order (`1` to the total number of devices the machine can boot from, as returned by ISystemProperties::maxBootPosition).
  | device | The type of the device used to boot at the given position.

Expected result codes:

  E_INVALIDARG | Boot position out of range.
  E_NOTIMPL | Booting from USB device currently not supported.

void IMachine::getBootOrder | ( | in unsigned long | position,
|  | [retval] out DeviceType | device |
| ) |  |  |

Returns the device type that occupies the specified position in the boot order.

Todo:
  [remove?] If the machine can have more than one device of the returned type (such as hard disks), then a separate method should be used to retrieve the individual device that occupies the given position.

If here are no devices at the given position, then DeviceType_Null is returned.

Todo:
  getHardDiskBootOrder(), getNetworkBootOrder()

Parameters:

  | position | Position in the boot order (`1` to the total number of devices the machine can boot from, as returned by ISystemProperties::maxBootPosition).
  | device | Device at the given position.

Expected result codes:

  E_INVALIDARG | Boot position out of range.

void IMachine::attachDevice | ( | in wstring | name,
|  | in long | controllerPort,
|  | in long | device,
|  | in DeviceType | type,
|  | in wstringUUID | id |
| ) |  |  |

Attaches a device and optionally mounts a medium to the given storage controller (IStorageController, identified by name), at the indicated port and device.

This method is intended for managing storage devices in general (it works for both fixed and removable media). For storage devices supporting removable media (such as DVDs and floppies), you can also use IMedium::mountMedium for changing the media while the machine is running.

For the IDE bus, the controllerPort parameter can be either `0` or `1`, to specify the primary or secondary IDE controller, respectively. For each of these, device can then be either `0` or `1`, to specify the master or the slave device, respectively. (In the default configuration of virtual machines, the secondary master is used for a CD/DVD drive.)

For an SATA controller, controllerPort must be a number ranging from `0` to `29`. For a SCSI controller, controllerPort must be a number ranging from `0` to `15`.

For both SCSI and SATA, the device parameter is unused and must be `0`.

For fixed media such as hard disks, the given medium identifier cannot be a zero UUID. It may be a zero UUID for removable media such as DVDs and floppies.

After calling this returns successfully, a new instance of IMediumAttachment will appear in the machine's list of medium attachments (IMachine::mediumAttachments).

The specified device slot must not have a device attached to it, or this method will fail.

See IMedium and IMediumAttachment for more information about attaching media.

Parameters:

  | name | Name of the storage controller to attach the device to.
  | controllerPort | Port to attach the device to.
  | device | Device slot in the given port to attach the device to.
  | type | Device type of the attached device.
  | id | UUID of the medium to mount. Zero UUID means do not mount any medium.

Expected result codes:

  E_INVALIDARG | SATA device, SATA port, IDE port or IDE slot out of range.
  VBOX_E_INVALID_OBJECT_STATE | Attempt to attach medium to an unregistered virtual machine.
  VBOX_E_INVALID_VM_STATE | Invalid machine state.
  VBOX_E_OBJECT_IN_USE | Hard disk already attached to this or another virtual machine.

Note:
  You cannot attach a device to a running machine. Also, you cannot attach a device to a newly created machine until this machine's settings are saved to disk using saveSettings.

  If the medium is being attached indirectly, a new differencing medium will implicitly be created for it and attached instead. If the changes made to the machine settings (including this indirect attachment) are later cancelled using discardSettings, this implicitly created differencing medium will implicitly be deleted.

void IMachine::detachDevice | ( | in wstring | name,
|  | in long | controllerPort,
|  | in long | device |
| ) |  |  |

Detaches the device attached to a device slot of the specified bus.

Detaching the device from the virtual machine is deferred. This means that the medium remains associated with the machine when this method returns and gets actually de-associated only after a successful saveSettings call. See IMedium for more detailed information about attaching media.

Parameters:

  | name | Name of the storage controller to detach the medium from.
  | controllerPort | Port number to detach the medium from.
  | device | Device slot number to detach the medium from.

Expected result codes:

  VBOX_E_INVALID_VM_STATE | Attempt to detach medium from a running virtual machine.
  VBOX_E_OBJECT_NOT_FOUND | No medium attached to given slot/bus.
  VBOX_E_NOT_SUPPORTED | Medium format does not support storage deletion.

Note:
  You cannot detach a device from a running machine.

  Detaching differencing media implicitly created by attachDevice for the indirect attachment using this method will not implicitly delete them. The IMedium::deleteStorage operation should be explicitly performed by the caller after the medium is successfully detached and the settings are saved with saveSettings, if it is the desired action.

void IMachine::passthroughDevice | ( | in wstring | name,
|  | in long | controllerPort,
|  | in long | device,
|  | in boolean | passthrough |
| ) |  |  |

Sets the passthrough mode of an existing DVD device.

Changing the setting while the VM is running is forbidden. The setting is only used if at VM start the device is configured as a host DVD drive, in all other cases it is ignored. The device must already exist; see IMachine::attachDevice for how to attach a new device.

The controllerPort and device parameters specify the device slot and have have the same meaning as with IMachine::attachDevice.

Parameters:

  | name | Name of the storage controller.
  | controllerPort | Storage controller port.
  | device | Device slot in the given port.
  | passthrough | New value for the passthrough setting.

Expected result codes:

  E_INVALIDARG | SATA device, SATA port, IDE port or IDE slot out of range.
  VBOX_E_INVALID_OBJECT_STATE | Attempt to modify an unregistered virtual machine.
  VBOX_E_INVALID_VM_STATE | Invalid machine state.

void IMachine::mountMedium | ( | in wstring | name,
|  | in long | controllerPort,
|  | in long | device,
|  | in wstringUUID | medium,
|  | in boolean | force |
| ) |  |  |

Mounts a medium (IMedium, identified by the given UUID id) to the given storage controller (IStorageController, identified by name), at the indicated port and device.

The device must already exist; see IMachine::attachDevice for how to attach a new device.

This method is intended only for managing removable media, where the device is fixed but media is changeable at runtime (such as DVDs and floppies). It cannot be used for fixed media such as hard disks.

The controllerPort and device parameters specify the device slot and have have the same meaning as with IMachine::attachDevice.

The specified device slot can have a medium mounted, which will be unmounted first. Specifying a zero UUID (or an empty string) for medium does just an unmount.

See IMedium for more detailed information about attaching media.

Parameters:

  | name | Name of the storage controller to attach the medium to.
  | controllerPort | Port to attach the medium to.
  | device | Device slot in the given port to attach the medium to.
  | medium | UUID of the medium to attach. A zero UUID means unmount the currently mounted medium.
  | force | Allows to force unmount/mount of a medium which is locked by theDevice slot in the given port to attach the medium to.

Expected result codes:

  E_INVALIDARG | SATA device, SATA port, IDE port or IDE slot out of range.
  VBOX_E_INVALID_OBJECT_STATE | Attempt to attach medium to an unregistered virtual machine.
  VBOX_E_INVALID_VM_STATE | Invalid machine state.
  VBOX_E_OBJECT_IN_USE | Medium already attached to this or another virtual machine.

void IMachine::getMedium | ( | in wstring | name,
|  | in long | controllerPort,
|  | in long | device,
|  | [retval] out IMedium | medium |
| ) |  |  |

Returns the virtual medium attached to a device slot of the specified bus.

Note that if the medium was indirectly attached by mountMedium to the given device slot then this method will return not the same object as passed to the mountMedium call. See IMedium for more detailed information about mounting a medium.

Parameters:

  | name | Name of the storage controller the medium is attached to.
  | controllerPort | Port to query.
  | device | Device slot in the given port to query.
  | medium | Attached medium object.

Expected result codes:

  VBOX_E_OBJECT_NOT_FOUND | No medium attached to given slot/bus.

void IMachine::getMediumAttachmentsOfController | ( | in wstring | name,
|  | [retval] out IMediumAttachment[] | mediumAttachments |
| ) |  |  |

Returns an array of medium attachments which are attached to the the controller with the given name.

Expected result codes:

  VBOX_E_OBJECT_NOT_FOUND | A storage controller with given name doesn't exist.

void IMachine::getMediumAttachment | ( | in wstring | name,
|  | in long | controllerPort,
|  | in long | device,
|  | [retval] out IMediumAttachment | attachment |
| ) |  |  |

Returns a medium attachment which corresponds to the controller with the given name, on the given port and device slot.

Expected result codes:

  VBOX_E_OBJECT_NOT_FOUND | No attachment exists for the given controller/port/device combination.

void IMachine::getNetworkAdapter | ( | in unsigned long | slot,
|  | [retval] out INetworkAdapter | adapter |
| ) |  |  |

Returns the network adapter associated with the given slot.

Slots are numbered sequentially, starting with zero. The total number of adapters per machine is defined by the ISystemProperties::networkAdapterCount property, so the maximum slot number is one less than that property's value.

Expected result codes:

  E_INVALIDARG | Invalid slot number.

void IMachine::addStorageController | ( | in wstring | name,
|  | in StorageBus | connectionType,
|  | [retval] out IStorageController | controller |
| ) |  |  |

Adds a new storage controller (SCSI or SATA controller) to the machine and returns it as an instance of IStorageController.

name identifies the controller for subsequent calls such as getStorageControllerByName, getStorageControllerByInstance, removeStorageController, attachDevice or mountMedium.

After the controller has been added, you can set its exact type by setting the IStorageController::controllerType.

Expected result codes:

  VBOX_E_OBJECT_IN_USE | A storage controller with given name exists already.
  E_INVALIDARG | Invalid controllerType.

void IMachine::getStorageControllerByName | ( | in wstring | name,
|  | [retval] out IStorageController | storageController |
| ) |  |  |

Returns a storage controller with the given name.

Expected result codes:

  VBOX_E_OBJECT_NOT_FOUND | A storage controller with given name doesn't exist.

void IMachine::getStorageControllerByInstance | ( | in unsigned long | instance,
|  | [retval] out IStorageController | storageController |
| ) |  |  |

Returns a storage controller with the given instance number.

Expected result codes:

  VBOX_E_OBJECT_NOT_FOUND | A storage controller with given instance number doesn't exist.

void IMachine::removeStorageController | ( | in wstring | name | ) |

Removes a storage controller from the machine.

Expected result codes:

  VBOX_E_OBJECT_NOT_FOUND | A storage controller with given name doesn't exist.

void IMachine::getSerialPort | ( | in unsigned long | slot,
|  | [retval] out ISerialPort | port |
| ) |  |  |

Returns the serial port associated with the given slot.

Slots are numbered sequentially, starting with zero. The total number of serial ports per machine is defined by the ISystemProperties::serialPortCount property, so the maximum slot number is one less than that property's value.

Expected result codes:

  E_INVALIDARG | Invalid slot number.

void IMachine::getParallelPort | ( | in unsigned long | slot,
|  | [retval] out IParallelPort | port |
| ) |  |  |

Returns the parallel port associated with the given slot.

Slots are numbered sequentially, starting with zero. The total number of parallel ports per machine is defined by the ISystemProperties::parallelPortCount property, so the maximum slot number is one less than that property's value.

Expected result codes:

  E_INVALIDARG | Invalid slot number.

void IMachine::getExtraDataKeys | ( | [retval] out wstring[] | value | ) |

Returns an array representing the machine-specific extra data keys which currently have values defined.

Parameters:

  | value | Array of extra data keys.

void IMachine::getExtraData | ( | in wstring | key,
|  | [retval] out wstring | value |
| ) |  |  |

Returns associated machine-specific extra data.

If the requested data key does not exist, this function will succeed and return an empty string in the value argument.

Parameters:

  | key | Name of the data key to get.
  | value | Value of the requested data key.

Expected result codes:

  VBOX_E_FILE_ERROR | Settings file not accessible.
  VBOX_E_XML_ERROR | Could not parse the settings file.

void IMachine::setExtraData | ( | in wstring | key,
|  | in wstring | value |
| ) |  |  |

Sets associated machine-specific extra data.

If you pass `null` or an empty string as a key value, the given key will be deleted.

Parameters:

  | key | Name of the data key to set.
  | value | Value to assign to the key.

Expected result codes:

  VBOX_E_FILE_ERROR | Settings file not accessible.
  VBOX_E_XML_ERROR | Could not parse the settings file.

Note:
  Before performing the actual data change, this method will ask all registered callbacks using the IVirtualBoxCallback::onExtraDataCanChange notification for a permission. If one of the callbacks refuses the new value, the change will not be performed.

  On success, the IVirtualBoxCallback::onExtraDataChange notification is called to inform all registered callbacks about a successful data change.

  This method can be called outside the machine session and therefore it's a caller's responsibility to handle possible race conditions when several clients change the same key at the same time.

void IMachine::getCpuProperty | ( | in CpuPropertyType | property,
|  | [retval] out boolean | value |
| ) |  |  |

Returns the virtual CPU boolean value of the specified property.

Parameters:

  | property | Property type to query.
  | value | Property value.

Expected result codes:

  E_INVALIDARG | Invalid property.

void IMachine::setCpuProperty | ( | in CpuPropertyType | property,
|  | in boolean | value |
| ) |  |  |

Sets the virtual CPU boolean value of the specified property.

Parameters:

  | property | Property type to query.
  | value | Property value.

Expected result codes:

  E_INVALIDARG | Invalid property.

void IMachine::getCpuIdLeaf | ( | in unsigned long | id,
|  | out unsigned long | valEax,
|  | out unsigned long | valEbx,
|  | out unsigned long | valEcx,
|  | out unsigned long | valEdx |
| ) |  |  |

Returns the virtual CPU cpuid information for the specified leaf.

Currently supported index values for cpuid: Standard CPUID leafs: 0 - 0xA Extended CPUID leafs: 0x80000000 - 0x8000000A

See the Intel and AMD programmer's manuals for detailed information about the cpuid instruction and its leafs.

Parameters:

  | id | Cpuid leaf index.
  | valEax | Cpuid leaf value for register eax.
  | valEbx | Cpuid leaf value for register ebx.
  | valEcx | Cpuid leaf value for register ecx.
  | valEdx | Cpuid leaf value for register edx.

Expected result codes:

  E_INVALIDARG | Invalid id.

void IMachine::setCpuIdLeaf | ( | in unsigned long | id,
|  | in unsigned long | valEax,
|  | in unsigned long | valEbx,
|  | in unsigned long | valEcx,
|  | in unsigned long | valEdx |
| ) |  |  |

Sets the virtual CPU cpuid information for the specified leaf.

Note that these values are not passed unmodified. VirtualBox clears features that it doesn't support.

Currently supported index values for cpuid: Standard CPUID leafs: 0 - 0xA Extended CPUID leafs: 0x80000000 - 0x8000000A

See the Intel and AMD programmer's manuals for detailed information about the cpuid instruction and its leafs.

Do not use this method unless you know exactly what you're doing. Misuse can lead to random crashes inside VMs.

Parameters:

  | id | Cpuid leaf index.
  | valEax | Cpuid leaf value for register eax.
  | valEbx | Cpuid leaf value for register ebx.
  | valEcx | Cpuid leaf value for register ecx.
  | valEdx | Cpuid leaf value for register edx.

Expected result codes:

  E_INVALIDARG | Invalid id.

void IMachine::removeCpuIdLeaf | ( | in unsigned long | id | ) |

Removes the virtual CPU cpuid leaf for the specified index.

Parameters:

  | id | Cpuid leaf index.

Expected result codes:

  E_INVALIDARG | Invalid id.

void IMachine::removeAllCpuIdLeafs | ( |  | ) |

Removes all the virtual CPU cpuid leafs.

void IMachine::getHWVirtExProperty | ( | in HWVirtExPropertyType | property,
|  | [retval] out boolean | value |
| ) |  |  |

Returns the value of the specified hardware virtualization boolean property.

Parameters:

  | property | Property type to query.
  | value | Property value.

Expected result codes:

  E_INVALIDARG | Invalid property.

void IMachine::setHWVirtExProperty | ( | in HWVirtExPropertyType | property,
|  | in boolean | value |
| ) |  |  |

Sets a new value for the specified hardware virtualization boolean property.

Parameters:

  | property | Property type to set.
  | value | New property value.

Expected result codes:

  E_INVALIDARG | Invalid property.

void IMachine::saveSettings | ( |  | ) |

Saves any changes to machine settings made since the session has been opened or a new machine has been created, or since the last call to saveSettings or discardSettings.

For registered machines, new settings become visible to all other VirtualBox clients after successful invocation of this method.

Expected result codes:

  VBOX_E_FILE_ERROR | Settings file not accessible.
  VBOX_E_XML_ERROR | Could not parse the settings file.
  E_ACCESSDENIED | Modification request refused.

Note:
  The method sends IVirtualBoxCallback::onMachineDataChange notification event after the configuration has been successfully saved (only for registered machines).

  Calling this method is only valid on instances returned by ISession::machine and on new machines created by IVirtualBox::createMachine but not yet registered, or on unregistered machines after calling IVirtualBox::unregisterMachine.

void IMachine::discardSettings | ( |  | ) |

Discards any changes to the machine settings made since the session has been opened or since the last call to saveSettings or discardSettings.

Expected result codes:

  VBOX_E_INVALID_VM_STATE | Virtual machine is not mutable.

Note:
  Calling this method is only valid on instances returned by ISession::machine and on new machines created by IVirtualBox::createMachine or opened by IVirtualBox::openMachine but not yet registered, or on unregistered machines after calling IVirtualBox::unregisterMachine.

void IMachine::deleteSettings | ( |  | ) |

Deletes the settings file of this machine from disk.

The machine must not be registered in order for this operation to succeed.

Expected result codes:

  VBOX_E_INVALID_VM_STATE | Cannot delete settings of a registered machine or machine not mutable.
  VBOX_E_IPRT_ERROR | Could not delete the settings file.

Note:
  settingsModified will return `true` after this method successfully returns.

  Calling this method is only valid on instances returned by ISession::machine and on new machines created by IVirtualBox::createMachine or opened by IVirtualBox::openMachine but not yet registered, or on unregistered machines after calling IVirtualBox::unregisterMachine.

  The deleted machine settings file can be restored (saved again) by calling saveSettings.

void IMachine::export | ( | in IAppliance | aAppliance,
|  | [retval] out IVirtualSystemDescription | aDescription |
| ) |  |  |

Exports the machine to an OVF appliance.

See IAppliance for the steps required to export VirtualBox machines to OVF.

Parameters:

  | aAppliance | Appliance to export this machine to.
  | aDescription | VirtualSystemDescription object which is created for this machine.

void IMachine::getSnapshot | ( | in wstringUUID | id,
|  | [retval] out ISnapshot | snapshot |
| ) |  |  |

Returns a snapshot of this machine with the given UUID.

A `null` UUID can be used to obtain the first snapshot taken on this machine. This is useful if you want to traverse the whole tree of snapshots starting from the root.

Parameters:

  | id | UUID of the snapshot to get
  | snapshot | Snapshot object with the given UUID.

Expected result codes:

  VBOX_E_OBJECT_NOT_FOUND | Virtual machine has no snapshots or snapshot not found.

void IMachine::findSnapshot | ( | in wstring | name,
|  | [retval] out ISnapshot | snapshot |
| ) |  |  |

Returns a snapshot of this machine with the given name.

Parameters:

  | name | Name of the snapshot to find
  | snapshot | Snapshot object with the given name.

Expected result codes:

  VBOX_E_OBJECT_NOT_FOUND | Virtual machine has no snapshots or snapshot not found.

void IMachine::setCurrentSnapshot | ( | in wstringUUID | id | ) |

Sets the current snapshot of this machine.

Parameters:

  | id | UUID of the snapshot to set as the current snapshot.

Note:
  In the current implementation, this operation is not implemented.

void IMachine::createSharedFolder | ( | in wstring | name,
|  | in wstring | hostPath,
|  | in boolean | writable |
| ) |  |  |

Creates a new permanent shared folder by associating the given logical name with the given host path, adds it to the collection of shared folders and starts sharing it.

Refer to the description of ISharedFolder to read more about logical names.

Parameters:

  | name | Unique logical name of the shared folder.
  | hostPath | Full path to the shared folder in the host file system.
  | writable | Whether the share is writable or readonly

Expected result codes:

  VBOX_E_OBJECT_IN_USE | Shared folder already exists.
  VBOX_E_FILE_ERROR | Shared folder hostPath not accessible.

void IMachine::removeSharedFolder | ( | in wstring | name | ) |

Removes the permanent shared folder with the given name previously created by createSharedFolder from the collection of shared folders and stops sharing it.

Parameters:

  | name | Logical name of the shared folder to remove.

Expected result codes:

  VBOX_E_INVALID_VM_STATE | Virtual machine is not mutable.
  VBOX_E_OBJECT_NOT_FOUND | Shared folder name does not exist.

void IMachine::canShowConsoleWindow | ( | [retval] out boolean | canShow | ) |

Returns `true` if the VM console process can activate the console window and bring it to foreground on the desktop of the host PC.

Parameters:

  | canShow | `true` if the console window can be shown and `false` otherwise.

Expected result codes:

  VBOX_E_INVALID_VM_STATE | Machine session is not open.

Note:
  This method will fail if a session for this machine is not currently open.

void IMachine::showConsoleWindow | ( | [retval] out unsigned long long | winId | ) |

Activates the console window and brings it to foreground on the desktop of the host PC.

Many modern window managers on many platforms implement some sort of focus stealing prevention logic, so that it may be impossible to activate a window without the help of the currently active application. In this case, this method will return a non-zero identifier that represents the top-level window of the VM console process. The caller, if it represents a currently active process, is responsible to use this identifier (in a platform-dependent manner) to perform actual window activation.

Parameters:

  | winId | Platform-dependent identifier of the top-level VM console window, or zero if this method has performed all actions necessary to implement the show window semantics for the given platform and/or VirtualBox front-end.

Expected result codes:

  VBOX_E_INVALID_VM_STATE | Machine session is not open.

Note:
  This method will fail if a session for this machine is not currently open.

void IMachine::getGuestProperty | ( | in wstring | name,
|  | out wstring | value,
|  | out unsigned long long | timestamp,
|  | out wstring | flags |
| ) |  |  |

Reads an entry from the machine's guest property store.

Parameters:

  | name | The name of the property to read.
  | value | The value of the property. If the property does not exist then this will be empty.
  | timestamp | The time at which the property was last modified, as seen by the server process.
  | flags | Additional property parameters, passed as a comma-separated list of "name=value" type entries.

Expected result codes:

  VBOX_E_INVALID_VM_STATE | Machine session is not open.

void IMachine::getGuestPropertyValue | ( | in wstring | property,
|  | [retval] out wstring | value |
| ) |  |  |

Reads a value from the machine's guest property store.

Parameters:

  | property | The name of the property to read.
  | value | The value of the property. If the property does not exist then this will be empty.

Expected result codes:

  VBOX_E_INVALID_VM_STATE | Machine session is not open.

void IMachine::getGuestPropertyTimestamp | ( | in wstring | property,
|  | [retval] out unsigned long long | value |
| ) |  |  |

Reads a property timestamp from the machine's guest property store.

Parameters:

  | property | The name of the property to read.
  | value | The timestamp. If the property does not exist then this will be empty.

Expected result codes:

  VBOX_E_INVALID_VM_STATE | Machine session is not open.

void IMachine::setGuestProperty | ( | in wstring | property,
|  | in wstring | value,
|  | in wstring | flags |
| ) |  |  |

Sets, changes or deletes an entry in the machine's guest property store.

Parameters:

  | property | The name of the property to set, change or delete.
  | value | The new value of the property to set, change or delete. If the property does not yet exist and value is non-empty, it will be created. If the value is `null` or empty, the property will be deleted if it exists.
  | flags | Additional property parameters, passed as a comma-separated list of "name=value" type entries.

Expected result codes:

  E_ACCESSDENIED | Property cannot be changed.
  E_INVALIDARG | Invalid flags.
  VBOX_E_INVALID_VM_STATE | Virtual machine is not mutable or session not open.
  VBOX_E_INVALID_OBJECT_STATE | Cannot set transient property when machine not running.

void IMachine::setGuestPropertyValue | ( | in wstring | property,
|  | in wstring | value |
| ) |  |  |

Sets, changes or deletes a value in the machine's guest property store.

The flags field will be left unchanged or created empty for a new property.

Parameters:

  | property | The name of the property to set, change or delete.
  | value | The new value of the property to set, change or delete. If the property does not yet exist and value is non-empty, it will be created. If the value is `null` or empty, the property will be deleted if it exists.

Expected result codes:

  E_ACCESSDENIED | Property cannot be changed.
  VBOX_E_INVALID_VM_STATE | Virtual machine is not mutable or session not open.
  VBOX_E_INVALID_OBJECT_STATE | Cannot set transient property when machine not running.

void IMachine::enumerateGuestProperties | ( | in wstring | patterns,
|  | out wstring[] | name,
|  | out wstring[] | value,
|  | out unsigned long long[] | timestamp,
|  | out wstring[] | flags |
| ) |  |  |

Return a list of the guest properties matching a set of patterns along with their values, time stamps and flags.

Parameters:

  | patterns | The patterns to match the properties against, separated by '|' characters. If this is empty or `null`, all properties will match.
  | name | The names of the properties returned.
  | value | The values of the properties returned. The array entries match the corresponding entries in the name array.
  | timestamp | The time stamps of the properties returned. The array entries match the corresponding entries in the name array.
  | flags | The flags of the properties returned. The array entries match the corresponding entries in the name array.

void IMachine::querySavedThumbnailSize | ( | out unsigned long | size,
|  | out unsigned long | width,
|  | out unsigned long | height |
| ) |  |  |

Returns size in bytes and dimensions in pixels of a saved thumbnail bitmap from saved state.

Parameters:

  | size | Size of buffer required to store the bitmap.
  | width | Bitmap width.
  | height | Bitmap height.

void IMachine::readSavedThumbnailToArray | ( | in boolean | BGR,
|  | out unsigned long | width,
|  | out unsigned long | height,
|  | [retval] out octet[] | data |
| ) |  |  |

Thumbnail is retrieved to an array of bytes in uncompressed 32-bit BGRA or RGBA format.

Parameters:

  | BGR | How to order bytes in the pixel. A pixel consists of 4 bytes. If this parameter is true, then bytes order is: B, G, R, 0xFF. If this parameter is false, then bytes order is: R, G, B, 0xFF.
  | width | Bitmap width.
  | height | Bitmap height.
  | data | Array with resulting bitmap data.

void IMachine::querySavedScreenshotPNGSize | ( | out unsigned long | size,
|  | out unsigned long | width,
|  | out unsigned long | height |
| ) |  |  |

Returns size in bytes and dimensions of a saved PNG image of screenshot from saved state.

Parameters:

  | size | Size of buffer required to store the PNG binary data.
  | width | Image width.
  | height | Image height.

void IMachine::readSavedScreenshotPNGToArray | ( | out unsigned long | width,
|  | out unsigned long | height,
|  | [retval] out octet[] | data |
| ) |  |  |

Screenshot in PNG format is retrieved to an array of bytes.

Parameters:

  | width | Image width.
  | height | Image height.
  | data | Array with resulting PNG data.

## Member Data Documentation

readonly attribute IVirtualBox IMachine::parent

Associated parent object.

readonly attribute boolean IMachine::accessible

Whether this virtual machine is currently accessible or not.

A machine is always deemed accessible unless it is registered and its settings file cannot be read or parsed (either because the file itself is unavailable or has invalid XML contents).

Every time this property is read, the accessibility state of this machine is re-evaluated. If the returned value is `false`, the accessError property may be used to get the detailed error information describing the reason of inaccessibility, including XML error messages.

When the machine is inaccessible, only the following properties can be used on it:

- parent
- id
- settingsFilePath
- accessible
- accessError

An attempt to access any other property or method will return an error.

The only possible action you can perform on an inaccessible machine is to unregister it using the IVirtualBox::unregisterMachine call (or, to check for the accessibility state once more by querying this property).

Note:
  In the current implementation, once this property returns `true`, the machine will never become inaccessible later, even if its settings file cannot be successfully read/written any more (at least, until the VirtualBox server is restarted). This limitation may be removed in future releases.

readonly attribute IVirtualBoxErrorInfo IMachine::accessError

Error information describing the reason of machine inaccessibility.

Reading this property is only valid after the last call to accessible returned `false` (i.e. the machine is currently unaccessible). Otherwise, a `null` IVirtualBoxErrorInfo object will be returned.

attribute wstring IMachine::name

Name of the virtual machine.

Besides being used for human-readable identification purposes everywhere in VirtualBox, the virtual machine name is also used as a name of the machine's settings file and as a name of the subdirectory this settings file resides in. Thus, every time you change the value of this property, the settings file will be renamed once you call saveSettings to confirm the change. The containing subdirectory will be also renamed, but only if it has exactly the same name as the settings file itself prior to changing this property (for backward compatibility with previous API releases). The above implies the following limitations:

- The machine name cannot be empty.
- The machine name can contain only characters that are valid file name characters according to the rules of the file system used to store VirtualBox configuration.
- You cannot have two or more machines with the same name if they use the same subdirectory for storing the machine settings files.
- You cannot change the name of the machine if it is running, or if any file in the directory containing the settings file is being used by another running machine or by any other process in the host operating system at a time when saveSettings is called.

If any of the above limitations are hit, saveSettings will return an appropriate error message explaining the exact reason and the changes you made to this machine will not be saved.

Note:
  For "legacy" machines created using the IVirtualBox::createLegacyMachine call, the above naming limitations do not apply because the machine name does not affect the settings file name. The settings file name remains the same as it was specified during machine creation and never changes.

attribute wstring IMachine::description

Description of the virtual machine.

The description attribute can contain any text and is typically used to describe the hardware and software configuration of the virtual machine in detail (i.e. network settings, versions of the installed software and so on).

readonly attribute wstringUUID IMachine::id

UUID of the virtual machine.

attribute wstring IMachine::OSTypeId

User-defined identifier of the Guest OS type.

You may use IVirtualBox::getGuestOSType to obtain an IGuestOSType object representing details about the given Guest OS type.

Note:
  This value may differ from the value returned by IGuest::OSTypeId if Guest Additions are installed to the guest OS.

attribute wstring IMachine::HardwareVersion

Hardware version identifier.

Internal use only for now.

attribute wstringUUID IMachine::hardwareUUID

The UUID presented to the guest via memory tables, hardware and guest properties.

For most VMs this is the same as the id, but for VMs which have been cloned or teleported it may be the same as the source VM. This latter is because the guest shouldn't notice that it was cloned or teleported.

attribute unsigned long IMachine::CPUCount

Number of virtual CPUs in the VM.

attribute unsigned long IMachine::memorySize

System memory size in megabytes.

attribute unsigned long IMachine::memoryBalloonSize

Initial memory balloon size in megabytes.

attribute unsigned long IMachine::statisticsUpdateInterval

Initial interval to update guest statistics in seconds.

attribute unsigned long IMachine::VRAMSize

Video memory size in megabytes.

attribute boolean IMachine::accelerate3DEnabled

This setting determines whether VirtualBox allows this machine to make use of the 3D graphics support available on the host.

attribute boolean IMachine::accelerate2DVideoEnabled

This setting determines whether VirtualBox allows this machine to make use of the 2D video acceleration support available on the host.

attribute unsigned long IMachine::monitorCount

Number of virtual monitors.

Note:
  Only effective on Windows XP and later guests with Guest Additions installed.

readonly attribute IBIOSSettings IMachine::BIOSSettings

Object containing all BIOS settings.

attribute FirmwareType IMachine::firmwareType

Type of firmware (such as legacy BIOS or EFI), used for initial bootstrap in this VM.

attribute wstring IMachine::snapshotFolder

Full path to the directory used to store snapshot data (differencing media and saved state files) of this machine.

The initial value of this property is `<`path_to_settings_file`>/<`machine_uuid`>`.

Currently, it is an error to try to change this property on a machine that has snapshots (because this would require to move possibly large files to a different location). A separate method will be available for this purpose later.

Note:
  Setting this property to `null` or to an empty string will restore the initial value.

  When setting this property, the specified path can be absolute (full path) or relative to the directory where the machine settings file is located. When reading this property, a full path is always returned.

  The specified path may not exist, it will be created when necessary.

readonly attribute IVRDPServer IMachine::VRDPServer

VRDP server object.

readonly attribute IMediumAttachment [] IMachine::mediumAttachments

Array of media attached to this machine.

readonly attribute IUSBController IMachine::USBController

Associated USB controller object.

Note:
  If USB functionality is not available in the given edition of VirtualBox, this method will set the result code to `E_NOTIMPL`.

readonly attribute IAudioAdapter IMachine::audioAdapter

Associated audio adapter, always present.

readonly attribute IStorageController [] IMachine::storageControllers

Array of storage controllers attached to this machine.

readonly attribute wstring IMachine::settingsFilePath

Full name of the file containing machine settings data.

readonly attribute boolean IMachine::settingsModified

Whether the settings of this machine have been modified (but neither yet saved nor discarded).

Note:
  Reading this property is only valid on instances returned by ISession::machine and on new machines created by IVirtualBox::createMachine or opened by IVirtualBox::openMachine but not yet registered, or on unregistered machines after calling IVirtualBox::unregisterMachine. For all other cases, the settings can never be modified.

  For newly created unregistered machines, the value of this property is always `true` until saveSettings is called (no matter if any machine settings have been changed after the creation or not). For opened machines the value is set to `false` (and then follows to normal rules).

readonly attribute SessionState IMachine::sessionState

Current session state for this machine.

readonly attribute wstring IMachine::sessionType

Type of the session.

If sessionState is SessionSpawning or SessionOpen, this attribute contains the same value as passed to the IVirtualBox::openRemoteSession method in the type parameter. If the session was opened directly using IVirtualBox::openSession, or if sessionState is SessionClosed, the value of this attribute is an empty string.

readonly attribute unsigned long IMachine::sessionPid

Identifier of the session process.

This attribute contains the platform-dependent identifier of the process that has opened a direct session for this machine using the IVirtualBox::openSession call. The returned value is only valid if sessionState is SessionOpen or SessionClosing (i.e. a session is currently open or being closed) by the time this property is read.

readonly attribute MachineState IMachine::state

Current execution state of this machine.

readonly attribute long long IMachine::lastStateChange

Time stamp of the last execution state change, in milliseconds since 1970-01-01 UTC.

readonly attribute wstring IMachine::stateFilePath

Full path to the file that stores the execution state of the machine when it is in the MachineState_Saved state.

Note:
  When the machine is not in the Saved state, this attribute is an empty string.

readonly attribute wstring IMachine::logFolder

Full path to the folder that stores a set of rotated log files recorded during machine execution.

The most recent log file is named `VBox.log`, the previous log file is named `VBox.log.1` and so on (up to `VBox.log.3` in the current version).

readonly attribute ISnapshot IMachine::currentSnapshot

Current snapshot of this machine.

This is `null` if the machine currently has no snapshots. If it is not `null`, then it was set by one of Console::takeSnapshot, Console::deleteSnapshot or Console::restoreSnapshot, depending on which was called last. See ISnapshot for details.

readonly attribute unsigned long IMachine::snapshotCount

Number of snapshots taken on this machine.

Zero means the machine doesn't have any snapshots.

readonly attribute boolean IMachine::currentStateModified

Returns `true` if the current state of the machine is not identical to the state stored in the current snapshot.

The current state is identical to the current snapshot only directly after one of the following calls are made:

- IConsole::restoreSnapshot
- IConsole::takeSnapshot (issued on a "powered off" or "saved" machine, for which settingsModified returns `false`)
- IMachine::setCurrentSnapshot

The current state remains identical until one of the following happens:

- settings of the machine are changed
- the saved state is discarded
- the current snapshot is discarded
- an attempt to execute the machine is made

Note:
  For machines that don't have snapshots, this property is always `false`.

readonly attribute ISharedFolder [] IMachine::sharedFolders

Collection of shared folders for this machine (permanent shared folders).

These folders are shared automatically at machine startup and available only to the guest OS installed within this machine.

New shared folders are added to the collection using createSharedFolder. Existing shared folders can be removed using removeSharedFolder.

attribute ClipboardMode IMachine::clipboardMode

Synchronization mode between the host OS clipboard and the guest OS clipboard.

attribute wstring IMachine::guestPropertyNotificationPatterns

A comma-separated list of simple glob patterns.

Changes to guest properties whose name matches one of the patterns will generate an IVirtualBoxCallback::onGuestPropertyChange signal.

attribute boolean IMachine::teleporterEnabled

When set to true, the virtual machine becomes a target teleporter the next time it is powered on.

This can only set to true when the VM is in the PoweredOff or Aborted state.

attribute unsigned long IMachine::teleporterPort

The TCP port the target teleporter will listen for incoming teleportations on.

0 means the port is automatically selected upon power on. The actual value can be read from this property while the machine is waiting for incoming teleportations.

attribute wstring IMachine::teleporterAddress

The address the target teleporter will listen on.

If set to an empty string, it will listen on all addresses.

attribute wstring IMachine::teleporterPassword

The password the to check for on the target teleporter.

This is just a very basic measure to prevent simple hacks and operators accidentally beaming a virtual machine to the wrong place.