Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Note: Adding virtual optical drives is not supported in macOS virtual machines.
--device-add cdrom [--image <name>] [--iface <ide | scsi | sata>] [--position <n>]
[--subtype <buslogic | lsi-spi | lsi-sas>]
--device-set <drive_name> [--image <name>] [--iface <ide | scsi | sata>]
[--position <n>] [--subtype <buslogic | lsi-spi | lsi-sas>]
drive_name: The name of the optical drive to modify (--device-set command only). To obtain the list of the available drives, use the prlctl list --info
command.
--image: connect the specified image file to the virtual machine. The following image file formats are supported: iso, cue, ccd, dmg.
--iface: virtual optical interface type: ide, scsi, sata.
--position: the SCSI / IDE / SATA device identifier to be used for the optical drive. Allowed ranges:
0-3 for IDE disk drives
0-6 for SCSI disk drives
0-5 for SATA disk drives
--subtype: virtual optical drive subtype: buslogic, lsi-spi, lsi-sas.
The options described here are common for all types of devices.
--device-connect <device_name>
Connects the specified device to a running virtual machine. The device can be of type fdd, cdrom, sound, or net. To obtain a device name, use the prlctl list -i command.
--device-disconnect <device_name>
Disconnects the specified device from a running virtual machine.
--device-set <device_name> <<--enable | --disable> | <--connect | --disconnect>>
Enables/disables or connects/disconnects the specified device to/from a virtual machine. Please note that the --device-set command is also used to modify a device configuration and has additional parameters, which are different for different types of devices. The parameters for each device type are described in subsequent sections of this guide.
--device-del <device_name> [--detach-only | --destroy-image | --destroy-image-force]
Removes the specified device from the virtual machine.
If --detach-only is specified and the device is a virtual hard disk drive, the disk image is preserved.
If --destroy-image is specified, the virtual HDD image is removed from the server.
If --destroy-image-force is specified, the virtual HDD image is removed from all snapshots and from the server.
The default action on deleting a virtual HDD is to detach the HDD image as if --detach-only was specified.
The following options can be used with the prlctl set command to manage devices:
--device-add — add a new device.
--device-set — modify an existing device.
--device-del — delete (remove) a device.
--device-connect — connect a device.
--device-disconnect — disconnect a device.
Only one option can be specified in a single command.
The general syntax for adding a device is as follows:
prlctl set <vm_id | vm_name> --device-add <hdd | cdrom | net | fdd | serial | parallel | sound | usb> [device_options]
To modify a device:
prlctl set <vm_id | vm_name> --device-set <device_name> [device_options]
The subsequent sections describe options and parameters for each device type.
--device-add cdrom --device <name> [--iface <ide | scsi | sata>] [--passthr <yes | no>]
[--position <n>] [--subtype <buslogic | lsi-spi | lsi-sas>]
--device: the name of the host computer's optical drive that will be connected to the virtual machine. To obtain the names of all optical drives installed on the host, use the prlsrvctl info command.
--iface: virtual optical drive interface type.
--passthr: enables the passthrough mode for the specified device.
--position: the SCSI / IDE / SATA device identifier to be used for the drive. Allowed ranges:
0-3 for IDE disk drives
0-6 for SCSI disk drives
0-5 for SATA disk drives
--subtype: virtual optical drive subtype.
Note: Adding virtual floppy drives is not supported in macOS virtual machines.
The command adds a virtual floppy disk drive based on a file image.
--device-add fdd --image <image> [--recreate]
--device-set <fdd_name> --image <image> [--recreate]
fdd_name: The name of the FDD to modify. To obtain the list of the available drives, use the prlctl list --info
command.
--image: specifies the image file.
--recreate: if included, recreates the image file if it exists.
Note: Adding a Serial port is not supported in macOS virtual machines.
--device-add serial {--device <name>|--output <file>|--socket <name>
[--socket-mode <server|client>]}
Modify a serial port
--device-set <port_name> {--device <name>|--output <file>|--socket <name>
[--socket-mode <server|client>]}
port_name: the name of the port to modify (--device-set command only). To obtain the list of the available ports, use the prlctl list --info command.
--device: the number of the host computer serial port that will be used by the virtual machine.
--output: the path to the file where the output of the virtual serial port will be sent.
--socket: the name of the host computer socket to which the serial port will be connected.
--socket-mode: the socket operation mode.
--device-add net --type <shared | bridged | host-only> [--iface <name>] [--mac <addr | auto>]
[--ipadd <addr [/mask]> | --ipdel <addr[/mask]> | --dhcp <yes | no> | --dhcp6 <yes | no>]
[--gw <gw>] [--gw6 <gw>] [--nameserver <addr>] [--searchdomain <addr>]
[--configure <yes | no>] [--apply-iponly <yes | no>]
[--adapter-type <virtio | e1000 | e1000e | rtl>]
--device-set <adapter_name> --type <shared | bridged | host-only> [--iface <name>]
[--mac <addr | auto>]
[--ipadd <addr [/mask]> | --ipdel <addr[/mask]> | --dhcp <yes | no> | --dhcp6 <yes | no>]
[--gw <gw>] [--gw6 <gw>] [--nameserver <addr>] [--searchdomain <addr>]
[--configure <yes | no>] [--apply-iponly <yes | no>]
[--adapter-type <virtio | e1000 | e1000e | rtl>]
adapter_name: the name of the virtual network adapter to modify (--device-set command only). To obtain the list of the available adapters, use the prlctl list --info command.
--type: the type of the network adapter to create in the virtual machine.
--iface: the host network interface to be assigned to the bridged or host-only virtual network adapter.
--mac: the MAC address to be assigned to the virtual network adapter. If omitted, the MAC address will be automatically generated.
--ipadd: the IP address to be assigned to the network adapter in the virtual machine.
--ipdel: the IP address to be removed from the network adapter in the virtual machine.
--dhcp: specifies whether the virtual network adapter should get its IP settings through a DHCP server.
--dhcp6: specifies whether the virtual network adapter should get its IPv6 settings through a DHCP server.
--gw: the default gateway to be used by the virtual machine.
--gw6: the default IPv6 gateway to be used by the virtual machine.
--nameserver: the default DNS server to be used by the virtual machine.
--searchdomain: the default search domain to be used by the virtual machine.
--configure: if set to yes, the settings above are applied to the virtual network adapter instead of its original settings. Configuring any of the settings automatically sets this option to yes.
--apply-iponly: if set to yes, the hostname, nameserver, and search domain settings from the virtual machine configuration file are ignored.
--adapter-type: specifies the network adapter emulation type.
--device-add parallel {--device <name> | --output <file>}
Modify a parallel port
--device-set <port_name> {--device <name> | --output <file>}
port_name: the name of the port to modify (--device-set command only). To obtain the list of the available ports, use the prlctl list --info command.
--device: the parallel port number on the host computer that will be used by the virtual machine.
--output: the path to the file where the output of the virtual parallel port will be sent.
This command adds USB support to a virtual machine, making the USB & Bluetooth configuration options available.
--device-add usb
Note: Adding a sound card is not supported in macOS virtual machines.
--device-add sound --output <name> --input <name>
--ouput: the name of a physical output device to which to connect the virtual sound card.
--input: the name of the physical input device to which to connect the virtual sound card.
--device-add hdd [--image <image_name>] [--type <expand | plain>] [--size <n>] [--split]
[--iface <ide | scsi | sata>] [--position <n>]
[--subtype <buslogic | lsi-spi | lsi-sas>]
[--online-compact <on | off>]
--device-set <hdd_name> [--image <image_name>] [--type <expand | plain>]
[--size <n>] [--split] [--iface <ide | scsi | sata>] [--position <n>]
[--subtype <buslogic | lsi-spi | lsi-sas>] [--online-compact <on | off>]
hdd_name: The name of the virtual hard drive to modify (--device-set command only). Virtual hard drives are named using the hddN format, where N is the drive index number starting from 0 (e.g., hdd0, hdd1). To obtain the list of disk names, use the prlctl list --info
command.
--image: specifies the name of the file to be used for emulating the VM virtual disk drive. If this option is omitted, a new file is created inside the directory storing all VM-related configuration files and assigned the name of harddiskN.hdd
.
--type: specifies the type of the virtual disk from one of the following:
expand (default): virtual disks of this type are small initially and grow in size as you add data to it.
plain: virtual disks of this type have a fixed size from the moment of their creation.
--size: hard disk size, in megabytes.
--split: splits the hard disk into 2GB pieces.
--iface: virtual hard disk interface type: ide, scsi, or sata.
--position: the SCSI / IDE / SATA device identifier to be used for the disk drive. Allowed ranges:
0-3 for IDE disk drives
0-6 for SCSI disk drives
0-5 for SATA disk drives
--subtype: virtual hard disk subtype: buslogic, lsi-spi, lsi-sas.
--online-compact: enables or disables virtual hard disk online compact mode.
--device-add hdd --device <real_name> [--iface <ide | scsi | sata>] [--passthr <yes | no>]
[--position <n>] [--subtype <buslogic | lsi-spi | lsi-sas>]
--device: the name of the host computer hard drive that will be connected to the virtual machine. To obtain the names of all hard disks installed on the host, use the prlsrvctl info command.
--iface: virtual hard disk interface type: ide, scsi, sata.
--passthr: enables the passthrough mode for the specified device.
--position: the SCSI / IDE / SATA device identifier to be used for the drive. Allowed ranges:
0-3 for IDE disk drives
0-6 for SCSI disk drives
0-5 for SATA disk drives
--subtype: virtual hard disk subtype: buslogic, lsi-spi, lsi-sas.