From 52a4250aef776bbbaea0ddcebd19ecc27ffe0c0c Mon Sep 17 00:00:00 2001 From: Oxore Date: Sat, 6 Jan 2024 01:14:45 +0300 Subject: Add qemu.rst --- source/index.rst | 3 ++- source/qemu.rst | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 source/qemu.rst (limited to 'source') 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=,pass= + +The ```` and the ```` 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 `_ -- cgit v1.2.3