Skip to content

feat: Add --ip flag to show VM IP addresses in list (issue#22)#32

Open
Douglas019BR wants to merge 8 commits into
avanzzzi:masterfrom
Douglas019BR:master
Open

feat: Add --ip flag to show VM IP addresses in list (issue#22)#32
Douglas019BR wants to merge 8 commits into
avanzzzi:masterfrom
Douglas019BR:master

Conversation

@Douglas019BR

Copy link
Copy Markdown

Add optional --ip/-i flag to list and ls commands to display
VM IP addresses in a new column.

Implementation details:

  • Add batch IP retrieval using Get-VMNetworkAdapter (single call)
  • Filter IPv6 and link-local IPs (169.254.x.x), prefer IPv4
  • Add _get_all_vm_ip_addresses() for batch PowerShell call
  • Add _select_primary_ip() for intelligent IP selection
  • Add add_ip_addresses() to correlate IPs with VMs
  • Update printer to conditionally show IP column
  • Maintain backward compatibility (flag is optional)

VMs without IPs (powered off, saved, or no Integration Services)
display 'N/A' in the IP column.

Closes #22

Douglas019BR and others added 8 commits April 16, 2026 10:33
 Add /smart-sizing flag to xfreerdp command on Linux/Mac so the VM
 window can be resized without black areas. The VM image scales to
 fill the window client-side.

 Document the limitation in README: for true dynamic resolution (VM
 re-renders at the new size), Hyper-V Enhanced Session must be enabled
 on the host. Include PowerShell instructions and a note about xrdp
 requirement for Linux guests
  Add optional --ip/-i flag to list and ls commands to display
  VM IP addresses in a new column.

  Implementation details:
  - Add batch IP retrieval using Get-VMNetworkAdapter (single call)
  - Filter IPv6 and link-local IPs (169.254.x.x), prefer IPv4
  - Add _get_all_vm_ip_addresses() for batch PowerShell call
  - Add _select_primary_ip() for intelligent IP selection
  - Add add_ip_addresses() to correlate IPs with VMs
  - Update printer to conditionally show IP column
  - Maintain backward compatibility (flag is optional)

  VMs without IPs (powered off, saved, or no Integration Services)
  display 'N/A' in the IP column.

  Closes avanzzzi#22
config.load() already decodes the base64 password and stores the
plain bytes in config['pass']. The subsequent b64decode() calls in
connect(), run_cmd_ssh() and run_cmd_winrm() were decoding an already
decoded value, causing binascii.Error: Incorrect padding.
config['pass'] is bytes after b64decode in config.load(), formatting
it directly into the freerdp command produced literal b'...' strings.
Also adds domain to the username for NLA authentication.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show ip address in machine list

1 participant