guest: set hostname from launch config

This commit is contained in:
Alex Zenla
2024-03-31 03:18:56 +00:00
parent 6cd8cc12db
commit 377b837db9
3 changed files with 20 additions and 1 deletions

View File

@ -64,6 +64,12 @@ impl GuestLauncher {
let ipv6_network_mask: u32 = 10;
let launch_config = LaunchInfo {
hostname: Some(
request
.name
.map(|x| x.to_string())
.unwrap_or_else(|| format!("krata-{}", uuid)),
),
network: Some(LaunchNetwork {
link: "eth0".to_string(),
ipv4: LaunchNetworkIpv4 {