FAQ

How do I disable virtual media on my TinyPilot?

Note: These instructions apply only to TinyPilot Pro 2.3.1 or later.

Overview

TinyPilot Pro features virtual media, which allows users to mount disk images on the target computer and boot from them.

In some cases, the virtual media feature can limit compatibility with other hardware, including some multi-port KVMs. Some users prefer to disable this feature to comply with IT policies that forbid storage devices on the target computer. This article explains how to disable TinyPilot's virtual media feature for those scenarios.

Disabling virtual media

To disable TinyPilot's virtual media feature, SSH in to your TinyPilot, and run the following commands:

sudo sed \
  --in-place \
  --expression \
    's/init-usb-gadget\s\{1,\}\\/init-usb-gadget --no-mass-storage \\/g' \
  /lib/systemd/system/usb-gadget.service && \
 sudo systemctl daemon-reload && \
 sudo service usb-gadget restart && \
 echo "tinypilot_enable_mass_storage_gadget: no" | \
  sudo tee -a /home/tinypilot/settings.yml

You will still see Virtual Media options in the web interface, but TinyPilot will not present a USB drive to the target computer.

With virtual media disabled, you will see a failure if you attempt to mount a virtual drive image:

Screenshot of error message saying

Re-enabling virtual media

If you've disabled TinyPilot's virtual media functionality and you'd like to re-enable it, SSH in to your TinyPilot, and run the command below:

sudo sed \
  --in-place \
  --expression \
    's/\s\{1,\}--no-mass-storage//g' \
  /lib/systemd/system/usb-gadget.service && \
 sudo systemctl daemon-reload && \
 sudo service usb-gadget restart && \
sudo sed \
  --in-place \
    '/tinypilot_enable_mass_storage_gadget/d' \
  /home/tinypilot/settings.yml

After re-enabling virtual media, you will be able to mount and unmount virtual media images normally.