blob: 099ee5213173d0b5fb0c78ec7114bd1f572c5a40 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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>`_
|