#### QEMU #### Basic VM command ================ .. code-block:: bash #!/bin/sh exec qemu-system-x86_64 \ -machine type=q35,accel=kvm \ -enable-kvm \ -cpu host \ -smp cores=6,threads=2,sockets=1 \ -m 8G \ -drive file=ubuntu.qcow2,format=qcow2 \ -netdev user,id=mynet0 \ -device e1000,netdev=mynet0 \ -device qemu-xhci,id=xhci \ -device usb-tablet,bus=xhci.0 \ -usb \ -device usb-ehci,id=ehci \ -device usb-host,bus=usb-bus.0,hostbus=1,hostport=1 \ -device intel-hda \ -device hda-duplex \ -name Ubuntu \ -boot d \ -monitor stdio \ -display none \ "$@" .. admonition:: TODO Describe the command and split into parts and move them apart in sepatate sections. Exchange files with the 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 -o user=,pass= The ```` and the ```` can be almost *anything* existing or not, even nothing, you even can provide just ``-o user=,pass=``. The ``-t cifs`` part might be optional if ``mount`` supports inferring file system type. To mount it via ``/etc/fstab`` add the following line to the file:: //10.0.2.4/qemu cifs user=,pass= 0 0 On Windows you can just enter the following address into explorer's address bar, no authentication required:: \\10.2.0.4\qemu Overall it looks like this: .. image:: windows-guest-explorer-exe-qemu-samba.png .. [#shared-folder] `Shared folder between QEMU Windows guest and Linux host / stackexchange.com `_