@@ -372,6 +372,27 @@ type qemucmd struct {
372372 Value string `xml:"value,attr"`
373373}
374374
375+ type clock struct {
376+ Offset string `xml:"offset,attr"`
377+ Timer []timer `xml:"timer,omitempty"`
378+ }
379+
380+ type timer struct {
381+ Name string `xml:"name,attr"`
382+ Track string `xml:"track,attr,omitempty"`
383+ Tickpolicy string `xml:"tickpolicy,attr,omitempty"`
384+ CatchUp catchup `xml:"catchup,omitempty"`
385+ Frequency uint32 `xml:"frequency,attr,omitempty"`
386+ Mode string `xml:"mode,attr,omitempty"`
387+ Present string `xml:"present,attr,omitempty"`
388+ }
389+
390+ type catchup struct {
391+ Threshold uint `xml:"threshold,attr,omitempty"`
392+ Slew uint `xml:"slew,attr,omitempty"`
393+ Limit uint `xml:"limit,attr,omitempty"`
394+ }
395+
375396type commandlines struct {
376397 Cmds []qemucmd `xml:"qemu:arg"`
377398}
@@ -392,6 +413,7 @@ type domain struct {
392413 OnCrash string `xml:"on_crash"`
393414 Devices device `xml:"devices"`
394415 SecLabel seclab `xml:"seclabel"`
416+ Clock clock `xml:"clock"`
395417 CommandLine commandlines `xml:"qemu:commandline"`
396418}
397419
@@ -480,6 +502,9 @@ func (lc *LibvirtContext) domainXml(ctx *hypervisor.VmContext) (string, error) {
480502 dom .OnReboot = "destroy"
481503 dom .OnCrash = "destroy"
482504
505+ dom .Clock .Offset = "utc"
506+ dom .Clock .Timer = append (dom .Clock .Timer , timer {Name : "rtc" , Track : "guest" , Tickpolicy : "catchup" })
507+
483508 pcicontroller := controller {
484509 Type : "pci" ,
485510 Index : "0" ,
0 commit comments