mirror of
https://github.com/QubesOS/qubes-doc.git
synced 2024-10-01 01:25:40 -04:00
Copy content from deprecated USB page
This commit is contained in:
parent
328ce89659
commit
bb449dac7c
@ -115,7 +115,35 @@ To recover from this error state, in dom0 run
|
||||
|
||||
(where `targetVM` is to be replaced with the VM name you attached the device to and `xvdi` is to be replaced with the used [frontend device node][frontend-dev].)
|
||||
|
||||
However, if the block device originated in dom0, you will have to refer to the [old way][detach dom0 device].
|
||||
However, if the block device originated in dom0, you will have to refer to the next section.
|
||||
|
||||
|
||||
### What if I removed the device before detaching it from the VM?###
|
||||
|
||||
Currently (until issue [1082] gets implemented), if you remove the device before detaching it from the qube, Qubes OS (more precisely, `libvirtd`) will think that the device is still attached to the qube and will not allow attaching further devices under the same name.
|
||||
The easiest way to recover from such a situation is to reboot the qube to which the device was attached.
|
||||
If this isn't an option, you can manually recover from the situation by following these steps:
|
||||
|
||||
1. Physically connect the device back.
|
||||
You can use any device as long as it will be detected under the same name (for example, `sdb`).
|
||||
|
||||
2. Attach the device manually to the same VM using the `xl block-attach` command.
|
||||
It is important to use the same "frontend" device name (by default, `xvdi`).
|
||||
You can get it from the `qvm-block` listing:
|
||||
|
||||
[user@dom0 ~]$ qvm-block
|
||||
sys-usb:sda DataTraveler_2.0 () 246 MiB (attached to 'testvm' as 'xvdi')
|
||||
[user@dom0 ~]$ sudo xl block-attach testvm phy:/dev/sda backend=sys-usb xvdi
|
||||
|
||||
In above example, all `xl block-attach` parameters can be deduced from the output of `qvm-block`.
|
||||
In order:
|
||||
|
||||
* `testvm` - name of target qube to which device was attached - listed in brackets by `qvm-block` command
|
||||
* `phy:/dev/sda` - physical path at which device appears in source qube (just after source qube name in `qvm-block` output)
|
||||
* `backend=sys-usb` - name of source qube, can be omitted in the case of dom0
|
||||
* `xvdi` - "frontend" device name (listed at the end of line in `qvm-block` output)
|
||||
|
||||
3. Now properly detach the device, either using Qubes VM Manager or the `qvm-block -d` command.
|
||||
|
||||
|
||||
## Attaching a File ##
|
||||
@ -200,4 +228,5 @@ This option accepts `cdrom` and `disk`, default is `disk`.
|
||||
[detach dom0 device]: /doc/usb/#what-if-i-removed-the-device-before-detaching-it-from-the-vm
|
||||
[losetup]: https://linux.die.net/man/8/losetup
|
||||
[USB]:/doc/usb-devices/
|
||||
[1082]: https://github.com/QubesOS/qubes-issues/issues/1082
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user