Skip to content

Commit bebaf69

Browse files
committed
VirtualBox: enable serial port logging to file
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
1 parent 40595e9 commit bebaf69

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/vbox/vbox_driver.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,12 @@ func (l *LimaVBoxDriver) Start(ctx context.Context) (chan error, error) {
171171
logrus.Debugf("modifyvm natpf1 %v %s", err, out)
172172
return nil, err
173173
}
174+
if out, err := exec.CommandContext(ctx, qExe, "modifyvm", name,
175+
"--uart1", "0x3F8", "4", // these are the "traditional values" for COM1, according to the documentation
176+
"--uartmode1", "file", filepath.Join(l.Instance.Dir, filenames.SerialLog)).CombinedOutput(); err != nil {
177+
logrus.Debugf("modifyvm uartmode %v %s", err, out)
178+
return nil, err
179+
}
174180

175181
logrus.Infof("Starting VBox (hint: to watch the boot progress, see %q)", filepath.Join(l.Instance.Dir, filenames.SerialLog))
176182
displayType := "headless"

0 commit comments

Comments
 (0)