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

[FEATURE] Reflect real virtual machine information in Redfish resources #45

Open
starbops opened this issue Dec 19, 2024 · 0 comments
Open
Labels
area/redfish Front-end protocol related and it's Redfish component/agent Relevant to the virtualized BMCs kind/feature New feature proposed/asked

Comments

@starbops
Copy link
Owner

Is your feature request related to a problem? Please describe.

Currently, we only populate two fields in each virtual machine's ComputerSystem resource:

  • .Name: name of the virtual machine
  • .PowerState: current power state of the virtual machine

For example:

{
  "@odata.context": "/redfish/v1/$metadata#ComputerSystem.ComputerSystem",
  "@odata.id": "/redfish/v1/Systems/1",
  "@odata.type": "#ComputerSystem.v1_22_0.ComputerSystem",
  "Actions": {
    "#ComputerSystem.AddResourceBlock": {},
    "#ComputerSystem.Decommission": {},
    "#ComputerSystem.RemoveResourceBlock": {},
    "#ComputerSystem.Reset": {
      "target": "/redfish/v1/Systems/1/Actions/ComputerSystem.Reset",
      "title": "Reset"
    },
    "#ComputerSystem.SetDefaultBootOrder": {}
  },
  "AssetTag": "",
  "Bios": {},
  "Boot": {
    "BootOptions": {},
    "BootSourceOverrideEnabled": "Disabled",
    "BootSourceOverrideMode": "Legacy",
    "BootSourceOverrideTarget": "Hdd",
    "Certificates": {}
  },
  "BootProgress": {},
  "Certificates": {},
  "Composition": {},
  "Description": "Computer System",
  "EthernetInterfaces": {},
  "FabricAdapters": {},
  "GraphicalConsole": {},
  "GraphicsControllers": {},
  "HostWatchdogTimer": {
    "FunctionEnabled": false,
    "Status": {},
    "TimeoutAction": ""
  },
  "HostedServices": {
    "StorageServices": {}
  },
  "Id": "1",
  "IdlePowerSaver": {},
  "IndicatorLED": "Unknown",
  "KeyManagement": {
    "KMIPCertificates": {}
  },
  "LastResetTime": "0001-01-01T00:00:00Z",
  "Links": {
    "HostingComputerSystem": {}
  },
  "LogServices": {},
  "Manufacturer": "KubeVirt",
  "Memory": {},
  "MemoryDomains": {},
  "MemorySummary": {
    "Metrics": {},
    "Status": {},
    "TotalSystemMemoryGiB": 0
  },
  "Model": "KubeVirt",
  "Name": "default/machine-1",
  "NetworkInterfaces": {
    "@odata.id": "/redfish/v1/Systems/1/NetworkInterfaces"
  },
  "OperatingSystem": "/redfish/v1/Systems/1/OperatingSystem",
  "PartNumber": "",
  "PowerState": "On",
  "ProcessorSummary": {
    "Count": 0,
    "Metrics": {},
    "Status": {}
  },
  "Processors": {},
  "SKU": "",
  "SecureBoot": {},
  "SerialConsole": {
    "IPMI": {},
    "SSH": {},
    "Telnet": {}
  },
  "SerialNumber": "000000000000",
  "SimpleStorage": {
    "@odata.id": "/redfish/v1/Systems/1/SimpleStorage"
  },
  "Status": {},
  "Storage": {
    "@odata.id": "/redfish/v1/Systems/1/Storage"
  },
  "SystemType": "Virtual",
  "USBControllers": {},
  "UUID": "00000000-0000-0000-0000-000000000000",
  "VirtualMedia": {
    "@odata.id": "/redfish/v1/Systems/1/VirtualMedia"
  },
  "VirtualMediaConfig": {}
}

Some of the fields like ProcessorSummary, Memory, NetworkInterfaces, etc. could be filled with real data.

Describe the solution you'd like

With the aid of custom controllers, we should be able to reflect the virtual machine's actual state in the Redfish resources. That being said, some fields do not apply to virtual machines. We should do it in a best-effort manner.

Describe alternatives you've considered

A much simpler way is to return the actual state as a ComputerSystem resource upon queries. Thus we don't have to maintain the intermediate object ourselves and avoid implementing the control loops.

Additional context

This is yet another remaining item from #2.

@starbops starbops added kind/feature New feature proposed/asked area/redfish Front-end protocol related and it's Redfish labels Dec 19, 2024
@starbops starbops moved this to Backlog in KubeVirtBMC project Dec 19, 2024
@starbops starbops added the component/agent Relevant to the virtualized BMCs label Jan 3, 2025
@starbops starbops added this to the Phase 3 - Support Redfish milestone Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redfish Front-end protocol related and it's Redfish component/agent Relevant to the virtualized BMCs kind/feature New feature proposed/asked
Projects
Status: Backlog
Development

No branches or pull requests

1 participant