Optional USB Device in Virtual Machine Manager

To make a USB Host Device optional on startup within KVM, edit the XML and add startupPolicy="optional" to the source node. This will ensure your usb stick, yubikey, or whatever, it won’t stop your VM from booting if it isn’t present.

Example:

<hostdev mode="subsystem" type="usb" managed="yes"> <source startupPolicy="optional"> <vendor id="0x1050"/> <product id="0x0402"/> </source> <address type="usb" bus="0" port="4"/> </hostdev>
Code language: HTML, XML (xml)

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.