Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VM search by IP does not work after the update #9486

Closed
0sorkon opened this issue Aug 5, 2024 · 8 comments
Closed

VM search by IP does not work after the update #9486

0sorkon opened this issue Aug 5, 2024 · 8 comments

Comments

@0sorkon
Copy link

0sorkon commented Aug 5, 2024

ISSUE TYPE
  • Bug Report
COMPONENT NAME
UI
API?
CLOUDSTACK VERSION
4.19.1.0
SUMMARY

Searching for VMs by IP does not work after upgrading from 4.18.2.1 to 4.19.1.0. Attempting to search by IP gives empty results

STEPS TO REPRODUCE
* Update to 4.19.1.0
* Try to search instance based on IP address
EXPECTED RESULTS
The search result displays the VM with the searched IP
ACTUAL RESULTS
Search result is empty.
@adietrich-ussignal
Copy link

Can you be a bit more descriptive as to which menu you are attempting to search? Is this from the instance screen where you are attempting to search?

I've tested on 4.19.1.0 and 4.19.0.2 and in both cases this does not work when done from the Compute > Instances search bar.

@0sorkon
Copy link
Author

0sorkon commented Aug 6, 2024

Yes. I try to search VM from Compute -> Instances page. And it work on 4.18

@0sorkon
Copy link
Author

0sorkon commented Aug 6, 2024

Is there another way to search VMs by IP that works in 4.19?

@kiranchavala
Copy link
Contributor

@0sorkon

You can use cloudmonkey tool to filter the vm and IP address

https://github.com/apache/cloudstack-cloudmonkey

for example

cmk list virtualmachines filter=name,ipaddress
{
  "count": 2,
  "virtualmachine": [
    {
      "ipaddress": "10.1.1.141",
      "name": "VM-28780e23-5ab5-455e-a0be-43caa22f16a1"
    },
    {
      "ipaddress": "10.1.1.19",
      "name": "VM-26eaa7cd-3a76-4a2a-a11a-7719db3dff65"
    }
  ]
}

Also you can use the jq tool to filter somemore

 cmk list virtualmachines filter=name,ipaddress | jq '.virtualmachine[]'
{
  "ipaddress": "10.1.1.141",
  "name": "VM-28780e23-5ab5-455e-a0be-43caa22f16a1"
}
{
  "ipaddress": "10.1.1.19",
  "name": "VM-26eaa7cd-3a76-4a2a-a11a-7719db3dff65"
}

 cmk list virtualmachines filter=name,ipaddress | jq '.virtualmachine[].ipaddress'
"10.1.1.141"
"10.1.1.19"

@DaanHoogland
Copy link
Contributor

@0sorkon have you seen this working in older versions? It doesn't sound as familiar functionality to me.

@0sorkon
Copy link
Author

0sorkon commented Sep 9, 2024

Yeah, I'm pretty sure it worked in latest 4.18.

@0sorkon
Copy link
Author

0sorkon commented Sep 10, 2024

@0sorkon

You can use cloudmonkey tool to filter the vm and IP address

https://github.com/apache/cloudstack-cloudmonkey

for example

cmk list virtualmachines filter=name,ipaddress
{
  "count": 2,
  "virtualmachine": [
    {
      "ipaddress": "10.1.1.141",
      "name": "VM-28780e23-5ab5-455e-a0be-43caa22f16a1"
    },
    {
      "ipaddress": "10.1.1.19",
      "name": "VM-26eaa7cd-3a76-4a2a-a11a-7719db3dff65"
    }
  ]
}

Also you can use the jq tool to filter somemore

 cmk list virtualmachines filter=name,ipaddress | jq '.virtualmachine[]'
{
  "ipaddress": "10.1.1.141",
  "name": "VM-28780e23-5ab5-455e-a0be-43caa22f16a1"
}
{
  "ipaddress": "10.1.1.19",
  "name": "VM-26eaa7cd-3a76-4a2a-a11a-7719db3dff65"
}

 cmk list virtualmachines filter=name,ipaddress | jq '.virtualmachine[].ipaddress'
"10.1.1.141"
"10.1.1.19"

Yeah, I know cmk can do that. But not everyone has access to the MS console and most people use the web interface and are used to it working.

@weizhouapache
Copy link
Member

this has been fixed by #9547

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

5 participants