@@ -38,11 +38,13 @@ func (qc *QemuContext) arguments(ctx *hypervisor.VmContext) []string {
38
38
cpuParams = strconv .Itoa (boot .CPU )
39
39
}
40
40
41
+ cmdline := "console=ttyS0 panic=1 no_timer_check"
41
42
params := []string {
42
43
"-machine" , machineClass + ",accel=kvm,usb=off" , "-global" , "kvm-pit.lost_tick_policy=discard" , "-cpu" , "host" }
43
44
if _ , err := os .Stat ("/dev/kvm" ); os .IsNotExist (err ) {
44
45
glog .V (1 ).Info ("kvm not exist change to no kvm mode" )
45
46
params = []string {"-machine" , machineClass + ",usb=off" , "-cpu" , "core2duo" }
47
+ cmdline += " clocksource=acpi_pm notsc"
46
48
}
47
49
48
50
if boot .Bios != "" && boot .Cbfs != "" {
@@ -52,13 +54,13 @@ func (qc *QemuContext) arguments(ctx *hypervisor.VmContext) []string {
52
54
} else if boot .Bios != "" {
53
55
params = append (params ,
54
56
"-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 )
56
58
} else if boot .Cbfs != "" {
57
59
params = append (params ,
58
60
"-drive" , fmt .Sprintf ("if=pflash,file=%s,readonly=on" , boot .Cbfs ))
59
61
} else {
60
62
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 )
62
64
}
63
65
64
66
params = append (params ,
0 commit comments