kcli-ksushy
Skill658 starsChanged 13 days agoApache-2.0View on GitHub
Guides interaction with kcli VMs via ksushy (Redfish emulator). Use when booting, stopping, or managing baremetal-like VMs through the Redfish API, deploying the ksushy service, or working with sushy/redfish in general.
- Reads credentials
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 96
When the service is deployed with KSUSHY_USER and KSUSHY_PASSWORD, access is secured through basic authentication:
- Very specific: line 104
Create baremetal-like VMs with kcli:
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
kcli ksushy (Redfish Emulation)
ksushy provides a REST interface to interact with VMs using Redfish. It offers functionality similar to sushy-emulator but extends it to more providers (typically vSphere, KubeVirt, and oVirt) and through more friendly URLs.
Requirements
ksushy is bundled within kcli. SSL support requires installing cherrypy and pyopenssl manually.
Deploying the ksushy service
kcli create sushy-serviceThis creates a systemd unit listening on port 9000. The following environment variables are supported:
| Variable | Description |
KSUSHY_LISTEN_PORT | Use a specific port |
KSUSHY_DEBUG | Enable debug |
KSUSHY_USER | Username for basic authentication |
KSUSHY_PASSWORD | Password for basic authentication |
KSUSHY_BOOTONCE | Enable bootonce |
Determining the ksushy endpoint
The ksushy endpoint is derived from the hypervisor hosting the VMs, NOT from the VM itself or the local machine hostname:
- Identify the current hypervisor with
kcli list hosts(look for theCurrentcolumn). - Get the hypervisor's FQDN or IP with
kcli info host <host_name>(use thehost:field), or look it up in~/.kcli/config.yml. If the host is a short name, check~/.ssh/configfor the actualHostname(IP or FQDN). - The ksushy base URL is
https://<host_ip>:9000/redfish/v1/Systems.
API Structure
Systems are organized by provider under /redfish/v1/Systems/<provider>/<vm_name>.
The <provider> matches the provider name as defined in ~/.kcli/config.yml. For local libvirt VMs, the provider is local.
# List providers
curl -ks https://<host>:9000/redfish/v1/Systems
# List VMs under the local (libvirt) provider
curl -ks https://<host>:9000/redfish/v1/Systems/local
# Query a VM on a different provider
curl -ks https://<host>:9000/redfish/v1/Systems/myotherprovider/mynode
# Get info on a specific VM
curl -ks https://<host>:9000/redfish/v1/Systems/local/<vm_name>VM Power Operations
Typical redfish operations (start, stop, info, listing NICs) are supported for all providers.
# Power on a VM
curl -ks https://<host>:9000/redfish/v1/Systems/local/<vm_name>/Actions/ComputerSystem.Reset \
-H "Content-Type: application/json" \
-d '{"ResetType": "On"}'
# Power off a VM
curl -ks https://<host>:9000/redfish/v1/Systems/local/<vm_name>/Actions/ComputerSystem.Reset \
-H "Content-Type: application/json" \
-d '{"ResetType": "ForceOff"}'
# Restart a VM
curl -ks https://<host>:9000/redfish/v1/Systems/local/<vm_name>/Actions/ComputerSystem.Reset \
-H "Content-Type: application/json" \
-d '{"ResetType": "ForceRestart"}'Virtual Media (ISO)
ISO plugging is only supported on virtualization providers.
# Insert ISO
curl -ks https://<host>:9000/redfish/v1/Systems/local/<vm_name>/VirtualMedia/Cd/Actions/VirtualMedia.InsertMedia \
-H "Content-Type: application/json" \
-d '{"Image": "http://<iso_server>/<image>.iso"}'
# Eject ISO
curl -ks https://<host>:9000/redfish/v1/Systems/local/<vm_name>/VirtualMedia/Cd/Actions/VirtualMedia.EjectMedia \
-H "Content-Type: application/json" -d '{}'Authentication
When the service is deployed with KSUSHY_USER and KSUSHY_PASSWORD, access is secured through basic authentication:
curl -ks -u myuser:mypassword https://<host>:9000/redfish/v1/Systems/local/<vm_name>Typical Workflow
- Create baremetal-like VMs with kcli:
kcli create vm -P start=false -P memory=20480 -P numcpus=16 -P 'disks=[200]' -P uefi=true -P 'nets=[default]' -c 3 mycluster - Determine the ksushy endpoint (see above).
- Boot VMs via redfish:
for i in 0 1 2; do curl -ks https://<host>:9000/redfish/v1/Systems/local/mycluster-$i/Actions/ComputerSystem.Reset \ -H "Content-Type: application/json" \ -d '{"ResetType": "On"}' done
In this repository7 other files it gives its agents.
- kcli-cluster-deploymentSkill
- kcli-configurationSkill
- kcli-plan-authoringSkill
- kcli-provider-developmentSkill
- kcliSkill
- kcli-testingSkill
- kcli-vm-operationsSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

