fix(host): enable qemu log (#13278)

This commit is contained in:
Zexi Li
2022-01-21 13:19:35 +08:00
committed by GitHub
parent 9e71dd0f0f
commit b65e3eb512
2 changed files with 11 additions and 0 deletions
+5
View File
@@ -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",
+6
View File
@@ -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 {