-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
console not working #115
Comments
Hi, which version of virtme-ng are you using? We had this console issue in fedora (and other distro using a recent version of qemu), that should be fixed now by 4aab16e, included in v1.23. |
Im on 1.25 [jimc@frodo x0]$ qemu-x86_64 --version I rolled back to v1.22 to test that, same result. but rolling back to v1.20 did work - I have console again. that said, inside the vm, vng still shows v1.22 [ 2.665666] virtme-ng-init: Starting systemd-udevd version 255.6-1.fc40 [root@v6 linux.git]# virtme v1.21 breaks console [jimc@frodo x0]$ vrun_ Decompressing Linux... Parsing ELF... Performing relocations... done. and the working 1.20 run [jimc@frodo x0]$ vrun_ Decompressing Linux... Parsing ELF... Performing relocations... done. [jimc@frodo virtme-ng.git]$ git bisect bad
virtme/architectures.py | 8 ++++---- [jimc@frodo virtme-ng.git]$ git bisect log status: waiting for both good and bad commitsbad: [47c7b57] virtme-ng v1.21git bisect bad 47c7b57 status: waiting for good commit(s), bad commit knowngood: [00caf60] virtme-ng v1.20git bisect good 00caf60 bad: [eacf6bb] virtme-ng: fix sending kernel log to stderr in script modegit bisect bad eacf6bb bad: [ef77b37] doc: replace the screenshot with a video in README.mdgit bisect bad ef77b37 bad: [a28ac8b] Merge pull request #66 from arighi/kernel-log-stderrgit bisect bad a28ac8b bad: [f3749da] virtme-ng: redirect kernel log to stderr in interactive modegit bisect bad f3749da first bad commit: [f3749da] virtme-ng: redirect kernel log to stderr in interactive mode[jimc@frodo virtme-ng.git]$ I did just this between each step [jimc@frodo virtme-ng.git]$ BUILD_VIRTME_NG_INIT=1 pip3 install --verbose -r requirements.txt . I perused the patch, contemplated hacking out the virtme-console, |
Thanks for tracking this down and sorry for the late response, I've been traveling to conferences recently. I can't reproduce this on Ubuntu, Debian, or Arch, so there's probably something in the fc40 environment that is preventing to create the console device. Few questions. Is the console working if you run vng without Have you tried to boot the stock fc40 kernel? (I'm wondering if your kernel may be missing a specific config required by the virtioconsole) Is this a fairly standard fc40 installation? Do you see any potential security-related restrictions that may prevent qemu/vng from redirecting stdin/stdout/stderr in the guest (i.e., SELinux, AppArmor rules, ...) |
running stock 6.8.11-300.fc40.x86_64 I branched and did rebase -i 3bc27ae (tag: fedora-console-a1, fedora-console) qemu: remove unnecessary '-serial none' arg
So at this point Ive got a working setup. I'll spend some time soon to figure out which part breaks on fedora |
Hm... I'm confused... I think you already found that the problem was introduced in Unfortunately I don't have a fedora box at the moment, I'll try to install one in the next days and try to reproduce the problem. |
the problem is that patch. to be sure, I "floated" the commit (and 2 which needed it) the problem moves with it. so I can use HEAD~3 on the reordered fork, [jimc@frodo virtme-ng.git]$ git log --oneline -n4 fedora-console This way I get the latest features, (except the 1) so not front burner afaic separately - we have --custom # load conf=val s from a file could we also have --custom-item "CONFIG_FOO=m" it means needing fewer custom-fragment files, it also makes it super clear when scripting variations on a baseline --custom file --conf-item=CONFIG_KMEMLEAK=y or maybe even drop the /^CONFIG_/ |
ok I think I understand now, you rebased re-adding the patches that are introducing the console issue on top, so that you can follow the development and quickly revert the problematic commits. The problem is for sure introduced by the stderr redirection, but I don't want to revert that commit, because this feature is super useful, also it works on all the other distro, so we just need to understand what fedora is doing differently. I'm planning to allocate some time to prepare a fc40 box in the next days and try to repeat this issue. About the config change feel free to send a PR if you want and I'll be happy to review / apply it, it seems useful. |
ok, for some reason, I cant push my config-item branch to my own fork of your repo. |
oh... that is odd, if it's in your namespace you should have all the permissions... anyway, an email is also fine :) |
One thing I haven't asked (I think)... have you tried to run vng with |
I havent tried that related to that, when I switched just now from my config-item branch Previously when that happened, I just did git reset --hard, anyway, VIOLA ! IT WORKS [jimc@virtme-ng virtme-ng.git]$ QEMU: Terminated [jimc@virtme-ng virtme-ng.git]$ (the 2nd prompt means the console saw my ) so this is good. might it be useful to bisect on the submodule version ? |
ok, that's what I was suspecting, you updated virtme-ng, but not the virtme-ng-init module. Usually I run In this case after switching to the new stderr redirection you were still using the old "init", that's why the console didn't work. I guess it's all solved now, just remember to update virtme-ng-init every time you update virtme-ng from git. And try We can probably close this now (if you see other issues feel free to re-open it), thanks for testing and reporting this! |
not quite that simple. I do have this in my .git/config, I think that means I did the recursive init but after doing git reset --hard HEAD, [jimc@frodo virtme-ng.git]$ git diff I must be doing this wrong :-} |
apparently, Im _detached_/ :-) [jimc@frodo virtme_ng_init]$ git fetch I fixed this, with cd into submod then this fixes git diff in parent. 35 ./vng -vr 35 breaks, 36 works. its obviously low priority here, so I'll take a few hints, |
Are you recompiling virtme-ng-init after updating the submodule? |
On Sat, Jun 15, 2024 at 4:45 PM Andrea Righi ***@***.***> wrote:
Are you recompiling virtme-ng-init after updating the submodule?
oh, you mean, like:
***@***.*** virtme-ng.git]$ make
cd virtme_ng_init && cargo install --path . --root ../virtme/guest
Installing virtme-ng-init v0.1.0
(/home/jimc/projects/virtme-ng.git/virtme_ng_init)
Updating crates.io index
Compiling virtme-ng-init v0.1.0
(/home/jimc/projects/virtme-ng.git/virtme_ng_init)
Finished `release` profile [optimized] target(s) in 1.63s
Replacing ../virtme/guest/bin/virtme-ng-init
Replaced package `virtme-ng-init v0.1.0
(/home/jimc/projects/virtme-ng.git/virtme_ng_init)` with
`virtme-ng-init v0.1.0
(/home/jimc/projects/virtme-ng.git/virtme_ng_init)` (executable
`virtme-ng-init`)
warning: be sure to add `../virtme/guest/bin` to your PATH to be able
to run the installed binaries
and with that, this now works:
***@***.*** virtme-ng.git]$ ./vng -vr
so, thanks for all your help isolating this,
sorry for the noise.
|
Yep, exactly, virtme-ng-init is a Rust project, so it requires a |
Ive lost my console.
I just checked out v6.9 (unaltered),
created ./builds/x0 subdir for output,
copied Makefile from ./builds/bar; its a 1-liner:
[jimc@frodo x0]$ cat Makefile
Automatically generated by /home/jimc/projects/lx/linux.git/Makefile: don't edit
include /home/jimc/projects/lx/linux.git/Makefile
and ran vng -bv there.
the kernel builds cleanly, and boots fine, but console is un-responsive
except that ^ax will terminate the QEMU session.
all builds/foos in all my worktrees now have this problem.
Any idea what might be causing this ?
Ive done nothing to alter QEMU setup / install
all qemu-* parts are from fedora fc40, unaltered.
(rpm -vvV qemu-kvm to verify it)
The text was updated successfully, but these errors were encountered: