diff --git a/pkg/hostman/guestman/qemu-kvmhelper.go b/pkg/hostman/guestman/qemu-kvmhelper.go index 392a7d6ad2..1c2d43031f 100644 --- a/pkg/hostman/guestman/qemu-kvmhelper.go +++ b/pkg/hostman/guestman/qemu-kvmhelper.go @@ -468,10 +468,10 @@ func (s *SKVMGuestInstance) _generateStartScript(data *jsonutils.JSONDict) (stri cmd += fmt.Sprintf(" -machine %s,accel=%s", s.getMachine(), accel) cmd += " -k en-us" // #cmd += " -g 800x600" - cmd += fmt.Sprintf(" -smp %d,maxcpus=128", cpu) + cmd += fmt.Sprintf(" -smp %d,maxcpus=255", cpu) cmd += fmt.Sprintf(" -name %s", name) // #cmd += fmt.Sprintf(" -uuid %s", self.desc["uuid"]) - cmd += fmt.Sprintf(" -m %dM,slots=4,maxmem=262144M", mem) + cmd += fmt.Sprintf(" -m %dM,slots=4,maxmem=524288M", mem) if s.manager.host.IsHugepagesEnabled() { cmd += fmt.Sprintf(" -mem-prealloc -mem-path %s", fmt.Sprintf("/dev/hugepages/%s", uuid)) diff --git a/pkg/hostman/hostinfo/hostinfo.go b/pkg/hostman/hostinfo/hostinfo.go index a45ad4b11b..3cf0614d7c 100644 --- a/pkg/hostman/hostinfo/hostinfo.go +++ b/pkg/hostman/hostinfo/hostinfo.go @@ -1108,8 +1108,10 @@ func (h *SHostInfo) PutHostOffline() { } func (h *SHostInfo) PutHostOnline() error { - if len(h.SysError) > 0 { + if len(h.SysError) > 0 && !options.HostOptions.StartHostIgnoreSysError { log.Fatalf("Can't put host online, unless resolve these problem %v", h.SysError) + } else if len(h.SysError) > 0 && options.HostOptions.StartHostIgnoreSysError { + log.Errorf("Host sys error: %v", h.SysError) } if len(h.SysWarning) > 0 { diff --git a/pkg/hostman/options/options.go b/pkg/hostman/options/options.go index 86195a57dd..ff4bc9a765 100644 --- a/pkg/hostman/options/options.go +++ b/pkg/hostman/options/options.go @@ -134,7 +134,8 @@ type SHostOptions struct { HostHealthTimeout int `help:"host health timeout" default:"30"` HostLeaseTimeout int `help:"lease timeout" default:"10"` - SyncStorageInfoDurationSecond int `help:"sync storage size duration, unit is second" default:"60"` + SyncStorageInfoDurationSecond int `help:"sync storage size duration, unit is second" default:"60"` + StartHostIgnoreSysError bool `help:"start host agent ignore sys error" default:"false"` } var (