]> git.proxmox.com Git - pve-docs.git/blobdiff - qm.adoc
Fix #2459: qm: Make info about core limit clear
[pve-docs.git] / qm.adoc
diff --git a/qm.adoc b/qm.adoc
index 81fd39ec06e3d8c55a5f2716deb0b8ec10de9dbd..b13f0f4ccb419222bb8dd3729e77801eb515a5a0 100644 (file)
--- a/qm.adoc
+++ b/qm.adoc
@@ -150,6 +150,9 @@ one want's to pass through PCIe hardware.
 Hard Disk
 ~~~~~~~~~
 
+[[qm_hard_disk_bus]]
+Bus/Controller
+^^^^^^^^^^^^^^
 Qemu can emulate a number of storage controllers:
 
 * the *IDE* controller, has a design which goes back to the 1984 PC/AT disk
@@ -182,6 +185,10 @@ is an older type of paravirtualized controller. It has been superseded by the
 VirtIO SCSI Controller, in terms of features.
 
 [thumbnail="screenshot/gui-create-vm-hard-disk.png"]
+
+[[qm_hard_disk_formats]]
+Image Format
+^^^^^^^^^^^^
 On each controller you attach a number of emulated hard disks, which are backed
 by a file or a block device residing in the configured storage. The choice of
 a storage type will determine the format of the hard disk image. Storages which
@@ -200,6 +207,9 @@ either the *raw disk image format* or the *QEMU image format*.
  * the *VMware image format* only makes sense if you intend to import/export the
  disk image to other hypervisors.
 
+[[qm_hard_disk_cache]]
+Cache Mode
+^^^^^^^^^^
 Setting the *Cache* mode of the hard drive will impact how the host system will
 notify the guest systems of block write completions. The *No cache* default
 means that the guest system will be notified that a write is complete when each
@@ -215,16 +225,19 @@ As of {pve} 5.0, replication requires the disk images to be on a storage of type
 `zfspool`, so adding a disk image to other storages when the VM has replication
 configured requires to skip replication for this disk image.
 
+[[qm_hard_disk_discard]]
+Trim/Discard
+^^^^^^^^^^^^
 If your storage supports _thin provisioning_ (see the storage chapter in the
 {pve} guide), you can activate the *Discard* option on a drive. With *Discard*
 set and a _TRIM_-enabled guest OS footnote:[TRIM, UNMAP, and discard
 https://en.wikipedia.org/wiki/Trim_%28computing%29], when the VM's filesystem
 marks blocks as unused after deleting files, the controller will relay this
 information to the storage, which will then shrink the disk image accordingly.
-For the guest to be able to issue _TRIM_ commands, you must either use a
-*VirtIO SCSI* (or *VirtIO SCSI Single*) controller or set the *SSD emulation*
-option on the drive. Note that *Discard* is not supported on *VirtIO Block*
-drives.
+For the guest to be able to issue _TRIM_ commands, you must enable the *Discard*
+option on the drive. Some guest operating systems may also require the
+*SSD Emulation* flag to be set. Note that *Discard* on *VirtIO Block* drives is
+only supported on guests using Linux Kernel 5.0 or higher.
 
 If you would like a drive to be presented to the guest as a solid-state drive
 rather than a rotational hard disk, you can set the *SSD emulation* option on
@@ -232,14 +245,16 @@ that drive. There is no requirement that the underlying storage actually be
 backed by SSDs; this feature can be used with physical media of any type.
 Note that *SSD emulation* is not supported on *VirtIO Block* drives.
 
-.IO Thread
+
+[[qm_hard_disk_iothread]]
+IO Thread
+^^^^^^^^^
 The option *IO Thread* can only be used when using a disk with the
 *VirtIO* controller, or with the *SCSI* controller, when the emulated controller
  type is  *VirtIO SCSI single*.
 With this enabled, Qemu creates one I/O thread per storage controller,
-instead of a single thread for all I/O, so it increases performance when
-multiple disks are used and each disk has its own storage controller.
-Note that backups do not currently work with *IO Thread* enabled.
+instead of a single thread for all I/O, so it can increase performance when
+multiple isks are used and each disk has its own storage controller.
 
 
 [[qm_cpu]]
@@ -268,8 +283,8 @@ is greater than the number of cores on the server (e.g., 4 VMs with each 4
 cores on a machine with only 8 cores). In that case the host system will
 balance the Qemu execution threads between your server cores, just like if you
 were running a standard multithreaded application. However, {pve} will prevent
-you from assigning more virtual CPU cores than physically available, as this will
-only bring the performance down due to the cost of context switches.
+you from starting VMs with more virtual CPU cores than physically available, as
+this will only bring the performance down due to the cost of context switches.
 
 [[qm_cpu_resource_limits]]
 Resource Limits
@@ -507,7 +522,7 @@ host.
 .Fixed Memory Allocation
 [thumbnail="screenshot/gui-create-vm-memory.png"]
 
-ghen setting memory and minimum memory to the same amount
+When setting memory and minimum memory to the same amount
 {pve} will simply allocate what you specify to your VM.
 
 Even when using a fixed memory size, the ballooning device gets added to the
@@ -636,7 +651,8 @@ necessary footnote:[https://www.kraxel.org/blog/2014/10/qemu-using-cirrus-consid
 qemu: using cirrus considered harmful], e.g., if using Windows XP or earlier
 * *vmware*, is a VMWare SVGA-II compatible adapter.
 * *qxl*, is the QXL paravirtualized graphics card. Selecting this also
-enables SPICE for the VM.
+enables https://www.spice-space.org/[SPICE] (a remote viewer protocol) for the
+VM.
 
 You can edit the amount of memory given to the virtual GPU, by setting
 the 'memory' option. This can enable higher resolutions inside the VM,
@@ -753,6 +769,28 @@ footnote:[Looking Glass: https://looking-glass.hostfission.com/] project,
 which enables high performance, low-latency display mirroring between
 host and guest.
 
+[[qm_audio_device]]
+Audio Device
+~~~~~~~~~~~~
+
+To add an audio device run the following command:
+
+----
+qm set <vmid> -audio0 device=<device>
+----
+
+Supported audio devices are:
+
+* `ich9-intel-hda`: Intel HD Audio Controller, emulates ICH9
+* `intel-hda`: Intel HD Audio Controller, emulates ICH6
+* `AC97`: Audio Codec '97, useful for older operating systems like Windows XP
+
+NOTE: The audio device works only in combination with SPICE. Remote protocols
+like Microsoft's RDP have options to play sound. To use the physical audio
+device of the host use device passthrough (see
+xref:qm_pci_passthrough[PCI Passthrough] and
+xref:qm_usb_passthrough[USB Passthrough]).
+
 [[qm_startup_and_shutdown]]
 Automatic Start and Shutdown of Virtual Machines
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -797,6 +835,70 @@ start after those where the parameter is set. Further, this parameter can only
 be enforced between virtual machines running on the same host, not
 cluster-wide.
 
+[[qm_spice_enhancements]]
+SPICE Enhancements
+~~~~~~~~~~~~~~~~~~
+
+SPICE Enhancements are optional features that can improve the remote viewer
+experience.
+
+To enable them via the GUI go to the *Options* panel of the virtual machine. Run
+the following command to enable them via the CLI:
+
+----
+qm set <vmid> -spice_enhancements foldersharing=1,videostreaming=all
+----
+
+NOTE: To use these features the <<qm_display,*Display*>> of the virtual machine
+must be set to SPICE (qxl).
+
+Folder Sharing
+^^^^^^^^^^^^^^
+
+Share a local folder with the guest. The `spice-webdavd` daemon needs to be
+installed in the guest. It makes the shared folder available through a local
+WebDAV server located at http://localhost:9843.
+
+For Windows guests the installer for the 'Spice WebDAV daemon' can be downloaded
+from the
+https://www.spice-space.org/download.html#windows-binaries[official SPICE website].
+
+Most Linux distributions have a package called `spice-webdavd` that can be
+installed.
+
+To share a folder in Virt-Viewer (Remote Viewer) go to 'File -> Preferences'.
+Select the folder to share and then enable the checkbox.
+
+NOTE: Folder sharing currently only works in the Linux version of Virt-Viewer.
+
+CAUTION: Experimental! Currently this feature does not work reliably.
+
+Video Streaming
+^^^^^^^^^^^^^^^
+
+Fast refreshing areas are encoded into a video stream. Two options exist:
+
+* *all*: Any fast refreshing area will be encoded into a video stream.
+* *filter*: Additional filters are used to decide if video streaming should be
+  used (currently only small window surfaces are skipped).
+
+A general recommendation if video streaming should be enabled and which option
+to choose from cannot be given. Your mileage may vary depending on the specific
+circumstances.
+
+Troubleshooting
+^^^^^^^^^^^^^^^
+
+.Shared folder does not show up
+
+Make sure the WebDAV service is enabled and running in the guest. On Windows it
+is called 'Spice webdav proxy'. In Linux the name is 'spice-webdavd' but can be
+different depending on the distribution.
+
+If the service is running, check the WebDAV server by opening
+http://localhost:9843 in a browser in the guest.
+
+It can help to restart the SPICE session.
 
 [[qm_migration]]
 Migration