Skip to content

Commit

Permalink
Detach devices from sd-export-usb before re-attaching
Browse files Browse the repository at this point in the history
This will ensure that only 1 device is attached to the sd-export-usb domain.
  • Loading branch information
emkll committed Jun 5, 2019
1 parent efc1ede commit dbe00eb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dom0/sd-export.sls
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,13 @@ sd-export-create-named-dispvm:

{% import_json "sd/config.json" as d %}

# Persistent attachments can only be removed when the domain is off, so we must
# kill sd-export-usb before detaching the USB devices from the domain
sd-export-named-dispvm-permanently-attach-usb:
cmd.run:
- name: >
qvm-kill sd-export-usb || true ;
qvm-usb detach sd-export-usb || true ;
qvm-usb attach --persistent sd-export-usb {{ d.usb.device }} || true
- require:
- cmd: sd-export-create-named-dispvm
Expand Down

0 comments on commit dbe00eb

Please sign in to comment.