0

I am trying to use FreeDOS running in qemu to run DOS-based Doors for a BBS. The challenge I'm running into now is getting access to the host filesystem from within the VM to share files between the host and the guest.

I was hoping for a mount command, but that doesn't seem like it exists. I was also looking for a CLI option to pass a directory as a virtual drive when the qemu instance is started up as another option. There seem to be a couple possible options, but they all appear to be linux-VM specific (eg, the -virtfs CLI option and a 9p client).

I had also found Shared folder between QEMU Windows guest and Linux host as a possibility if I can get a samba client working inside FreeDOS, but that's really a last-ditch option I'd like to avoid.

  • Is QEMU a hard requirement? Would DOSEMU be acceptable instead? – Stephen Kitt Dec 4 '18 at 6:15
  • (1) Use dosemu or dosbox instead of QEMU; both can access the host FS. (2) For file sharing, don't access the host FS from the guest, instead access the guest FS from the host (there are tools in QEMU for this, though I'm not sure if they are supposed to work on an image that's in use). – dirkt Dec 4 '18 at 7:32
  • Unfortunately, dosemu is a nonstarter because one of the places I'll be trying to do this is on an ARM system (raspberry pi), which can't use dosemu. Dosbox is a potential, but early tries at that failed for other reasons. – GranitePenguin Dec 4 '18 at 14:35
3

This has worked for me.

qemu ... -hdb fat:rw:/dir/to/mount

However, it's limited to 512MB, and doesn't reflect any changes made to the directory from the host system after QEMU starts.

  • This did the trick perfectly. Especially for my use case of working with DOS BBS software, the size limitation is not an issue. Thanks! – GranitePenguin Dec 28 '18 at 0:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.