summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2024-01-06 01:14:45 +0300
committerOxore <oxore@protonmail.com>2024-01-06 01:14:45 +0300
commit52a4250aef776bbbaea0ddcebd19ecc27ffe0c0c (patch)
treec5d0a305cd2ba0b01860c0003649988df1abd638 /source
parent6bc56335677514a1f508f1d83bdafbcc2f66c9f0 (diff)
Add qemu.rst
Diffstat (limited to 'source')
-rw-r--r--source/index.rst3
-rw-r--r--source/qemu.rst35
2 files changed, 37 insertions, 1 deletions
diff --git a/source/index.rst b/source/index.rst
index eb4a715..b9da86d 100644
--- a/source/index.rst
+++ b/source/index.rst
@@ -10,5 +10,6 @@ that's why this site exist.
:hidden:
amberelec-internals
- radare2-tips
c-calling-conventions
+ radare2-tips
+ qemu
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>`_