Previous page

Next page

Locate page in Contents

Print this page

Deleting a Device

You can delete a virtual device that you do not need any more in your virtual machine using the --device-del option of the pctl set command. The options responsible for removing particular devices are listed in the following table:

Option Name

Description

hdd

Deletes the specified hard disk drive from the virtual machine.

cdrom

Deletes the specified CD/DVD-ROM drive from the virtual machine.

net

Deletes the specified network adapter from the virtual machine.

fdd

Deletes the floppy disk drive from the virtual machine.

serial

Deletes the specified serial port from the virtual machine.

parallel

Deletes the specified parallel port from the virtual machine.

sound

Deletes the sound device from the virtual machine.

usb

Deletes the USB controller from the virtual machine.

As a rule deleting a virtual device involves performing two operations:

  1. Finding out the name of the device to be deleted.
  2. Deleting the device from the virtual machine.

Finding Out the Device Name

To remove a virtual device, you need to specify its name when running the pctl set command. If you do not know the device name, you can use the pctl list command to learn it. For example, to obtain the list of virtual devices in the MyVM virtual machine, run this command:

# pctl list --info MyVM

...

Hardware:

cpu 2 VT-x accl=high mode=32

memory 256Mb

video 46Mb

fdd0 (+) real='/dev/fd0' state=disconnected

hdd0 (+) ide:0 image='/var/parallels/MyVM.pvm/harddisk.hdd' 27Mb

hdd1 (+) scsi:0 image='/var/parallels/MyVM.pvm/harddisk1.hdd' 32768Mb

cdrom0 (+) ide:1 real='Default CD/DVD-ROM'

parallel0 (+) real='/dev/lp0'

usb (+)

net0 (+) type=bridged iface='eth1' mac=001C4201CED0

...

All virtual devices currently available to the virtual machine are listed under Hardware . In our case the MyVM virtual machine has the following devices: 2 CPUs, main memory, video memory, a floppy disk drive, 2 hard disk drives, a CD/DVD-ROM drive, a parallel port, a USB controller, and a network card.

Deleting a Virtual Device

Once you know the virtual device name, you can remove it from your virtual machine. For example, you can execute the following command to remove the virtual disk hdd1 from the MyVM virtual machine:

# pctl set MyVM --device-del hdd1

Remove the hdd1 device.

The VM has been successfully configured.

When deleting virtual machine devices, keep in mind the following:

  • If you do not want to permanently delete a virtual device, you can temporarily disconnect if from the virtual machine using the --disable option.
  • Detailed information on all options that can be used with pctl set when deleting a device is given in the Parallels Command Line Reference Guide .