@@ -38,11 +38,13 @@ func (qc *QemuContext) arguments(ctx *hypervisor.VmContext) []string {
3838 cpuParams = strconv .Itoa (boot .CPU )
3939 }
4040
41+ cmdline := "console=ttyS0 panic=1 no_timer_check"
4142 params := []string {
4243 "-machine" , machineClass + ",accel=kvm,usb=off" , "-global" , "kvm-pit.lost_tick_policy=discard" , "-cpu" , "host" }
4344 if _ , err := os .Stat ("/dev/kvm" ); os .IsNotExist (err ) {
4445 glog .V (1 ).Info ("kvm not exist change to no kvm mode" )
4546 params = []string {"-machine" , machineClass + ",usb=off" , "-cpu" , "core2duo" }
47+ cmdline += " clocksource=acpi_pm notsc"
4648 }
4749
4850 if boot .Bios != "" && boot .Cbfs != "" {
@@ -52,13 +54,13 @@ func (qc *QemuContext) arguments(ctx *hypervisor.VmContext) []string {
5254 } else if boot .Bios != "" {
5355 params = append (params ,
5456 "-bios" , boot .Bios ,
55- "-kernel" , boot .Kernel , "-initrd" , boot .Initrd , "-append" , "console=ttyS0 panic=1 no_timer_check" )
57+ "-kernel" , boot .Kernel , "-initrd" , boot .Initrd , "-append" , cmdline )
5658 } else if boot .Cbfs != "" {
5759 params = append (params ,
5860 "-drive" , fmt .Sprintf ("if=pflash,file=%s,readonly=on" , boot .Cbfs ))
5961 } else {
6062 params = append (params ,
61- "-kernel" , boot .Kernel , "-initrd" , boot .Initrd , "-append" , "console=ttyS0 panic=1 no_timer_check" )
63+ "-kernel" , boot .Kernel , "-initrd" , boot .Initrd , "-append" , cmdline )
6264 }
6365
6466 params = append (params ,
0 commit comments