Skip to content

Commit bff63b4

Browse files
Skip using resolvconf
On systems with systemd-resolved installed, dhcpcd tries to use resolvconf to configure the dns server. Naturally this fails, as we do not have systemd &co inside the vm. Signed-off-by: Sasha Finkelstein <[email protected]>
1 parent 54bd66e commit bff63b4

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

crates/krun-guest/src/bin/krun-guest.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use std::cmp;
22
use std::os::unix::process::CommandExt as _;
33
use std::process::Command;
4-
54
use anyhow::{Context, Result};
65
use krun_guest::cli_options::options;
76
use krun_guest::fex::setup_fex;
@@ -39,6 +38,8 @@ fn main() -> Result<()> {
3938
return Err(err).context("Failed to mount filesystems, bailing out");
4039
}
4140
Command::new("/usr/lib/systemd/systemd-udevd").spawn()?;
41+
Command::new("/usr/bin/udevadm").arg("trigger").spawn()?.wait()?;
42+
Command::new("/usr/bin/udevadm").arg("settle").spawn()?.wait()?;
4243

4344
setup_fex()?;
4445

crates/krun-guest/src/net.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub fn configure_network() -> Result<()> {
2828
};
2929
if let Some(dhcpcd_path) = dhcpcd_path {
3030
let output = Command::new(dhcpcd_path)
31-
.args(["-M", "--nodev", "eth0"])
31+
.args(["-M", "eth0", "-e", "resolvconf=does-not-exist"])
3232
.output()
3333
.context("Failed to execute `dhcpcd` as child process")?;
3434
debug!(output:?; "dhcpcd output");

0 commit comments

Comments
 (0)