Given Fedora Server running in Boxes on a system that is running Fedora Linux Workstation 34 with Gnome. Is there a way to give the Server running in Boxes full access to an external USB hard drive that is plugged into the system?
Thanks. I can do the “GNOME Boxes > VM > Properties > Devices & Shares > USB devices” and I see the drive and can set it on, but when I do “sudo fdisk -l” at the command line so I can find out what to call it for mounting, it’s not listed. I can see the virtual drives /dev/vda, /dev/vda1, /dev/vda2, /dev/mapper/…, and /dev/zram0, but not the USB drive.
Thanks for your continuing help on this.
At first, I was trying with a USB thumb drive. Now I’m trying a USB hard disk. Now when I enable the disk as above and do the (fdisk -l) I can see that /dev/sda and /dev/sda1 have been added to the list, but I don’t see a mount point listed in /etc/fstab so I can’t mount the disk. If I do (mount /dev/sda1 /usr) I get no return message or prompt at all. Should the mount point have been created automatically or do I need to do it? If I need to create it can someone point me to a place where I can learn how to do that? Thanks for your continuing help on this.
mount command succeeds, it returns no message. That being said, is mounting over your existing
/usr directory what you are trying to do? That commands literally replaces
/usr with the contents of your usb drive until it is unmounted.
No, you need to add the entry to
I have a friend who is familiar with servers, but he had a special need where he wanted to run the server in a VM and be able to access an external real disk drive on the host machine. Since I have never done anything with servers or VMs, I took this as a learning opportunity, There was no logic to mounting to /usr other than I saw it done that way in an example I saw on line.
Thanks for your help and especially the web page you provided. I now have Fedora Server running in Boxes and it has access to a real external USB HD on the host machine. I set the mount to /mnt/extusb. Which I have no doubt was not the best choice, but it seems to be working. The disk is /dev/sda1. The mount point I ended up with is:
UUID=45B1-E9F4 /mnt/extusb vfat defaults 0 2
After I did systemctl daemon-reload and mount /mnt/extusb I could cd /mnt/extusb and use the drive. I was surprised and Happy to find that somehow the mount point got saved over server and Boxes shutdowns and restarts.
Please let me know if I have done something foolish or could have been better.
Since the drive is partitioned vfat, you might want to set some default permissions. Since it isn’t a POSIX filesystem, you won’t be able to set permissions normally.