Is there any way to list all virtual systems using Satellite API or spacewalk-report?
Environment
- Red Hat Satellite 5.6
Issue
- Is there any way to list all virtual systems using Satellite API or spacewalk-report?
Resolution
-
The
system.listFlexGuestsandsystem.listEligibleFlexGuestsAPIs can be used but these skip systems which are not considered as flex guests. To consume flex guest entitlements, virtual systems should have required packages. -
The spacewalk-report utility can list all systems in the Satellite, which then can be filtered on the is_virtualized and virtual_host columns to get only virt systems of interest and ignore physical.
[~]# spacewalk-report inventory
server_id,profile_name,hostname,ip_address,ipv6_address,registered_by,registration_time,last_checkin_time,kernel_version,packages_out_of_date,errata_out_of_date,software_channel,configuration_channel,entitlements,system_group,organization,virtual_host,architecture,is_virtualized,osad_status,hardware
Diagnostic Steps
1) There are no APIs to list all virtual systems on Satellite. Some API calls provides this information but it is not complete,
a) The system.listVirtualGuests can be used with combination of system.listVirtualHosts. The host system's id is required as input with system.listVirtualGuests to list all virtual systems on it. This fails when there are systems whose host is unknown.
b) Use system.listFlexGuests and system.listEligibleFlexGuests but these also skips systems which are not considered as flex guests.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
