Skip to content

fix(qemu): fix terminal mess up in qemu based deployment#459

Open
ishaanxgupta wants to merge 2 commits intourunc-dev:mainfrom
ishaanxgupta:ishaan/qemu
Open

fix(qemu): fix terminal mess up in qemu based deployment#459
ishaanxgupta wants to merge 2 commits intourunc-dev:mainfrom
ishaanxgupta:ishaan/qemu

Conversation

@ishaanxgupta
Copy link
Contributor

Description

With QEMU, -nographic doesn’t just “disable graphics”; it also redirects the emulated VGA/serial output to the controlling terminal (stdio) and can multiplex the QEMU monitor/serial on the same stream. That output often contains control characters / escape sequences and QEMU can leave your terminal in a weird state when it exits (so you need reset / stty sane).

Replaced -nographic with:

  • display none (or -vga none -display none)
  • serial stdio
  • monitor none

Related issues

LLM usage

N/A

Checklist

  • I have read the contribution guide.
  • The linter passes locally (make lint).
  • The e2e tests of at least one tool pass locally (make test_ctr, make test_nerdctl, make test_docker, make test_crictl).
  • If LLMs were used: I have read the llm policy.

@netlify
Copy link

netlify bot commented Feb 7, 2026

Deploy Preview for urunc ready!

Name Link
🔨 Latest commit d471664
🔍 Latest deploy log https://app.netlify.com/projects/urunc/deploys/69935b679d50f400085bcd51
😎 Deploy Preview https://deploy-preview-459--urunc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ishaanxgupta
Copy link
Contributor Author

as per discussion in #440 (comment)
@cmainas please have a look

@spline2hg
Copy link
Contributor

spline2hg commented Feb 7, 2026

Hi @ishaanxgupta, thanks for working on this.
Would it be possible to add screen recordings showing the behavior before and after the change?
That would make the change easier to understand.

Also, u need to format the code with go fmt.

@ishaanxgupta
Copy link
Contributor Author

Sure @spline2hg

@ishaanxgupta
Copy link
Contributor Author

@cmainas please have a look, the tests should pass this time

@cmainas
Copy link
Contributor

cmainas commented Feb 16, 2026

Hello @ishaanxgupta ,

you will need to rebase over urunc's main branch so we can merge this.

Signed-off-by: Ishaan Gupta <ishaankone@gmail.com>
Signed-off-by: Ishaan Gupta <ishaankone@gmail.com>
@cmainas
Copy link
Contributor

cmainas commented Feb 16, 2026

Hello @ishaanxgupta ,

it seems there is an issue with docker. For example:

$ sudo docker run --rm -it --runtime io.containerd.urunc.v2 harbor.nbfc.io/nubificus/urunc/redis-qemu-linux-raw:latest
Unable to find image 'harbor.nbfc.io/nubificus/urunc/redis-qemu-linux-raw:latest' locally
latest: Pulling from nubificus/urunc/redis-qemu-linux-raw
f18232174bc9: Pull complete 
9826632aa5dd: Pull complete 
2e7279224f08: Pull complete 
b782747b1d52: Pull complete 
878a56611471: Pull complete 
4f4fb700ef54: Pull complete 
64136cebabc3: Pull complete 
3eab733900b0: Pull complete 
e3a1471f3424: Pull complete 
2d0ac744b2c2: Pull complete 
Digest: sha256:2b350986ba047f80fca90f28868c0d3c5f290f7b1922e67a5fddcb7438dac72e
Status: Downloaded newer image for harbor.nbfc.io/nubificus/urunc/redis-qemu-linux-raw:latest
[2026-02-16T18:18:01Z INFO  virtiofsd] Waiting for vhost-user socket connection...
[2026-02-16T18:18:01Z INFO  virtiofsd] Client connected, servicing requests
qemu-system-x86_64: -serial stdio: cannot use stdio by multiple character devices
qemu-system-x86_64: -serial stdio: could not connect serial device to character backend 'stdio'
[2026-02-16T18:18:01Z INFO  virtiofsd] Client disconnected, shutting down

@ishaanxgupta
Copy link
Contributor Author

@cmainas sorry, the issue is a duplicate -serial stdio flag. This PR changed qemu.go from -nographic to -display none -vga none -serial stdio -monitor null, but linux.go - MonitorCli() also appends -serial stdio -nodefaults as extra args. QEMU rejects two character devices bound to the same stdio backend.

@cmainas
Copy link
Contributor

cmainas commented Feb 16, 2026

@cmainas sorry, the issue is a duplicate -serial stdio flag. This PR changed qemu.go from -nographic to -display none -vga none -serial stdio -monitor null, but linux.go - MonitorCli() also appends -serial stdio -nodefaults as extra args. QEMU rejects two character devices bound to the same stdio backend.

Yeah that is totally correct. You can remove it from Linux then.

@cmainas
Copy link
Contributor

cmainas commented Feb 16, 2026

Also, please squash your commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix terminal mess up in Qemu based deployments

3 participants