Problem
When displaying VM IP addresses, we show the full CIDR notation (e.g., 192.168.122.235/24), which can be confusing when trying to SSH.
Current Behavior
virsh domifaddr moltdown-test
Name MAC address Protocol Address
-------------------------------------------------------------------------------
vnet0 52:54:00:7e:95:fe ipv4 192.168.122.235/24
Proposed Solution
In scripts that display IPs (snapshot_manager.sh, virt_install_agent_vm.sh), strip the CIDR suffix:
ip=$(virsh domifaddr "$vm" | awk '/ipv4/ {print $4}' | cut -d/ -f1 | head -1)
echo "SSH: ssh testuser@$ip"
Files to Update
- snapshot_manager.sh (cmd_revert_snapshot)
- virt_install_agent_vm.sh (IP detection at end)
- run_bootstrap_on_vm.sh (documentation)
Related
Found during E2E testing
Problem
When displaying VM IP addresses, we show the full CIDR notation (e.g.,
192.168.122.235/24), which can be confusing when trying to SSH.Current Behavior
Proposed Solution
In scripts that display IPs (snapshot_manager.sh, virt_install_agent_vm.sh), strip the CIDR suffix:
Files to Update
Related
Found during E2E testing