Hardware configuration examples

Let us take a look at some common hardware configurations; the domcapabilities options of virsh commands will show you the host capabilities. You can parse the output to find the exact supported value of a particular hardware configuration which you can present to a virtual machine. The following is the maximum vcpu that you can present to a VM:

[root@kvmHOST ~]# virsh domcapabilities  | grep -i max
  <vcpu max='255'/>
[root@kvmHOST ~]#

As per the output, on this host a maximum of 255 vcpus can be defined for a virtual machine:

[root@kvmHOST ~]# virsh domcapabilities  | grep diskDevice -A 5
    <enum name='diskDevice'>
      <value>disk</value>
      <value>cdrom</value>
      <value>floppy</value>
      <value>lun</value>
    </enum>
[root@kvmHOST ...

Get Mastering KVM Virtualization now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.