Set Up the Virtual Appliance to Accept USB Flash Drives on a Shutdown VM - Generic Procedure

Before you begin

Prepare the Virtual Appliance to accept USB flash drives. The VM must be shut down before adding the USB flash drive.
  1. Format the flash drive to FAT32.
  2. Insert the flash drive into a USB port on the host.
    Note

    Note

    A USB device is required to be plugged in before it can be added to a virtual machine.

About this task

The Virtual Appliance can accept USB flash drives. The flash drive can be used for backing up, restoring, upgrading, and collecting log information.

To add a USB flash drive to a shutdown VM:

Procedure

  1. Log in to the host using a CLI (for example, SSH) to run the following command:
    # lsusb
    Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 003 Device 004: ID 1604:10c0 Tascam
    Bus 003 Device 003: ID 1604:10c0 Tascam
    Bus 003 Device 002: ID 1604:10c0 Tascam
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 002: ID 0424:5744 Standard Microsystems Corp. Hub
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 003: ID 125f:c08a A-DATA Technology Co., Ltd. C008 Flash Drive
    
  2. Extend your VM configuration:
    To add the flash drive using USB vendor or device ID:
    Note

    Note

    Adjust the addr field depending on the devices that are already defined on the PCI bus.
    -device 'nec-usb-xhci,id=xhci,bus=pci.1,addr=0x1b'
    -device 'usb-host,bus=xhci.0,vendorid=0x125f,productid=0xc08a,id=usb0'
    
    Note

    Note

    vendorid and productid arguments need to match the flash drive ID from the lsusb output.
    To add the flash drive using the USB port:
    -device 'nec-usb-xhci,id=xhci,bus=pci.1,addr=0x1b'
    -device 'usb-host,bus=xhci.0,hostbus=1,hostport=1.3,id=usb0'
    
    Note

    Note

    hostbus and hostport arguments need to match the flash drive bus and device numbers from the lsusb output.
  3. Start the VM.