detach-device
Detaches a device from a defined virtual server.
Syntax
- <VS>
- Is the name, the ID, or the UUID of the virtual server.
- <XML-filename>
- Is the name of the XML file, which defines the device to be detached from the running virtual server.
Selected options
- --config
- Persistently detaches the device with the next restart.
- --current
- Depending on the virtual server state:
- running, paused
- Immediately detaches the device from the virtual server.
If the device was attached persistently, it will be reattached with the next restart.
- shut off
- Persistently detaches the device from the virtual server with the next restart.
- --domain
- Specifies the virtual server.
- --file
- Specifies the device configuration-XML file.
- --live
- Detaches the device from the running virtual server.
- --persistent
- Depending on the virtual server state:
- running, paused
- Immediately detaches the device from the virtual server.
The device remains persistently detached across restarts.
- shut off
- Persistently detaches the device from the virtual server with the next restart.
Usage
Detaching a deviceExample
This example detaches the
device that is defined in device configuration-XML file
vda.xml from virtual server vserv1.# virsh detach-device vserv1 vda.xml