mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix(host): enable qemu log (#13278)
This commit is contained in:
@@ -368,6 +368,11 @@ function nic_mtu() {
|
||||
input.EnableNested = guestManager.GetHost().IsNestedVirtualization()
|
||||
}
|
||||
|
||||
if options.HostOptions.LogLevel == "debug" {
|
||||
input.EnableLog = true
|
||||
input.LogPath = s.getQemuLogPath()
|
||||
}
|
||||
|
||||
// inject monitor
|
||||
input.HMPMonitor = &qemu.Monitor{
|
||||
Id: "hmqmon",
|
||||
|
||||
@@ -58,6 +58,8 @@ type GenerateStartOptionsInput struct {
|
||||
VNCPort uint
|
||||
VNCPassword bool
|
||||
IsolatedDevicesParams *isolated_device.QemuParams
|
||||
EnableLog bool
|
||||
LogPath string
|
||||
HMPMonitor *Monitor
|
||||
QMPMonitor *Monitor
|
||||
IsVdiSpice bool
|
||||
@@ -98,6 +100,10 @@ func GenerateStartOptions(
|
||||
|
||||
opts = append(opts, cpuOpt)
|
||||
|
||||
if input.EnableLog {
|
||||
opts = append(opts, drvOpt.Log(input.EnableLog, input.LogPath))
|
||||
}
|
||||
|
||||
// TODO hmp - -
|
||||
opts = append(opts, getMonitorOptions(drvOpt, input.HMPMonitor)...)
|
||||
if input.QMPMonitor != nil {
|
||||
|
||||
Reference in New Issue
Block a user