From b87a08f7d779d5d8c29522d45ef2d5a0f5d2e319 Mon Sep 17 00:00:00 2001 From: Oxore Date: Thu, 11 Jan 2024 20:24:54 +0300 Subject: Add full example qemu script --- source/qemu.rst | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) (limited to 'source') diff --git a/source/qemu.rst b/source/qemu.rst index e7257ef..d2f885a 100644 --- a/source/qemu.rst +++ b/source/qemu.rst @@ -2,8 +2,42 @@ QEMU #### -Exchange files with host using samba [#shared-folder]_ -====================================================== +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:: -- cgit v1.2.3