Mass Storage Device
MSD (Mass Storage Drive) is a powerful feature that allows One-KVM to emulate a virtual CD/DVD or flash drive. This enables using live media in BIOS/UEFI to recover or reinstall operating systems.
MSD notes
- CD-ROM images are limited to 2.2 GB by the Linux kernel. Specially adapted Linux builds (currently OneCloud and Cumebox 2) do not have this limit
- Flash images have no size limit
Caution
On OneCloud, do not disconnect the USB dual-headed (OTG) cable from the host or power off the host when using the unmount (disconnect) function. Otherwise, the kernel will continuously log errors due to the OTG port being unavailable. This causes the logging service to consume 100% CPU and the system to become unstable. MSD will remain unavailable until the USB OTG connection returns to normal.
Using MSD
Basic configuration
Since version 20241004, MSD is enabled by default and uses the /var/lib/kvmd/msd
directory (no longer a mounted partition).
Upload images manually
One-KVM stores images in /var/lib/kvmd/msd
. Upload your image file to this directory.
Change MSD path
Since integrated image 201204, MSD can use any directory specified in /etc/kvmd/override.yaml
. If permission is denied, run chown kvmd -R /var/lib/kvmd/msd/
to make it writable.
Writable flash drive
When emulating a flash drive on One-KVM, you can allow the target machine to write files to the image. After stopping the drive, download and open the image locally. This is useful for retrieving files from the target.
Create a ventoy bootable image
For versions earlier than 20241004, run kvmd-helper-otgmsd-remount rw
first to remount internal storage as read-write before manipulating files.
-
Create an empty image file in
/var/lib/kvmd/msd
with the required size. In this example, file isflash.img
with 4096MB. -
In the web UI, choose Drive -> Image -> flash.img, switch the drive mode from cd-rom to flash, then connect MSD to the host.
-
On the target, open ventoy and select the virtual disk to install.
After completion, the flash image is ready for boot whenever needed.
File exchange
Demo video recorded by a community member:
Related options:
Appendix: MSD partition mount (legacy)
MSD partition mount (before 20241004)
If you still need to use a mounted partition, in /etc/kvmd/override.yaml
comment out the msd sub-option remount_cmd: /bin/true
to #remount_cmd: /bin/true
so the MSD partition gets correct permissions.
Choose any one of the following three methods. For beginners, the third method (virtual disk image) is recommended. It requires no physical partitioning and is safer and simpler.
Use OneCloud eMMC space
A prepared Armbian with tools is provided in the cloud drive (path: /One-KVM 相关/gparted_on_armbain_usbdisk.zip). Flash it to a USB drive, plug it into the USB port next to OneCloud’s Ethernet port, power on, connect via SSH (root/1234), and run gparted
.
If the GParted UI does not appear, check whether your SSH terminal supports X11 forwarding.
In GParted, right-click /dev/mmcblp1p2 -> Resize/Move, set Free space following (e.g., 4096), format the new space as ext4, and click the check mark to apply.
Use an SD card
Avoid no-name cards (many appear fine in Windows, recognizable in Linux but not readable/writable).
Use a virtual disk file
Create a new img file as the MSD filesystem; this method has been tested.
Mount the partition
Confirm the correct path to mount (e.g., /dev/mmcblk1, /dev/mmcblk0p3, /root/diska.img). The following uses /dev/mmcblk0 as an example.
Upload images manually
One-KVM stores images in a special partition mounted at /var/lib/kvmd/msd
. If it is read-only, run: