A mediated device management utility for Linux
Usage: mdevctl <COMMAND>
Commands:
define Define a persistent mediated device
undefine Undefine a persistent mediated device
modify Modify the definition of a mediated device
start Start a mediated device
stop Stop a mediated device
list List mediated devices
types List available mediated device types
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
Options (7)
| Option | Description | Source |
|---|
-h, --help | Print help | help |
-V, --version | Print version | help |
--addattr ATTRIBUTE | Add an attribute ATTRIBUTE. (in the manual page but not in --help) | man |
--delattr | Delete an attribute entry. (in the manual page but not in --help) | man |
--dumpjson | Dump the configuration for a device in JSON format when filtered to as single device and used with the list command. (in the manual page but not in --help) | man |
--jsonfile FILE | Read the configuration for a device from a JSON file FILE. (in the manual page but not in --help) | man |
--value VALUE | Set an attribute to VALUE, in the format accepted by the attribute. (in the manual page but not in --help) | man |
Examples (12) from the manual page, untested
mdevctl list
List running mdev devices:mdevctl list -d
List defined mdev devices:mdevctl types
List mdev types supported on the host system:mdevctl modify --uuid 83c32df7-d52e-4ec1-9668-1f3c7e4df107 --manual
Modify a defined device from automatic start to manual:mdevctl stop -u 83c32df7-d52e-4ec1-9668-1f3c7e4df107
Stop a running mdev device:uuidgen
Start an mdev device that is not defined:mdevctl define --uuid 6eba5b41-176e-40db-b93e-7f18e04e0b93
Promote the new created mdev to a defined device:mdevctl list -d
## ADVANCED EXAMPLES (ATTRIBUTES AND JSON)mdevctl modify -u 783e6dbb-ea0e-411f-94e2-717eaad438bf --addattr=assign_adapter --value=5
Add some attributes:mdevctl list -d -u 783e6dbb-ea0e-411f-94e2-717eaad438bf --dumpjson
Dump the JSON configuration:mdevctl modify -u 783e6dbb-ea0e-411f-94e2-717eaad438bf --delattr --index=5
Remove some attributes:cat vfio_ap_device.json
Define an mdev device from a file:
Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.