mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-19 07:49:17 +00:00
Merge pull request #9402 from deagon/feat/debug-threads
qemu: show the thread name when enable the hypervisor.debug option
This commit is contained in:
@@ -2776,6 +2776,8 @@ type Config struct {
|
||||
PidFile string
|
||||
|
||||
qemuParams []string
|
||||
|
||||
Debug bool
|
||||
}
|
||||
|
||||
// appendFDs appends a list of arbitrary file descriptors to the qemu configuration and
|
||||
@@ -2812,8 +2814,15 @@ func (config *Config) appendSeccompSandbox() {
|
||||
|
||||
func (config *Config) appendName() {
|
||||
if config.Name != "" {
|
||||
var nameParams []string
|
||||
nameParams = append(nameParams, config.Name)
|
||||
|
||||
if config.Debug {
|
||||
nameParams = append(nameParams, "debug-threads=on")
|
||||
}
|
||||
|
||||
config.qemuParams = append(config.qemuParams, "-name")
|
||||
config.qemuParams = append(config.qemuParams, config.Name)
|
||||
config.qemuParams = append(config.qemuParams, strings.Join(nameParams, ","))
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -687,6 +687,7 @@ func (q *qemu) CreateVM(ctx context.Context, id string, network Network, hypervi
|
||||
Bios: firmwarePath,
|
||||
PFlash: pflash,
|
||||
PidFile: filepath.Join(q.config.VMStorePath, q.id, "pid"),
|
||||
Debug: hypervisorConfig.Debug,
|
||||
}
|
||||
|
||||
qemuConfig.Devices, qemuConfig.Bios, err = q.arch.appendProtectionDevice(qemuConfig.Devices, firmwarePath, firmwareVolumePath)
|
||||
|
Reference in New Issue
Block a user