<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jan 2, 2013 at 9:41 AM, James B. Byrne <span dir="ltr"><<a href="mailto:byrnejb@harte-lyne.ca" target="_blank">byrnejb@harte-lyne.ca</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im"><br></div>I ran into this situation several times whilst testing KVM and the<br>


lessons I learned from the experiences can be summarized as:<br>
<br>
1.  Never allow the kvm hypervisior to handle guests during a host<br>
shutdown.  Use 'virsh shutdown' on each of the guests first and then<br>
shutdown the host.  Use autostart to restart guests on a host's<br>
reboot.  Write a script to process 'virsh list' to feed active domains<br>
to 'virsh shutdown' if automation is required and link that to<br>
/etc/rc0.d/K10<whatever>.<br>
<br></blockquote><div><br></div><div style>@James:  Can you specifically cite why you manually power down each node?</div><div style>Have you tried tweaking your libvirt settings in the config file I noted in my earlier response to Robert?</div>

<div><br></div><div style>Oh and another note, you can set libvirt so that it _only_ starts the machines that were running when the host machine was issued a shutdown.  There are advantages and disadvantages to both (auto-shutdown by host and manually doing it) as there is with anything.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
2.  In the situation where a kvm guest pause and restore sequence<br>
leads to an excessive disconnect between guest time and wall time use<br>
ntpd -q to hard set the time.  From the guest's point of view you are<br>
always going ahead in time in the case of a pause and resume so this<br>
is not likely to ever cause a problem. But, having written that down,<br>
it probably will at some point.<br>
<br>
3.  Run ntpd on the host system and have its guests configured to only<br>
use that time server source.<br>
<br></blockquote><div><br></div><div style>Set up a central NTP server and have your hosts (and not just VMs) connect to it.  It could be the VM host, but doesn't need to be.</div><div style>Distribute the load to your NTP server and off of the public NTP pool by running an NTP server for your servers to poll [0] ... it's a good practice and everybody is happy.</div>

<div><br></div><div style>[0] <a href="http://support.ntp.org/bin/view/Support/DesigningYourNTPNetwork#Section_5.7">http://support.ntp.org/bin/view/Support/DesigningYourNTPNetwork#Section_5.7</a>.</div><div style> <br></div>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
4.  On each guest have a cron job that checks for ntpd at regular<br>
intervals which reports failures and restarts the time service as<br>
necessary. We use:<br>
  JOBNAME="Check ntpd status and restart if required" ; \<br>
    ntpstat > /dev/null && \<br>
    if [[ $? -gt 0 ]]; then /sbin/service ntpd start; fi<br>
<span class=""><font color="#888888"><br></font></span></blockquote><div><br></div><div style>Why not configure the ntpd daemon and stick with that?</div><div style>It does update on its own [1].</div><div style>And ntpstat prints out the interval, which matches the one mentioned at [1].</div>

<div style>I don't believe the ntpstat script/job is necessary (I've never had to do more than set ntpd to run after configuring the servers it should poll).</div><div style><br></div><div style><div>~]$ ntpstat</div>

<div>synchronised to NTP server (x.x.x.x) at stratum 3 </div><div>   time correct to within 67 ms</div><div>   polling server every 1024 s</div></div><div style><br></div><div style>[1] <a href="http://www.ntp.org/ntpfaq/NTP-s-algo.htm#Q-ALGO-POLL-BEST">http://www.ntp.org/ntpfaq/NTP-s-algo.htm#Q-ALGO-POLL-BEST</a><br>

</div><div style><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class=""><font color="#888888">
<br>
--<br>
***          E-Mail is NOT a SECURE channel          ***<br>
James B. Byrne                mailto:<a href="mailto:ByrneJB@Harte-Lyne.ca">ByrneJB@Harte-Lyne.ca</a><br>
Harte & Lyne Limited          <a href="http://www.harte-lyne.ca" target="_blank">http://www.harte-lyne.ca</a><br>
9 Brockley Drive              vox: <a href="tel:%2B1%20905%20561%201241" value="+19055611241">+1 905 561 1241</a><br>
Hamilton, Ontario             fax: <a href="tel:%2B1%20905%20561%200757" value="+19055610757">+1 905 561 0757</a><br>
Canada  L8E 3C3<br>
</font></span><div class=""><div class="h5"><br>
_______________________________________________<br>
CentOS-virt mailing list<br>
<a href="mailto:CentOS-virt@centos.org">CentOS-virt@centos.org</a><br>
<a href="http://lists.centos.org/mailman/listinfo/centos-virt" target="_blank">http://lists.centos.org/mailman/listinfo/centos-virt</a><br>
</div></div></blockquote></div><br><br></div><div class="gmail_extra">-- <br>---~~.~~---<br>Mike<br>//  SilverTip257  //
</div></div>