diff options
Diffstat (limited to 'source/qemu.rst')
-rw-r--r-- | source/qemu.rst | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/source/qemu.rst b/source/qemu.rst new file mode 100644 index 0000000..099ee52 --- /dev/null +++ b/source/qemu.rst @@ -0,0 +1,35 @@ +#### +QEMU +#### + +Exchange files with host using samba [#shared-folder]_ +====================================================== + +When running QEMU, add the following options to the ``qemu-system-x86_64`` +invocation command:: + + -netdev user,smb="/path/to/shared/directory",id=mynet0 \ + -device e1000,netdev=mynet0 \ + +The shared directory can be mounted by a guest Linux machine like this:: + + mount -t cifs //10.0.2.4/qemu /mnt/samba -o user=<user>,pass=<password> + +The ``<user>`` and the ``<password>`` must be real user on the host machine. I +am not sure whether it is the user owning the shared directory or the one +started the QEMU process, but in my case it always the same user and I put it's +credentials and it works. + +The ``-t cifs`` part might be optional if ``mount`` supports inferring file +system type. + +.. admonition:: TODO + + Describe how to mount the shared directory by creating an entry in + ``/etc/fstab``. + +.. admonition:: TODO + + Describe how to mount the shared folder from a Windows guest + +.. [#shared-folder] `Shared folder between QEMU Windows guest and Linux host / stackexchange.com <https://unix.stackexchange.com/a/183609>`_ |