User Tools

Site Tools


software:linux:kvm

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
software:linux:kvm [2012/10/26 10:21] – Michele Porellisoftware:linux:kvm [2024/05/20 21:44] (current) – Michele Porelli
Line 3: Line 3:
  
 ==== Useful virsh commands ==== ==== Useful virsh commands ====
-  * pool-refresh default - rescan your pool for new images+  * rescan default pool for new images:<code>pool-refresh default</code> 
 +==== How-tos ==== 
 +  * move from ZVOL to standard qcow2 image:<code>qemu-img convert -p -f raw -O qcow2 /dev/zvol/YOUR_ZVOL /your/image.qcow2</code> 
 +=== Extract SLIC and use it for your VM === 
 +credits: [[https://gist.github.com/Informatic/49bd034d43e054bd1d8d4fec38c305ec|1]] 
 +  * extract slic from donor<code>#!/bin/bash 
 + 
 +set -e 
 + 
 +cat /sys/firmware/acpi/tables/SLIC > slic.bin 
 +cat /sys/firmware/acpi/tables/MSDM > msdm.bin 
 +dmidecode -t 0 -u | grep $'^\t\t[^"]' | xargs -n1 | perl -lne 'printf "%c", hex($_)' > smbios_type_0.bin 
 +dmidecode -t 1 -u | grep $'^\t\t[^"]' | xargs -n1 | perl -lne 'printf "%c", hex($_)' > smbios_type_1.bin</code> 
 +  * apply to your kvm xml<code><domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> 
 +  <!-- ... --> 
 +  <qemu:commandline> 
 +    <qemu:arg value='-acpitable'/> 
 +    <qemu:arg value='file=/some/path/slic.bin'/> 
 +    <qemu:arg value='-acpitable'/> 
 +    <qemu:arg value='file=/some/path/msdm.bin'/> 
 +    <qemu:arg value='-smbios'/> 
 +    <qemu:arg value='file=/some/path/smbios_type_0.bin'/> 
 +    <qemu:arg value='-smbios'/> 
 +    <qemu:arg value='file=/some/path/smbios_type_1.bin'/> 
 +  </qemu:commandline> 
 +</domain></code> 
 +==== Quirks ==== 
 +=== High CPU usage with Windows === 
 +virt-manager doesn't pick the best options for the clock and, as consequence, the CPU usage is quite high. 
 +Replace the clock section with: 
 +<code> 
 +  <clock offset='localtime'> 
 +    <timer name='hpet' present='yes'/> 
 +    <timer name='hypervclock' present='yes'/> 
 +  </clock> 
 +</code> 
  
 ===== Links ===== ===== Links =====
 +==== Microsoft signed drivers ====
 +  * [[https://www.windowsservercatalog.com/results.aspx?&text=Red+Hat&bCatID=1282&cpID=0&avc=10&ava=130&avt=0&avq=0&OR=5&PGS=25&PG=1|Red Hat sponsored]]
 ==== Official distribution pages ==== ==== Official distribution pages ====
   * [[https://wiki.archlinux.org/index.php/KVM|Arch Linux KVM page]]   * [[https://wiki.archlinux.org/index.php/KVM|Arch Linux KVM page]]
software/linux/kvm.1351246879.txt · Last modified: (external edit)