Skip to content

enhance: Improve IP address display (strip CIDR notation) #11

@williamzujkowski

Description

@williamzujkowski

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions