Skip to content

Commit b699cb7

Browse files
committed
qemu: virtio-serial-pci: set max_ports=1
Apparently fix issue 1689 and 1691 Signed-off-by: Akihiro Suda <[email protected]>
1 parent 6fba254 commit b699cb7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/qemu/qemu.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,8 @@ func Cmdline(cfg Config) (string, []string, error) {
830830
}
831831
const serialvChardev = "char-serial-virtio"
832832
args = append(args, "-chardev", fmt.Sprintf("socket,id=%s,path=%s,server=on,wait=off,logfile=%s", serialvChardev, serialvSock, serialvLog))
833-
args = append(args, "-device", "virtio-serial-pci,id=virtio-serial0")
833+
// max_ports=1 is required for https://github.com/lima-vm/lima/issues/1689 https://github.com/lima-vm/lima/issues/1691
834+
args = append(args, "-device", "virtio-serial-pci,id=virtio-serial0,max_ports=1")
834835
args = append(args, "-device", fmt.Sprintf("virtconsole,chardev=%s,id=console0", serialvChardev))
835836

836837
// We also want to enable vsock here, but QEMU does not support vsock for macOS hosts

0 commit comments

Comments
 (0)