-
Notifications
You must be signed in to change notification settings - Fork 14
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
Added support for using a custom QEMU binary #92
Conversation
src/qemu.rs
Outdated
|
||
let mut c = Command::new(format!("qemu-system-{}", target.arch)); | ||
// |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
b1ef914
to
3a7ea09
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the PR! lgtm modulo nit
src/qemu.rs
Outdated
// Confirm QEMU exists first | ||
if let Err(e) = Command::new(&program) | ||
.arg("--help") | ||
.stdout(Stdio::null()) | ||
.stderr(Stdio::null()) | ||
.spawn() | ||
{ | ||
if let ErrorKind::NotFound = e.kind() { | ||
return Err(e).context(format!( | ||
"Did not find QEMU binary {program}. Make sure QEMU is installed" | ||
)); | ||
} else { | ||
warn!("Failed to verify that qemu is installed due to error, continuing... {e}"); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind pulling this out into a helper function? Just so the main logic in this function is a bit more compact
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! Let me do that. I'll take a little bit to continue, I need to wait for a thumbs up from work about a couple things, but I'll get back to you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay. Lmk if this is what you meant
3a7ea09
to
13c072c
Compare
13c072c
to
8749032
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! thanks!
I've been looking into getting
vmtest
to work on a RHEL 8 system. After some digging me and @javierhonduco did, we found that one of the issues is that RHEL's QEMU installation is substantially different from most other Linux distros, as it does not createqemu-system-*
binaries, but instead has a binary in/usr/libexec/qemu-kvm
. In order to further test, overriding the binary path used to find QEMU would be extremely helpful. This PR does that.Manual Testing
Ran this on a RHEL machine:
The former failed to launch QEMU (with a clearer error message than before), the latter failed to start after launching QEMU (RHEL 8 does not support 9p from what we were able to find).