You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update Readme for USB support
* Add usb_devices var to include vm.yml
* adding include to validate presence of usb devices on host
* adding usb section to vm.xml template
* adding include to validate usb devices
* moving to faile_when for cleaner handling of errors
* remove loop index as Libvirt fills in data
Copy file name to clipboardExpand all lines: README.md
+25Lines changed: 25 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -120,6 +120,27 @@ Role Variables
120
120
-`dev`: (optional) Block device path when type is `block`.
121
121
-`remote_src`: (optional) When type is `file` or `block`, specify wether `image` points to a remote file (true) or a file local to the host that launched the playbook (false). Defaults to true.
122
122
123
+
-`usb_devices`: a list of usb devices to present to the vm from the host.
124
+
125
+
Each usb device is defined with the following dict:
126
+
127
+
-`vendor`: The vendor id of the USB device.
128
+
-`product`: The product id of the USB device.
129
+
130
+
Note - Libvirt will error if the VM is provisioned and the USB device is not attached.
131
+
132
+
To obtain the vendor id and product id of the usb device from the host running as sudo / root with the usb device plugged in
133
+
run `lsusb -v`. Example below with an attached Sandisk USB Memory Stick with vendor id: `0x0781` and product id: `0x5567`
134
+
135
+
```
136
+
lsusb -v | grep -A4 -i sandisk
137
+
138
+
idVendor 0x0781 SanDisk Corp.
139
+
idProduct 0x5567 Cruzer Blade
140
+
bcdDevice 1.00
141
+
iManufacturer 1
142
+
iProduct 2
143
+
```
123
144
124
145
- `interfaces`: a list of network interfaces to attach to the VM.
125
146
Each network interface is defined with the following dict:
0 commit comments