Request an invite
Docs menu

osmates vm usb attach

Attach a device to a running machine, as if plugged in, and remember it.

Usage
osmates vm usb attach <machine> <vendor:product> [--serial <serial>] [--json]

A device with isochronous endpoints, as a camera or a sound device has, is warned of on standard error first: the machine can refuse it.

Arguments

<machine>Required

The machine's name or identifier.

<vendor:product>Required

The device's vendor and product ID in hex.

--serial <serial>

The device's serial, when two given devices share its ID.

--json

Print machine-readable JSON.

JSON output

With --json, it prints an object with these fields.

JSON Schema: /schemas/0/cli/vm/usb/attach.json

entryobject
entry.attachedbooleanRequired
entry.deviceobjectRequired
entry.labelstringRequired
entry.refusalobject or string

One of noController, notOnThisEngine, or an object that holds one key: networkClass or interfacesUnknown.

entry.rememberedbooleanRequired
entry.warningsarray of stringsRequired

Each item is one of isochronous.

keyobjectRequired
key.namestring
key.productIDintegerRequired

At least 0.

key.serialstring
key.vendorIDintegerRequired

At least 0.

rememberedbooleanRequired

Fields nested deeper are in the schema.

Exit statuses

Its exit status is one of these.

StatusMeaning
0The command did what it was asked.
1The command failed; with --json, standard error's last line is the error object.
64The command line is wrong, as ArgumentParser found before the command ran.
65What was given is wrong, found while the command ran; the same command fails until it changes.
75The same command can work later with nothing changed, as while an update finishes.
130Control-C cancelled what the command started.

Report a problem with this page