mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-22 22:03:39 +03:00
F #6298: Add options and timers for HyperV
This commits add a curated list of hyperv (and timers) options when enabled for the VM. It adds HYPERV_TIMERS, which are added to the clock element when HYPERV is selected.
This commit is contained in:
parent
dca8684361
commit
4bcb6f7089
@ -2112,9 +2112,29 @@ int LibVirtDriver::deployment_description_kvm(
|
|||||||
file << "\t</features>" << endl;
|
file << "\t</features>" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( localtime )
|
if ( localtime || hyperv )
|
||||||
{
|
{
|
||||||
file << "\t<clock offset='localtime'/>" << endl;
|
string htimers;
|
||||||
|
|
||||||
|
get_attribute(vm, host, cluster, "HYPERV_TIMERS", htimers);
|
||||||
|
|
||||||
|
file << "\t<clock";
|
||||||
|
|
||||||
|
if ( localtime )
|
||||||
|
{
|
||||||
|
file << " offset='localtime'>" << endl;
|
||||||
|
}
|
||||||
|
else //UTC is set as the clock offset by default
|
||||||
|
{
|
||||||
|
file << " offset='utc'>" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!htimers.empty())
|
||||||
|
{
|
||||||
|
file << htimers << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
file << "\t</clock>" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( guest_agent )
|
if ( guest_agent )
|
||||||
|
@ -50,6 +50,7 @@
|
|||||||
# - MODEL
|
# - MODEL
|
||||||
# * RAW: raw attribute value is appended to that on the VM template
|
# * RAW: raw attribute value is appended to that on the VM template
|
||||||
# * HYPERV_OPTIONS: options used for FEATURES = [ HYPERV = yes ]
|
# * HYPERV_OPTIONS: options used for FEATURES = [ HYPERV = yes ]
|
||||||
|
# * HYPERV_TIMERS: timers added when HYPERV is set to yes in FEATURES
|
||||||
# * SPICE_OPTIONS
|
# * SPICE_OPTIONS
|
||||||
# * Q35_ROOT_PORTS: Number of PCI ports allocated for VMs of type q35.
|
# * Q35_ROOT_PORTS: Number of PCI ports allocated for VMs of type q35.
|
||||||
# * OVMF_UEFIS: List of firmware available to users (full path in the hosts)
|
# * OVMF_UEFIS: List of firmware available to users (full path in the hosts)
|
||||||
@ -99,7 +100,26 @@ NIC = [
|
|||||||
|
|
||||||
#RAW = "<devices><serial type=\"pty\"><source path=\"/dev/pts/5\"/><target port=\"0\"/></serial><console type=\"pty\" tty=\"/dev/pts/5\"><source path=\"/dev/pts/5\"/><target port=\"0\"/></console></devices>"
|
#RAW = "<devices><serial type=\"pty\"><source path=\"/dev/pts/5\"/><target port=\"0\"/></serial><console type=\"pty\" tty=\"/dev/pts/5\"><source path=\"/dev/pts/5\"/><target port=\"0\"/></console></devices>"
|
||||||
|
|
||||||
HYPERV_OPTIONS = "<relaxed state='on'/><vapic state='on'/><spinlocks state='on' retries='4096'/>"
|
HYPERV_OPTIONS = "
|
||||||
|
<relaxed state='on'/>
|
||||||
|
<vapic state='on'/>
|
||||||
|
<spinlocks state='on' retries='8191'/>
|
||||||
|
<vpindex state='on'/>
|
||||||
|
<runtime state='on'/>
|
||||||
|
<synic state='on'/>
|
||||||
|
<stimer state='on'/>
|
||||||
|
<reset state='off'/>
|
||||||
|
<frequencies state='on'/>
|
||||||
|
<reenlightenment state='off'/>
|
||||||
|
<tlbflush state='on'/>
|
||||||
|
<ipi state='on'/>
|
||||||
|
<evmcs state='off'/>"
|
||||||
|
|
||||||
|
HYPERV_TIMERS = "
|
||||||
|
<timer name='rtc' tickpolicy='catchup'/>
|
||||||
|
<timer name='pit' tickpolicy='delay'/>
|
||||||
|
<timer name='hpet' present='no'/>
|
||||||
|
<timer name='hypervclock' present='yes'/>"
|
||||||
|
|
||||||
SPICE_OPTIONS = "
|
SPICE_OPTIONS = "
|
||||||
<video>
|
<video>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user