tests: Add second network interface definition to guest
Add a second L1 network interface definition to the guest Cloud Init configuration, including an additional host IP. Do this by splitting the network range into two /25s. For clarity the network struct members have also been renamed. Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
This commit is contained in:
parent
4290d4f20e
commit
11eabaf97d
4 changed files with 99 additions and 83 deletions
|
|
@ -119,8 +119,8 @@ pub fn performance_net_throughput(control: &PerformanceTestControl) -> f64 {
|
|||
let num_queues = control.num_queues.unwrap();
|
||||
let queue_size = control.queue_size.unwrap();
|
||||
let net_params = format!(
|
||||
"tap=,mac={},ip={},mask=255.255.255.0,num_queues={},queue_size={}",
|
||||
guest.network.guest_mac, guest.network.host_ip, num_queues, queue_size,
|
||||
"tap=,mac={},ip={},mask=255.255.255.128,num_queues={},queue_size={}",
|
||||
guest.network.guest_mac0, guest.network.host_ip0, num_queues, queue_size,
|
||||
);
|
||||
|
||||
let mut child = GuestCommand::new(&guest)
|
||||
|
|
@ -160,8 +160,8 @@ pub fn performance_net_latency(control: &PerformanceTestControl) -> f64 {
|
|||
let num_queues = control.num_queues.unwrap();
|
||||
let queue_size = control.queue_size.unwrap();
|
||||
let net_params = format!(
|
||||
"tap=,mac={},ip={},mask=255.255.255.0,num_queues={},queue_size={}",
|
||||
guest.network.guest_mac, guest.network.host_ip, num_queues, queue_size,
|
||||
"tap=,mac={},ip={},mask=255.255.255.128,num_queues={},queue_size={}",
|
||||
guest.network.guest_mac0, guest.network.host_ip0, num_queues, queue_size,
|
||||
);
|
||||
|
||||
let mut child = GuestCommand::new(&guest)
|
||||
|
|
|
|||
|
|
@ -4,23 +4,29 @@ ethernets:
|
|||
match:
|
||||
macaddress: 12:34:56:78:90:ab
|
||||
addresses:
|
||||
- 192.168.2.2/24
|
||||
- 192.168.2.2/25
|
||||
gateway4: 192.168.2.1
|
||||
id1:
|
||||
match:
|
||||
macaddress: de:ad:be:ef:12:34
|
||||
addresses:
|
||||
- 192.168.2.3/24
|
||||
- 192.168.2.3/25
|
||||
gateway4: 192.168.2.1
|
||||
id2:
|
||||
match:
|
||||
macaddress: de:ad:be:ef:34:56
|
||||
addresses:
|
||||
- 192.168.2.4/24
|
||||
- 192.168.2.4/25
|
||||
gateway4: 192.168.2.1
|
||||
id3:
|
||||
match:
|
||||
macaddress: de:ad:be:ef:56:78
|
||||
addresses:
|
||||
- 192.168.2.5/24
|
||||
- 192.168.2.5/25
|
||||
gateway4: 192.168.2.1
|
||||
id4:
|
||||
match:
|
||||
macaddress: de:ad:be:ef:78:90
|
||||
addresses:
|
||||
- 192.168.2.130/25
|
||||
gateway4: 192.168.2.129
|
||||
|
|
|
|||
|
|
@ -57,12 +57,15 @@ pub enum Error {
|
|||
}
|
||||
|
||||
pub struct GuestNetworkConfig {
|
||||
pub guest_ip: String,
|
||||
pub guest_ip0: String,
|
||||
pub host_ip0: String,
|
||||
pub guest_mac0: String,
|
||||
pub guest_ip1: String,
|
||||
pub host_ip1: String,
|
||||
pub guest_mac1: String,
|
||||
pub l2_guest_ip1: String,
|
||||
pub l2_guest_ip2: String,
|
||||
pub l2_guest_ip3: String,
|
||||
pub host_ip: String,
|
||||
pub guest_mac: String,
|
||||
pub l2_guest_mac1: String,
|
||||
pub l2_guest_mac2: String,
|
||||
pub l2_guest_mac3: String,
|
||||
|
|
@ -92,7 +95,7 @@ impl GuestNetworkConfig {
|
|||
let start = std::time::Instant::now();
|
||||
// The 'port' is unique per 'GUEST' and listening to wild-card ip avoids retrying on 'TcpListener::bind()'
|
||||
let listen_addr = format!("0.0.0.0:{}", self.tcp_listener_port);
|
||||
let expected_guest_addr = self.guest_ip.as_str();
|
||||
let expected_guest_addr = self.guest_ip0.as_str();
|
||||
let mut s = String::new();
|
||||
let timeout = match custom_timeout {
|
||||
Some(t) => t,
|
||||
|
|
@ -277,7 +280,7 @@ impl DiskConfig for UbuntuDiskConfig {
|
|||
"@DEFAULT_TCP_LISTENER_MESSAGE",
|
||||
DEFAULT_TCP_LISTENER_MESSAGE,
|
||||
);
|
||||
user_data_string = user_data_string.replace("@HOST_IP", &network.host_ip);
|
||||
user_data_string = user_data_string.replace("@HOST_IP", &network.host_ip0);
|
||||
user_data_string =
|
||||
user_data_string.replace("@TCP_LISTENER_PORT", &network.tcp_listener_port.to_string());
|
||||
|
||||
|
|
@ -293,13 +296,17 @@ impl DiskConfig for UbuntuDiskConfig {
|
|||
.read_to_string(&mut network_config_string)
|
||||
.expect("Expected reading network-config file to succeed");
|
||||
|
||||
network_config_string = network_config_string.replace("192.168.2.1", &network.host_ip);
|
||||
network_config_string = network_config_string.replace("192.168.2.2", &network.guest_ip);
|
||||
network_config_string = network_config_string.replace("192.168.2.1", &network.host_ip0);
|
||||
network_config_string = network_config_string.replace("192.168.2.2", &network.guest_ip0);
|
||||
network_config_string = network_config_string.replace("192.168.2.129", &network.host_ip1);
|
||||
network_config_string = network_config_string.replace("192.168.2.130", &network.guest_ip1);
|
||||
network_config_string = network_config_string.replace("192.168.2.3", &network.l2_guest_ip1);
|
||||
network_config_string = network_config_string.replace("192.168.2.4", &network.l2_guest_ip2);
|
||||
network_config_string = network_config_string.replace("192.168.2.5", &network.l2_guest_ip3);
|
||||
network_config_string =
|
||||
network_config_string.replace("12:34:56:78:90:ab", &network.guest_mac);
|
||||
network_config_string.replace("12:34:56:78:90:ab", &network.guest_mac0);
|
||||
network_config_string =
|
||||
network_config_string.replace("de:ad:be:ef:78:90", &network.guest_mac1);
|
||||
network_config_string =
|
||||
network_config_string.replace("de:ad:be:ef:12:34", &network.l2_guest_mac1);
|
||||
network_config_string =
|
||||
|
|
@ -858,12 +865,15 @@ impl Guest {
|
|||
let tmp_dir = TempDir::new_with_prefix("/tmp/ch").unwrap();
|
||||
|
||||
let network = GuestNetworkConfig {
|
||||
guest_ip: format!("{class}.{id}.2"),
|
||||
guest_ip0: format!("{class}.{id}.2"),
|
||||
host_ip0: format!("{class}.{id}.1"),
|
||||
guest_mac0: format!("12:34:56:78:90:{id:02x}"),
|
||||
guest_ip1: format!("{class}.{id}.130"),
|
||||
host_ip1: format!("{class}.{id}.129"),
|
||||
guest_mac1: format!("de:ad:be:ef:78:{id:02x}"),
|
||||
l2_guest_ip1: format!("{class}.{id}.3"),
|
||||
l2_guest_ip2: format!("{class}.{id}.4"),
|
||||
l2_guest_ip3: format!("{class}.{id}.5"),
|
||||
host_ip: format!("{class}.{id}.1"),
|
||||
guest_mac: format!("12:34:56:78:90:{id:02x}"),
|
||||
l2_guest_mac1: format!("de:ad:be:ef:12:{id:02x}"),
|
||||
l2_guest_mac2: format!("de:ad:be:ef:34:{id:02x}"),
|
||||
l2_guest_mac3: format!("de:ad:be:ef:56:{id:02x}"),
|
||||
|
|
@ -889,29 +899,29 @@ impl Guest {
|
|||
|
||||
pub fn default_net_string(&self) -> String {
|
||||
format!(
|
||||
"tap=,mac={},ip={},mask=255.255.255.0",
|
||||
self.network.guest_mac, self.network.host_ip
|
||||
"tap=,mac={},ip={},mask=255.255.255.128",
|
||||
self.network.guest_mac0, self.network.host_ip0
|
||||
)
|
||||
}
|
||||
|
||||
pub fn default_net_string_w_iommu(&self) -> String {
|
||||
format!(
|
||||
"tap=,mac={},ip={},mask=255.255.255.0,iommu=on",
|
||||
self.network.guest_mac, self.network.host_ip
|
||||
"tap=,mac={},ip={},mask=255.255.255.128,iommu=on",
|
||||
self.network.guest_mac0, self.network.host_ip0
|
||||
)
|
||||
}
|
||||
|
||||
pub fn default_net_string_w_mtu(&self, mtu: u16) -> String {
|
||||
format!(
|
||||
"tap=,mac={},ip={},mask=255.255.255.0,mtu={}",
|
||||
self.network.guest_mac, self.network.host_ip, mtu
|
||||
"tap=,mac={},ip={},mask=255.255.255.128,mtu={}",
|
||||
self.network.guest_mac0, self.network.host_ip0, mtu
|
||||
)
|
||||
}
|
||||
|
||||
pub fn ssh_command(&self, command: &str) -> Result<String, SshCommandError> {
|
||||
ssh_command_ip(
|
||||
command,
|
||||
&self.network.guest_ip,
|
||||
&self.network.guest_ip0,
|
||||
DEFAULT_SSH_RETRIES,
|
||||
DEFAULT_SSH_TIMEOUT,
|
||||
)
|
||||
|
|
@ -921,7 +931,7 @@ impl Guest {
|
|||
pub fn ssh_command_l1(&self, command: &str) -> Result<String, SshCommandError> {
|
||||
ssh_command_ip(
|
||||
command,
|
||||
&self.network.guest_ip,
|
||||
&self.network.guest_ip0,
|
||||
DEFAULT_SSH_RETRIES,
|
||||
DEFAULT_SSH_TIMEOUT,
|
||||
)
|
||||
|
|
@ -963,8 +973,8 @@ impl Guest {
|
|||
cpu_count,
|
||||
kernel_path,
|
||||
kernel_cmd,
|
||||
self.network.host_ip,
|
||||
self.network.guest_mac,
|
||||
self.network.host_ip0,
|
||||
self.network.guest_mac0,
|
||||
self.disk_config.disk(DiskType::OperatingSystem).unwrap().as_str(),
|
||||
self.disk_config.disk(DiskType::CloudInit).unwrap().as_str(),
|
||||
}
|
||||
|
|
@ -1109,7 +1119,7 @@ impl Guest {
|
|||
pub fn check_vsock(&self, socket: &str) {
|
||||
// Listen from guest on vsock CID=3 PORT=16
|
||||
// SOCKET-LISTEN:<domain>:<protocol>:<local-address>
|
||||
let guest_ip = self.network.guest_ip.clone();
|
||||
let guest_ip = self.network.guest_ip0.clone();
|
||||
let listen_socat = thread::spawn(move || {
|
||||
ssh_command_ip("sudo socat - SOCKET-LISTEN:40:0:x00x00x10x00x00x00x03x00x00x00x00x00x00x00 > vsock_log", &guest_ip, DEFAULT_SSH_RETRIES, DEFAULT_SSH_TIMEOUT).unwrap();
|
||||
});
|
||||
|
|
@ -1612,7 +1622,7 @@ pub fn measure_virtio_net_throughput(
|
|||
cmd.args([
|
||||
"-J", // Output in JSON format
|
||||
"-c",
|
||||
&guest.network.guest_ip,
|
||||
&guest.network.guest_ip0,
|
||||
"-p",
|
||||
&format!("{}", default_port + n),
|
||||
"-t",
|
||||
|
|
@ -1710,7 +1720,7 @@ pub fn measure_virtio_net_latency(guest: &Guest, test_timeout: u32) -> Result<Ve
|
|||
scp_to_guest(
|
||||
Path::new(ethr_path),
|
||||
Path::new(ethr_remote_path),
|
||||
&guest.network.guest_ip,
|
||||
&guest.network.guest_ip0,
|
||||
//DEFAULT_SSH_RETRIES,
|
||||
1,
|
||||
DEFAULT_SSH_TIMEOUT,
|
||||
|
|
@ -1732,7 +1742,7 @@ pub fn measure_virtio_net_latency(guest: &Guest, test_timeout: u32) -> Result<Ve
|
|||
let mut c = Command::new(ethr_path)
|
||||
.args([
|
||||
"-c",
|
||||
&guest.network.guest_ip,
|
||||
&guest.network.guest_ip0,
|
||||
"-t",
|
||||
"l",
|
||||
"-o",
|
||||
|
|
|
|||
|
|
@ -369,7 +369,7 @@ fn _test_api_pause_resume(target_api: TargetApi, guest: Guest) {
|
|||
// SSH into the VM should fail
|
||||
ssh_command_ip(
|
||||
"grep -c processor /proc/cpuinfo",
|
||||
&guest.network.guest_ip,
|
||||
&guest.network.guest_ip0,
|
||||
2,
|
||||
5,
|
||||
)
|
||||
|
|
@ -575,7 +575,7 @@ fn prepare_vhost_user_net_daemon(
|
|||
|
||||
// Start the daemon
|
||||
let mut net_params = format!(
|
||||
"ip={ip},mask=255.255.255.0,socket={vunet_socket_path},num_queues={num_queues},queue_size=1024,client={client_mode}"
|
||||
"ip={ip},mask=255.255.255.128,socket={vunet_socket_path},num_queues={num_queues},queue_size=1024,client={client_mode}"
|
||||
);
|
||||
|
||||
if let Some(tap) = tap {
|
||||
|
|
@ -777,7 +777,7 @@ fn setup_ovs_dpdk_guests(
|
|||
.ssh_command(&format!("sudo ip link set up dev {guest_net_iface}"))
|
||||
.unwrap();
|
||||
|
||||
let guest_ip = guest1.network.guest_ip.clone();
|
||||
let guest_ip = guest1.network.guest_ip0.clone();
|
||||
thread::spawn(move || {
|
||||
ssh_command_ip(
|
||||
"nc -l 12345",
|
||||
|
|
@ -1221,7 +1221,7 @@ fn test_vhost_user_net(
|
|||
|
||||
let (mut daemon_command, vunet_socket_path) = prepare_daemon(
|
||||
&guest.tmp_dir,
|
||||
&guest.network.host_ip,
|
||||
&guest.network.host_ip0,
|
||||
tap,
|
||||
mtu,
|
||||
num_queues,
|
||||
|
|
@ -1230,7 +1230,7 @@ fn test_vhost_user_net(
|
|||
|
||||
let net_params = format!(
|
||||
"vhost_user=true,mac={},socket={},num_queues={},queue_size=1024{},vhost_mode={},mtu=3000",
|
||||
guest.network.guest_mac,
|
||||
guest.network.guest_mac0,
|
||||
vunet_socket_path,
|
||||
num_queues,
|
||||
if let Some(host_mac) = host_mac {
|
||||
|
|
@ -4021,8 +4021,8 @@ mod common_parallel {
|
|||
.args([
|
||||
"--net",
|
||||
guest.default_net_string().as_str(),
|
||||
"tap=,mac=8a:6b:6f:5a:de:ac,ip=192.168.3.1,mask=255.255.255.0",
|
||||
"tap=mytap1,mac=fe:1f:9e:e1:60:f2,ip=192.168.4.1,mask=255.255.255.0",
|
||||
"tap=,mac=8a:6b:6f:5a:de:ac,ip=192.168.3.1,mask=255.255.255.128",
|
||||
"tap=mytap1,mac=fe:1f:9e:e1:60:f2,ip=192.168.4.1,mask=255.255.255.128",
|
||||
])
|
||||
.capture_output()
|
||||
.spawn()
|
||||
|
|
@ -4608,7 +4608,7 @@ mod common_parallel {
|
|||
])
|
||||
.args([
|
||||
"--net",
|
||||
format!("tap={},mac={}", vfio_tap0, guest.network.guest_mac).as_str(),
|
||||
format!("tap={},mac={}", vfio_tap0, guest.network.guest_mac0).as_str(),
|
||||
format!(
|
||||
"tap={},mac={},iommu=on",
|
||||
vfio_tap1, guest.network.l2_guest_mac1
|
||||
|
|
@ -4873,7 +4873,7 @@ mod common_parallel {
|
|||
.args([
|
||||
"--net",
|
||||
guest.default_net_string().as_str(),
|
||||
"tap=,mac=8a:6b:6f:5a:de:ac,ip=192.168.3.1,mask=255.255.255.0",
|
||||
"tap=,mac=8a:6b:6f:5a:de:ac,ip=192.168.3.1,mask=255.255.255.128",
|
||||
])
|
||||
.capture_output()
|
||||
.spawn()
|
||||
|
|
@ -5864,7 +5864,7 @@ mod common_parallel {
|
|||
|
||||
// Spawn a command inside the guest to consume 2GiB of RAM for 60
|
||||
// seconds
|
||||
let guest_ip = guest.network.guest_ip.clone();
|
||||
let guest_ip = guest.network.guest_ip0.clone();
|
||||
thread::spawn(move || {
|
||||
ssh_command_ip(
|
||||
"stress --vm 1 --vm-bytes 2G --vm-keep --timeout 60",
|
||||
|
|
@ -6513,7 +6513,7 @@ mod common_parallel {
|
|||
let taps = net_util::open_tap(
|
||||
Some("chtap0"),
|
||||
Some(std::net::IpAddr::V4(
|
||||
std::net::Ipv4Addr::from_str(&guest.network.host_ip).unwrap(),
|
||||
std::net::Ipv4Addr::from_str(&guest.network.host_ip0).unwrap(),
|
||||
)),
|
||||
None,
|
||||
&mut None,
|
||||
|
|
@ -6535,7 +6535,7 @@ mod common_parallel {
|
|||
"fd=[{},{}],mac={},num_queues={}",
|
||||
taps[0].as_raw_fd(),
|
||||
taps[1].as_raw_fd(),
|
||||
guest.network.guest_mac,
|
||||
guest.network.guest_mac0,
|
||||
num_queue_pairs * 2
|
||||
),
|
||||
])
|
||||
|
|
@ -6606,7 +6606,7 @@ mod common_parallel {
|
|||
assert!(
|
||||
exec_host_command_status(&format!(
|
||||
"sudo ip link set {} address {} up",
|
||||
guest_macvtap_name, guest.network.guest_mac
|
||||
guest_macvtap_name, guest.network.guest_mac0
|
||||
))
|
||||
.success()
|
||||
);
|
||||
|
|
@ -6638,7 +6638,7 @@ mod common_parallel {
|
|||
assert!(
|
||||
exec_host_command_status(&format!(
|
||||
"sudo ip address add {}/24 dev {}",
|
||||
guest.network.host_ip, host_macvtap_name
|
||||
guest.network.host_ip0, host_macvtap_name
|
||||
))
|
||||
.success()
|
||||
);
|
||||
|
|
@ -6658,7 +6658,7 @@ mod common_parallel {
|
|||
|
||||
let net_params = format!(
|
||||
"fd=[{},{}],mac={},num_queues=4",
|
||||
tap_fd1, tap_fd2, guest.network.guest_mac
|
||||
tap_fd1, tap_fd2, guest.network.guest_mac0
|
||||
);
|
||||
|
||||
if !hotplug {
|
||||
|
|
@ -6760,7 +6760,7 @@ mod common_parallel {
|
|||
assert!(exec_host_command_status("ovs-vsctl del-port vhost-user1").success());
|
||||
|
||||
// Spawn a new netcat listener in the first VM
|
||||
let guest_ip = guest1.network.guest_ip.clone();
|
||||
let guest_ip = guest1.network.guest_ip0.clone();
|
||||
thread::spawn(move || {
|
||||
ssh_command_ip(
|
||||
"nc -l 12345",
|
||||
|
|
@ -6829,7 +6829,7 @@ mod common_parallel {
|
|||
assert!(remote_command(&api_socket_restored, "resume", None));
|
||||
|
||||
// Spawn a new netcat listener in the first VM
|
||||
let guest_ip = guest1.network.guest_ip.clone();
|
||||
let guest_ip = guest1.network.guest_ip0.clone();
|
||||
thread::spawn(move || {
|
||||
ssh_command_ip(
|
||||
"nc -l 12345",
|
||||
|
|
@ -7487,8 +7487,8 @@ mod ivshmem {
|
|||
let console_text = String::from("On a branch floating down river a cricket, singing.");
|
||||
let net_id = "net123";
|
||||
let net_params = format!(
|
||||
"id={},tap=,mac={},ip={},mask=255.255.255.0",
|
||||
net_id, guest.network.guest_mac, guest.network.host_ip
|
||||
"id={},tap=,mac={},ip={},mask=255.255.255.128",
|
||||
net_id, guest.network.guest_mac0, guest.network.host_ip0
|
||||
);
|
||||
|
||||
let memory_param: &[&str] = if local {
|
||||
|
|
@ -7963,8 +7963,8 @@ mod common_sequential {
|
|||
|
||||
let net_id = "net123";
|
||||
let net_params = format!(
|
||||
"id={},tap=,mac={},ip={},mask=255.255.255.0",
|
||||
net_id, guest.network.guest_mac, guest.network.host_ip
|
||||
"id={},tap=,mac={},ip={},mask=255.255.255.128",
|
||||
net_id, guest.network.guest_mac0, guest.network.host_ip0
|
||||
);
|
||||
let mut mem_params = "size=2G";
|
||||
|
||||
|
|
@ -8223,7 +8223,7 @@ mod common_sequential {
|
|||
let taps = net_util::open_tap(
|
||||
Some(tap_name),
|
||||
Some(std::net::IpAddr::V4(
|
||||
std::net::Ipv4Addr::from_str(&guest.network.host_ip).unwrap(),
|
||||
std::net::Ipv4Addr::from_str(&guest.network.host_ip0).unwrap(),
|
||||
)),
|
||||
None,
|
||||
&mut None,
|
||||
|
|
@ -8233,12 +8233,12 @@ mod common_sequential {
|
|||
)
|
||||
.unwrap();
|
||||
let net_params = format!(
|
||||
"id={},fd=[{},{}],mac={},ip={},mask=255.255.255.0,num_queues={}",
|
||||
"id={},fd=[{},{}],mac={},ip={},mask=255.255.255.128,num_queues={}",
|
||||
net_id,
|
||||
taps[0].as_raw_fd(),
|
||||
taps[1].as_raw_fd(),
|
||||
guest.network.guest_mac,
|
||||
guest.network.host_ip,
|
||||
guest.network.guest_mac0,
|
||||
guest.network.host_ip0,
|
||||
num_queue_pairs * 2
|
||||
);
|
||||
|
||||
|
|
@ -8323,7 +8323,7 @@ mod common_sequential {
|
|||
let taps = net_util::open_tap(
|
||||
Some(tap_name),
|
||||
Some(std::net::IpAddr::V4(
|
||||
std::net::Ipv4Addr::from_str(&guest.network.host_ip).unwrap(),
|
||||
std::net::Ipv4Addr::from_str(&guest.network.host_ip0).unwrap(),
|
||||
)),
|
||||
None,
|
||||
&mut None,
|
||||
|
|
@ -8629,7 +8629,7 @@ mod windows {
|
|||
ssh_command_ip_with_auth(
|
||||
cmd,
|
||||
&self.auth,
|
||||
&self.guest.network.guest_ip,
|
||||
&self.guest.network.guest_ip0,
|
||||
DEFAULT_SSH_RETRIES,
|
||||
DEFAULT_SSH_TIMEOUT,
|
||||
)
|
||||
|
|
@ -8673,14 +8673,14 @@ mod windows {
|
|||
}
|
||||
|
||||
fn run_dnsmasq(&self) -> std::process::Child {
|
||||
let listen_address = format!("--listen-address={}", self.guest.network.host_ip);
|
||||
let listen_address = format!("--listen-address={}", self.guest.network.host_ip0);
|
||||
let dhcp_host = format!(
|
||||
"--dhcp-host={},{}",
|
||||
self.guest.network.guest_mac, self.guest.network.guest_ip
|
||||
self.guest.network.guest_mac0, self.guest.network.guest_ip0
|
||||
);
|
||||
let dhcp_range = format!(
|
||||
"--dhcp-range=eth,{},{}",
|
||||
self.guest.network.guest_ip, self.guest.network.guest_ip
|
||||
self.guest.network.guest_ip0, self.guest.network.guest_ip0
|
||||
);
|
||||
|
||||
Command::new("dnsmasq")
|
||||
|
|
@ -8820,7 +8820,7 @@ mod windows {
|
|||
let out = ssh_command_ip_with_auth(
|
||||
cmd,
|
||||
&self.auth,
|
||||
&self.guest.network.guest_ip,
|
||||
&self.guest.network.guest_ip0,
|
||||
{
|
||||
let mut ret = 1;
|
||||
let mut tmo_acc = 0;
|
||||
|
|
@ -8954,9 +8954,9 @@ mod windows {
|
|||
.args([
|
||||
"--net",
|
||||
format!(
|
||||
"tap=,mac={},ip={},mask=255.255.255.0,num_queues=8",
|
||||
windows_guest.guest().network.guest_mac,
|
||||
windows_guest.guest().network.host_ip
|
||||
"tap=,mac={},ip={},mask=255.255.255.128,num_queues=8",
|
||||
windows_guest.guest().network.guest_mac0,
|
||||
windows_guest.guest().network.host_ip0
|
||||
)
|
||||
.as_str(),
|
||||
])
|
||||
|
|
@ -9923,8 +9923,8 @@ mod live_migration {
|
|||
let console_text = String::from("On a branch floating down river a cricket, singing.");
|
||||
let net_id = "net123";
|
||||
let net_params = format!(
|
||||
"id={},tap=,mac={},ip={},mask=255.255.255.0",
|
||||
net_id, guest.network.guest_mac, guest.network.host_ip
|
||||
"id={},tap=,mac={},ip={},mask=255.255.255.128",
|
||||
net_id, guest.network.guest_mac0, guest.network.host_ip0
|
||||
);
|
||||
|
||||
let memory_param: &[&str] = if local {
|
||||
|
|
@ -10077,8 +10077,8 @@ mod live_migration {
|
|||
let console_text = String::from("On a branch floating down river a cricket, singing.");
|
||||
let net_id = "net123";
|
||||
let net_params = format!(
|
||||
"id={},tap=,mac={},ip={},mask=255.255.255.0",
|
||||
net_id, guest.network.guest_mac, guest.network.host_ip
|
||||
"id={},tap=,mac={},ip={},mask=255.255.255.128",
|
||||
net_id, guest.network.guest_mac0, guest.network.host_ip0
|
||||
);
|
||||
|
||||
let memory_param: &[&str] = if local {
|
||||
|
|
@ -10266,8 +10266,8 @@ mod live_migration {
|
|||
let console_text = String::from("On a branch floating down river a cricket, singing.");
|
||||
let net_id = "net123";
|
||||
let net_params = format!(
|
||||
"id={},tap=,mac={},ip={},mask=255.255.255.0",
|
||||
net_id, guest.network.guest_mac, guest.network.host_ip
|
||||
"id={},tap=,mac={},ip={},mask=255.255.255.128",
|
||||
net_id, guest.network.guest_mac0, guest.network.host_ip0
|
||||
);
|
||||
|
||||
let memory_param: &[&str] = if local {
|
||||
|
|
@ -10513,8 +10513,8 @@ mod live_migration {
|
|||
let console_text = String::from("On a branch floating down river a cricket, singing.");
|
||||
let net_id = "net123";
|
||||
let net_params = format!(
|
||||
"id={},tap=,mac={},ip={},mask=255.255.255.0",
|
||||
net_id, guest.network.guest_mac, guest.network.host_ip
|
||||
"id={},tap=,mac={},ip={},mask=255.255.255.128",
|
||||
net_id, guest.network.guest_mac0, guest.network.host_ip0
|
||||
);
|
||||
|
||||
let memory_param: &[&str] = if local {
|
||||
|
|
@ -10771,7 +10771,7 @@ mod live_migration {
|
|||
let r = std::panic::catch_unwind(|| {
|
||||
// Perform same checks to validate VM has been properly migrated
|
||||
// Spawn a new netcat listener in the OVS VM
|
||||
let guest_ip = ovs_guest.network.guest_ip.clone();
|
||||
let guest_ip = ovs_guest.network.guest_ip0.clone();
|
||||
thread::spawn(move || {
|
||||
ssh_command_ip(
|
||||
"nc -l 12345",
|
||||
|
|
@ -10819,8 +10819,8 @@ mod live_migration {
|
|||
let kernel_path = direct_kernel_boot_path();
|
||||
let net_id = "net123";
|
||||
let net_params = format!(
|
||||
"id={},tap=,mac={},ip={},mask=255.255.255.0",
|
||||
net_id, guest.network.guest_mac, guest.network.host_ip
|
||||
"id={},tap=,mac={},ip={},mask=255.255.255.128",
|
||||
net_id, guest.network.guest_mac0, guest.network.host_ip0
|
||||
);
|
||||
|
||||
let boot_vcpus = 2;
|
||||
|
|
@ -11027,8 +11027,8 @@ mod live_migration {
|
|||
let console_text = String::from("On a branch floating down river a cricket, singing.");
|
||||
let net_id = "net123";
|
||||
let net_params = format!(
|
||||
"id={},tap=,mac={},ip={},mask=255.255.255.0",
|
||||
net_id, guest.network.guest_mac, guest.network.host_ip
|
||||
"id={},tap=,mac={},ip={},mask=255.255.255.128",
|
||||
net_id, guest.network.guest_mac0, guest.network.host_ip0
|
||||
);
|
||||
let memory_param: &[&str] = &["--memory", "size=4G,shared=on"];
|
||||
let boot_vcpus = 2;
|
||||
|
|
@ -11382,9 +11382,9 @@ mod rate_limiter {
|
|||
let limit_bps = (bw_size * 8 * 1000) as f64 / bw_refill_time as f64;
|
||||
|
||||
let net_params = format!(
|
||||
"tap=,mac={},ip={},mask=255.255.255.0,num_queues={},queue_size={},bw_size={},bw_refill_time={}",
|
||||
guest.network.guest_mac,
|
||||
guest.network.host_ip,
|
||||
"tap=,mac={},ip={},mask=255.255.255.128,num_queues={},queue_size={},bw_size={},bw_refill_time={}",
|
||||
guest.network.guest_mac0,
|
||||
guest.network.host_ip0,
|
||||
num_queues,
|
||||
queue_size,
|
||||
bw_size,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue