I think I figured it out.
Started working on a subtask CLOUDSTACK-9004 to re-factor and add some needed
features to HyperVEnlightenmentFeatureDef.
I'll submit a PR for it once I finish and then start working on the
implementation mentioned in the parent task CLOUDSTACK-8978
________________________________________
From: Wido den Hollander <[email protected]>
Sent: Thursday, October 29, 2015 1:48 AM
To: [email protected]
Subject: Re: Hyper-V clock on KVM node - CLOUDSTACK-8978
Josh Harshman
Cloud Engineer
Security+
Intrinium
On 27-10-15 23:42, Josh Harshman wrote:
> I noticed around line 1949 in LibvirtComputingResource.java, there is some
> commented out code for enabling hyperV enlightenment. Was there an issue
> with enabling this behavior?
>
I don't know why this was disabled. Maybe somebody else knows, but I
can't tell for sure.
Wido
> Code Snip:
> //for rhel 6.5 and above, hyperv enlightment feature is added
> /*
> * if (vmTO.getOs().contains("Windows Server 2008") && hostOsVersion != null
> && ((hostOsVersion.first() == 6 && hostOsVersion.second() >= 5) ||
> (hostOsVersion.first() >= 7))) {
> * LibvirtVMDef.HyperVEnlightenmentFeatureDef hyv = new
> LibvirtVMDef.HyperVEnlightenmentFeatureDef();
> * hyv.setRelaxed(true);
> * features.addHyperVFeature(hyv);
> * }
> */
>
>
>
> ________________________________________
> From: Wido den Hollander <[email protected]>
> Sent: Monday, October 26, 2015 9:05 AM
> To: [email protected]
> Subject: Re: Hyper-V clock on KVM node - CLOUDSTACK-8978
>
>
>
> Josh Harshman
> Cloud Engineer
> Security+
> Intrinium
>
> On 24-10-15 02:15, Josh Harshman wrote:
>> Just looking for some feedback on this idea for an improvement.
>>
>>
>> Currently, for any windows guest OS, we set RTC for the clock source. This
>> seems to contribute to clock-drift issues leading to BSODs on Windows Server
>> 2008 R2 Guests.
>>
>> I believe a possible improvement would be to set Windows guests to use the
>> hyper-v clock. To do this we will need CloudStack to generate the
>> appropriate Libvirt XML which would look somewhat like the following:
>>
>> <features>
>> <hyperv>
>> <relaxed state='on'/>
>> <vapic state='on'/>
>> <spinlocks state='on' retries='8191'/>
>> </hyperv>
>> <features/>
>> <clock ...>
>> <timer name='hypervclock' present='yes'/>
>> </clock>
>>
>>
>> I believe the following code snippet from LibvirtComputingResource.java
>> could be a starting place to implement this.
>>
>>
>> if (vmTO.getOs().startsWith("Windows")) {
>> clock.setClockOffset(ClockDef.ClockOffset.LOCALTIME);
>> clock.setTimer("rtc", "catchup", null);
>>
>>
>> Let me know what you all think about this change.
>> Is there a better place / way to implement this?
>>
>
> That would indeed be the place to fix this. It's currently rather
> hardcoded, but that would be the place to go.
>
> Wido
>
>>
>>
>>
>>
>> Josh Harshman
>>
>> Cloud Engineer
>> Security+
>>
>>
>> Intrinium
>> Tel: (509) 465-1234 x5259
>> Fax: (866) 565-4578
>> Lync / Skype: [email protected]
>> Web: http://intrinium.com<http://intrinium.com/>
>>
>>
>> [Intrinium Long Sig Logo]<http://intrinium.com/>
>>
>>
>> [Facebook]<http://www.facebook.com/pages/intrinium/154891544582822>
>> [Twitter] <http://twitter.com/intrinium> [Linkedin]
>> <http://www.linkedin.com/company/intrinium_networks_it_security?trk=fc_badge>
>> [Youtube] <http://www.youtube.com/user/intrinium> [Blog]
>> <http://intrinium.com/blog/>
>>
>> Information Security and Compliance Consulting | Managed IT and Security
>> Services | Cloud Services
>>
>>
>>
>>
>>
>> ________________________________
>>
>> This email and any files transmitted with it are confidential and intended
>> solely for the use of the individual or entity to whom they are addressed.
>> If you have received this email in error please notify the system manager.
>> This message contains confidential information and is intended only for the
>> individual named. If you are not the named addressee you should not
>> disseminate, distribute or copy this e-mail. Please notify the sender
>> immediately by e-mail if you have received this e-mail by mistake and delete
>> this e-mail from your system. If you are not the intended recipient you are
>> notified that disclosing, copying, distributing or taking any action in
>> reliance on the contents of this information is strictly prohibited.
>>