hmc-mcp
This MCP server exposes tools for managing IBM Power systems through an HMC, from inventory and health checks to lifecycle, storage, network, user, and update operations.
Inventory and inspect HMC consoles, managed systems, LPARs, VIOS, jobs, generic resources, adapters, I/O slots, memory pools, virtual switches/networks/bridges, clusters, SSPs, users, LDAP, password policies, and PCM metrics.
Report capacity, find LPAR placement, get LPAR/system summaries, and monitor recent or waitable HMC jobs.
Create, modify, delete, power on/off, migrate, remote-restart, and recover LPARs and VIOS; perform DLPAR CPU/memory changes.
Manage VIOS backups/restores, NIM OS installs, VIOS updates, volume groups, virtual disks, media repositories, optical media, logical units, and vSCSI/vFC/network adapters.
Configure virtual networks/switches/bridges, SR-IOV mode, and vNICs.
Create/modify/delete HMC users and password policies; configure/remove LDAP; manage PCM preferences.
Submit HMC and managed-system firmware updates/upgrades and back up/restore/sync LPAR profiles.
Run arbitrary HMC CLI commands over SSH as an operator escape hatch.
Apply MCP access policies to limit which tools, connections, and targets an assistant can use.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@hmc-mcp List all managed systems and show their power state"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
hmcpctl
Manage IBM Power systems from your terminal or an AI assistant. hmcpctl connects to the IBM Hardware Management Console (HMC) to inventory systems, inspect LPARs and VIOS partitions, manage resources, and run lifecycle operations.
Use it as a CLI, an MCP server, or a Python library. MCP access policies control which tools, connections, and targets an assistant can use.
Install
Requires Python ≥3.11 and uv. The project supports every stable, non-EOL CPython release at or above that floor.
Install the CLI and MCP server from source:
git clone https://github.com/randomparity/hmcpctl.git
cd hmcpctl
uv tool install --python 3.11 '.[app]'
hmcpctl --helpIf your shell cannot find hmcpctl, run uv tool update-shell and open a new
terminal. The app extra includes both the CLI and MCP server; for development,
use the contributor setup.
The package is not published to an index. A project that depends on it as a
library pins a release tag, which
names the commit the release was verified at and carries the
API compatibility contract. For the current release, v0.2.0:
dependencies = ["hmcpctl @ git+https://github.com/randomparity/hmcpctl@v0.2.0"]Write hmcpctl[app] @ ... for the CLI and MCP server. With uv, uv add --raw "hmcpctl @ git+https://github.com/randomparity/hmcpctl@v0.2.0" writes that entry. Without
--raw, uv moves the Git source into [tool.uv.sources], which stays out of your package's
published metadata: other installers then look for hmcpctl on PyPI, where this project
publishes nothing and has not reserved the name, so whoever registers it decides what installs.
Existing pre-release installations must use the one-time clean-cutover procedure.
You need network access to an HMC and an HMC account with permissions for your intended operations. The project targets HMC V8–V11; individual operations have version and firmware limits. Release 0.2.0 claims nine operations of the logical LPAR workflow, which its MCP server lists as primary tools; the compatibility page names them and shows how to check whether each, or any other operation, is live-verified.
Related MCP server: quads-mcp
Configure
For one HMC, set the connection environment in your shell:
export HMC_HOST=hmc.example.com
export HMC_USER=admin
export HMC_VERIFY_SSL=trueSet HMC_PASSWORD through your shell or secret manager before running commands.
Replace the example host and user with your own. TLS verification requires the
HMC's certificate to be trusted: through the operating-system store, HMC_CA_BUNDLE,
SSL_CERT_FILE, or a pinned HMC_CERT_FINGERPRINT; see
TLS trust. Verification is off by default if
HMC_VERIFY_SSL is omitted, which exposes credentials to interception.
Check the connection:
hmcpctl console infoThis prints HMC information after a successful logon. Some operations also use
SSH; see configuration
for SSH credentials, TOML profiles, friendly nicknames, and connection precedence.
For multiple consoles, start with hmcpctl config init and edit the file it prints.
CLI quick start
Explore your systems and partitions:
hmcpctl systems list
hmcpctl systems health --json
hmcpctl lpars list --system <system-uuid>
hmcpctl lpars show <lpar-uuid>
hmcpctl vios listUse UUIDs from the inventory output to identify resources. To change an LPAR, for example:
hmcpctl lpars modify <lpar-uuid> --mem 16384 --procs 2.0
hmcpctl lpars power-on <lpar-uuid>Memory is in MiB; power-on asks for confirmation. HMC permissions and operation guards still apply. MCP access policies apply only to the MCP server; shell commands run under your HMC credentials.
Use hmcpctl --help or hmcpctl lpars --help to explore.
The CLI guide
covers storage, adapters, snapshots, provisioning, and job output.
MCP quick start
Create access-policy.toml in the platform's hmcpctl configuration directory:
Linux:
~/.config/hmcpctl/(or$XDG_CONFIG_HOME/hmcpctl/)macOS:
~/Library/Application Support/hmcpctl/Windows:
%APPDATA%/hmcpctl/
Create the directory if needed. For an initial read-only server, add this policy to the file, preserving any policies already there:
[[policies.readonly.grants]]
effects = ["read"]
connections = ["<default>"]
targets = "all-targets"This permits read tools across the default HMC. Read tools can also disclose local profile and policy metadata; see the policy scope guide.
With the connection environment above available, start the server over stdio:
hmcpctl serve --access-policy readonlyAn MCP client normally launches this process for you. For clients that use an
mcpServers configuration, add:
{
"mcpServers": {
"hmc": {
"command": "hmcpctl",
"args": ["serve", "--access-policy", "readonly"],
"env": {
"HMC_HOST": "hmc.example.com",
"HMC_USER": "admin",
"HMC_PASSWORD": "<HMC-password>",
"HMC_VERIFY_SSL": "true"
}
}
}
}Replace the placeholders and use your client's secret handling if available.
If it cannot find the executable, use its absolute path from uv tool dir --bin.
The client process must have access to the policy file, and its environment must carry the
TLS trust settings you chose above (TLS trust).
The server lists only its primary tools, the
logical LPAR workflow; under this read-only
policy that is hmc_inventory, hmc_plan_lpar, hmc_inspect_lpar, hmc_operation_status
and hmc_search_tools. Every other permitted tool, such as hmc_fleet_health, is found
with hmc_search_tools and called by name.
Try asking: “List my managed Power systems and their partitions.”
Call hmc_effective_permissions by name to inspect the active policy.
An access policy is required. For broader permissions, migration from older deployments, audit logging, and HTTP setup, see the MCP server guide. HTTP is unauthenticated: keep it on loopback or put an authenticated proxy in front.
Documentation
Documentation index — guides and reference.
MCP tool reference — available tools, their effects, and one-line summaries.
Environment variables — all connection and operation settings.
Operation details — selectors, units, limits, and firmware-specific behavior.
Development guide — stack, testing, source layout, and HMC API internals.
Contributing, security, and license
See Contributing for the development and pull-request path. Report suspected vulnerabilities through the private channel in the Security policy. This project is available under the License.
Available Tools
101 toolshmc_add_network_adapterA
Add a Virtual Ethernet (client network) adapter to an LPAR.
lpar_name_or_uuid: accepts either a PartitionName or a UUID (find it with hmc_lpars). port_vlan_id is the PVID / VLAN the adapter connects to (this is how the adapter is attached to a VirtualNetwork — match the network's VLAN ID and vSwitch). slot_number is the virtual slot (auto-assigned if omitted). tagged=True makes it a VLAN-tagged (trunking) adapter; mac_address pins the MAC (otherwise the HMC generates one). Modifying a running LPAR is a DLPAR operation and needs active RMC.
Inputs: port_vlan_id (required), lpar_name_or_uuid (required), tagged, mac_address, +2 more. Returns: result
hmc_add_vfc_adapterA
Add a Virtual Fibre Channel (NPIV) client adapter to an LPAR.
lpar_name_or_uuid: accepts either a PartitionName or a UUID (find it with hmc_lpars). vios_partition_id is the integer PartitionID of the serving VIOS and vios_slot is its server-side virtual FC slot number. The HMC generates the WWPNs. Use this for SAN storage via NPIV instead of vSCSI.
Inputs: vios_slot (required), lpar_name_or_uuid (required), vios_partition_id (required), slot_number. Returns: result
hmc_add_vnicA
Add a vNIC (SR-IOV-backed Virtual NIC) to an LPAR via the HMC CLI.
Runs chhwres -r virtualio --rsubtype vnic -o a -m <system_name> --filter lpar_names=<lpar_name> -a "<attrs>" on the HMC via SSH.
The system and partition may be given by CLI name or by UUID; UUIDs are resolved to their CLI names via REST (falling back to an lssyscfg lookup over SSH when the REST API is unreachable) before the command runs.
V1 scope boundary: Only the following parameters are supported in
this version: capacity, vswitch_name, port_vlan_id, and
backing_devices (optional, opaque string passed verbatim). Complex
backing-device topology (multi-adapter failover, per-device SR-IOV
physical port IDs, capacity weights) is a follow-up and explicitly out
of scope for v1.
Returns the raw HMC command output on success.
WARNING: This modifies the LPAR configuration on the HMC. Confirm
system_name_or_uuid, lpar_name_or_uuid, and vswitch_name before calling. The
underlying physical adapter must be in SR-IOV mode (see
hmc_set_sriov_adapter_mode).
Raises: HMCCLIError: If the HMC command fails, e.g. because the underlying SR-IOV adapter is not in SR-IOV mode.
Inputs: capacity (required), port_vlan_id (required), vswitch_name (required), lpar_name_or_uuid (required), +2 more. Returns: result
hmc_add_vscsi_adapterA
Add a Virtual SCSI client adapter to an LPAR, paired to a VIOS.
lpar_name_or_uuid: accepts either a PartitionName or a UUID (find it with hmc_lpars). vios_partition_id is the integer PartitionID of the serving VIOS (find it with hmc_vios), and vios_slot is that VIOS's server-side virtual SCSI slot number that owns the backing storage. slot_number is the client adapter's virtual slot (auto-assigned if omitted). Storage backing devices (disks / logical volumes) are then mapped to this adapter on the VIOS.
Inputs: vios_slot (required), lpar_name_or_uuid (required), vios_partition_id (required), slot_number. Returns: result
hmc_aggregated_metricsARead-only
List or download aggregated PCM metrics JSON documents.
category is the resource type, e.g. 'ManagedSystem' or 'LogicalPartition'; resource_name_or_uuid is the name or UUID of that resource. Aggregated metrics are the long-term rollup used for trend analysis. Timestamps are ISO-8601 UTC (yyyy-MM-ddTHH:mm:ssZ); start_ts is required.
mode='links' returns the Atom feed link list. mode='fetch' (default)
downloads and returns the parsed JSON of the most recent document, or
{} when no metrics are available in the requested range. Requires
aggregation to be enabled in PCM preferences.
Inputs: category (required), start_ts (required), resource_name_or_uuid (required), mode, +2 more. Returns: result
hmc_assign_profile_io_slotA
Add a physical I/O slot DRC index to an LPAR's profile.
Runs chsyscfg -r prof -m <system_name> -i "name=<profile_name>,io_slots+=<drc_index>//0,lpar_name=<lpar_name>" --force
on the HMC via SSH and returns the raw command output.
This operation appends the specified physical I/O slot to the profile's I/O slot list. Use --force to override any conflicts.
The system and partition may be given by CLI name or by UUID; UUIDs are resolved to their CLI names via REST (falling back to an lssyscfg lookup over SSH when the REST API is unreachable) before the command runs.
Inputs: drc_index (required), profile_name (required), lpar_name_or_uuid (required), system_name_or_uuid (required). Returns: result
hmc_backup_lpar_profilesA
Backup all LPAR profiles on a Power system via the HMC CLI.
Runs bkprofdata -m <system_name> -f <file_path> on the HMC via SSH
and returns the raw command output.
The system may be given by CLI name or by UUID; a UUID is resolved to its CLI name via REST (falling back to an lssyscfg lookup over SSH when the REST API is unreachable) before the command runs.
IMPORTANT: file_path is on the HMC filesystem, not the local machine. The backup file will be created at that path on the HMC host.
Inputs: file_path (required), system_name_or_uuid (required). Returns: result
hmc_backup_viosA
Create a VIOS backup via the HMC CLI.
Runs chviosbackup -id <vios_uuid> -operation backup -type <backup_type>
on the HMC via SSH. vios_uuid is the VIOS UUID (from hmc_vios).
backup_type must be one of:
vios— full VIOS configuration backup (default)viosioconfig— I/O configuration backupssp— Shared Storage Pool (cluster) backup
Returns the raw HMC CLI output. Poll hmc_list_vios_backups to confirm the backup was created.
Inputs: vios_uuid (required), backup_type. Returns: result
hmc_capacity_reportARead-only
Capacity report: for each managed system, total/assigned/free memory (MiB) and processor units, plus running and total LPAR counts.
Derived by listing all managed systems then fetching the LPAR list for each system to compute assigned resources. Free = total − assigned.
Inputs: no named parameters. Returns: result
hmc_configure_ldapA
Configure the HMC LDAP server integration.
server_url is the LDAP or LDAPS URL (e.g. 'ldap://ldap.example.com' or 'ldaps://ldap.example.com:636'). Only the fields you supply are changed.
base_dn: LDAP search base (e.g. 'dc=example,dc=com'). bind_dn: DN of the account used to bind for searches. bind_pw: password for the bind account. search_filter: LDAP search filter (e.g. '(objectClass=person)'). hmc_groups: comma-separated LDAP groups mapped to HMC access. group_member_attributes: LDAP attribute used for group membership.
Equivalent to Ansible hmc_user action=configure_ldap.
Returns the updated LDAP configuration resource dict.
Inputs: server_url (required), base_dn, bind_dn, bind_pw, +3 more. Returns: result
hmc_console_infoARead-only
Get HMC version, network configuration and links to managed systems.
Useful as a connectivity check — this is the cheapest HMC call.
Inputs: no named parameters. Returns: result
hmc_create_logical_unitA
Create a Logical Unit (file-backed disk) in a Cluster/SSP.
Submits a CreateLogicalUnit job and returns it — poll hmc_get_job for status; the result holds the new LU's UDID in LUCreated. lu_type is THIN or THICK; device_type is VirtualIO_Disk or VirtualIO_Image. cloned_from is an optional source LU UDID to clone. Find cluster_uuid with hmc_list_clusters.
Set wait=True to block until the job reaches a terminal state.
Inputs: lu_name (required), lu_size_gb (required), cluster_uuid (required), wait, +5 more. Returns: result
hmc_create_lparA
Create a new LPAR on a managed system.
system_name_or_uuid: the target managed system — accepts either a
SystemName (e.g. "Server-9080-M9S-SN12345") or a UUID (find it
with hmc_systems). Memory values are in MiB. By default a
shared-processor partition is created; set dedicated=True for dedicated
CPUs (then procs are whole CPU counts). For shared partitions, procs are
processing units (may be fractional, e.g. 0.5) and vcpus are virtual
processor counts.
The partition is created powered off with a default profile; storage, network and boot settings still need to be configured (via the HMC UI or profile edits) before it can boot an OS. This creates a real partition — confirm name/system_name_or_uuid before calling.
Raises ValueError if a partition with the given name already exists on any managed system — names must be unique across the HMC.
partition_type must be one of: 'AIX/Linux', 'OS400', 'Virtual IO Server'.
os_type: target OS — aix, linux, or ibmi.
keylock: initial keylock position — normal, manual, or auto.
max_virtual_slots: maximum number of virtual I/O slots.
Inputs: name (required), system_name_or_uuid (required), keylock, os_type, +14 more. Returns: result
hmc_create_media_repositoryA
Create the Virtual Media Repository (named VMLibrary) on a Volume Group.
vios_name_or_uuid: accepts either a PartitionName or a UUID (find it with hmc_vios). The repository holds file-backed ISO images for client partitions; only one can exist per VIOS. size_mb is RepositorySize.
Inputs: size_mb (required), vg_uuid (required), vios_name_or_uuid (required). Returns: result
hmc_create_optical_mediaA
Create a blank VirtualOpticalMedia (ISO container) in the media repository.
vios_name_or_uuid: accepts either a PartitionName or a UUID (find it with hmc_vios). Only blank media can be created via the API; media_name is the file name (e.g. 'aix.iso'), size_mb is MediaSize.
Inputs: size_mb (required), vg_uuid (required), media_name (required), vios_name_or_uuid (required). Returns: result
hmc_create_password_policyA
Create a new HMC password policy.
policy_name is the unique name for the policy. pwage is the maximum password age in days (0 = never expires). min_length is the minimum password length. min_digits, min_uppercase, min_lowercase, and min_special set character-class minimums. hist_size controls how many previous passwords cannot be reused. warn_pwage is the number of days before expiry to warn the user. min_pwage is the minimum days before a password may be changed. Confirm the policy_name before calling. Returns the created policy resource dict.
Inputs: policy_name (required), pwage, hist_size, min_pwage, +6 more. Returns: result
hmc_create_userA
Create a new HMC local user account.
name is the login username. taskrole controls what the user can do (e.g. 'hmcoperator', 'hmcviewer', 'hmcsuperadmin'). password is the initial password. description is optional. pwage is the password expiration in days (0 = never expires). This creates a real account — confirm the taskrole before calling. Returns the created user resource dict.
Inputs: name (required), password (required), taskrole (required), pwage, +1 more. Returns: result
hmc_create_viosA
Create a new Virtual IO Server (VIOS) partition on a managed system.
system_uuid is the target managed system (find it with hmc_systems). Memory values are in MiB; procs are shared processing units (fractional ok). The VIOS is created powered off with default settings — install the OS with hmc_install_vios before using it as a storage/network server. This creates a real partition — confirm name/system_uuid before calling.
Inputs: name (required), system_uuid (required), max_procs, max_vcpus, +7 more. Returns: result
hmc_create_virtual_diskA
Create a Virtual Disk (logical volume) inside a Volume Group.
vios_name_or_uuid: accepts either a PartitionName or a UUID (find it with hmc_vios). capacity_mb is the size in MiB. The disk becomes backing storage that you then attach to an LPAR with hmc_map_storage_to_lpar (storage_kind 'VirtualDisk'). Find vg_uuid with hmc_list_volume_groups.
Inputs: vg_uuid (required), disk_name (required), capacity_mb (required), vios_name_or_uuid (required). Returns: result
hmc_create_virtual_networkA
Create a Virtual Network (VLAN) on a managed system.
system_name_or_uuid: accepts either a SystemName or a UUID (find it with hmc_systems). vswitch_id is the numeric SwitchID of the backing VirtualSwitch (see hmc_list_virtual_switches). tagged sets whether bridged traffic keeps the VLAN tag.
Inputs: name (required), vlan_id (required), vswitch_id (required), system_name_or_uuid (required), +1 more. Returns: result
hmc_create_volume_groupA
Create a Volume Group on a VIOS from one or more physical volumes.
vios_name_or_uuid: accepts either a PartitionName or a UUID (find it with hmc_vios). physical_volumes is a list of free PV device names (e.g. ['hdisk10']). Use the GetFreePhysicalVolumes job / VIOS 'lspv' to find unused disks. This pools the disks so virtual disks can be carved out for LPARs.
Inputs: name (required), physical_volumes (required), vios_name_or_uuid (required). Returns: result
hmc_delete_adapterADestructive
Remove a virtual adapter from an LPAR by its UUID.
lpar_name_or_uuid: accepts either a PartitionName or a UUID (find it with hmc_lpars). adapter_type is one of: ClientNetworkAdapter, VirtualSCSIClientAdapter, VirtualFibreChannelClientAdapter, VirtualNICDedicated. Get adapter UUIDs from hmc_list_adapters. Removing an adapter detaches that storage/network from the partition. Returns a confirmation string (immediate delete — no job to poll).
Inputs: adapter_type (required), adapter_uuid (required), lpar_name_or_uuid (required). Returns: result
hmc_delete_logical_unitADestructive
Delete a Logical Unit from a Cluster/SSP by its UDID.
Submits a DeleteLogicalUnit job and returns it — poll hmc_get_job for status (an asynchronous delete, unlike the immediate delete tools).
Set wait=True to block until the job reaches a terminal state.
Inputs: lu_udid (required), cluster_uuid (required), wait, poll_interval, +1 more. Returns: result
hmc_delete_lparADestructive
Delete (destroy) an LPAR by name or UUID.
The partition must be powered off first (use hmc_power_off_lpar and confirm with hmc_lpars(lpar_name_or_uuid=..., state_only=True)). This tool refuses to delete a partition whose current state is anything other than 'not activated', matching the precondition check pattern used by hmc_remove_memory_pool. This permanently removes the partition and its profiles from the HMC — it is irreversible. Confirm the target with hmc_lpars(name=...) before calling. Returns a confirmation string (immediate delete — no job to poll).
lpar_name_or_uuid: accepts either a PartitionName or a UUID.
Raises: HMCError: If the partition state is not 'not activated' (HTTP 409).
Inputs: lpar_name_or_uuid (required). Returns: result
hmc_delete_media_repositoryADestructive
Delete the Virtual Media Repository from a Volume Group.
vios_name_or_uuid: accepts either a PartitionName or a UUID (find it with hmc_vios). This is an immediate (synchronous) delete — it returns a confirmation string once the HMC has applied the change; there is no job to poll.
Inputs: vg_uuid (required), vios_name_or_uuid (required). Returns: result
hmc_delete_password_policyADestructive
Delete an HMC password policy by name.
This permanently removes the policy — it is irreversible. Confirm the policy_name with hmc_list_password_policies before calling. Returns a confirmation string (immediate delete — no job to poll).
Inputs: policy_name (required). Returns: result
hmc_delete_userADestructive
Delete an HMC user account by username.
This permanently removes the account — it is irreversible. Confirm the username with hmc_users(name=...) before calling. Returns a confirmation string (immediate delete — no job to poll).
Inputs: name (required). Returns: result
hmc_delete_viosADestructive
Delete (destroy) a VIOS partition by UUID.
The VIOS must be powered off first (use hmc_power_off_vios and confirm with hmc_lpars(vios_uuid=..., state_only=True)). This tool refuses to delete a VIOS whose current state is anything other than 'not activated', matching the precondition check pattern used by hmc_remove_memory_pool. This permanently removes the VIOS and its profiles from the HMC — it is irreversible. Confirm the UUID with hmc_vios before calling. Returns a confirmation string (immediate delete — no job to poll).
Raises: HMCError: If the VIOS state is not 'not activated' (HTTP 409).
Inputs: vios_uuid (required). Returns: result
hmc_delete_virtual_networkADestructive
Delete a Virtual Network from a managed system.
system_name_or_uuid: accepts either a SystemName or a UUID (find it with hmc_systems). Note: a network referenced by a NetworkBridge, or equal to a trunk adapter's PVID, cannot be deleted until the bridge is removed. Returns a confirmation string (immediate delete — no job to poll).
Inputs: network_uuid (required), system_name_or_uuid (required). Returns: result
hmc_deploy_partition_templateA
Deploy a partition from a draft partition template.
draft_template_uuid is the transformed/replica template UUID (produced by capture/transform), target_system_uuid is the managed system to create the partition on. Submits a Deploy job; poll hmc_get_job for status.
Set wait=True to block until the job reaches a terminal state.
Inputs: target_system_uuid (required), draft_template_uuid (required), wait, poll_interval, +1 more. Returns: result
hmc_dlpar_memA
DLPAR memory hot-plug: change memory resources on a running LPAR.
lpar_name_or_uuid: accepts either a PartitionName or a UUID. Posts a minimal PartitionMemoryConfiguration document to the HMC. Memory values are in MiB. Only the fields you pass are changed.
If the LPAR does not have an active RMC connection, the change is profile-only and takes effect on next activation (no reboot is triggered).
Inputs: lpar_name_or_uuid (required), max_memory, min_memory, desired_memory. Returns: result
hmc_dlpar_procA
DLPAR processor hot-plug: change CPU resources on a running LPAR.
lpar_name_or_uuid: accepts either a PartitionName or a UUID. Posts a minimal PartitionProcessorConfiguration document to the HMC. Only the fields you pass are changed. For shared partitions, procs are processing units (may be fractional, e.g. 0.5); vcpus are virtual processor counts (ints). Set dedicated=True for whole-CPU assignment, False for shared; omit it to leave the sharing mode unchanged.
If the LPAR does not have an active RMC connection, the change is profile-only and takes effect on next activation (no reboot is triggered).
Inputs: lpar_name_or_uuid (required), uncapped, dedicated, max_procs, +5 more. Returns: result
hmc_find_placementARead-only
Find managed systems that can host a new LPAR of the given size.
Returns systems with at least desired_memory_mb MiB free and at least
desired_proc_units free processor units, sorted by free memory descending.
Each result has the same fields as :func:hmc_capacity_report.
Inputs: desired_memory_mb (required), desired_proc_units. Returns: result
hmc_find_systemARead-only
Find a managed system by its SystemName (exact match).
Returns the full system dict if found, or None if no system with that name is known to the HMC.
Inputs: name (required). Returns: result
hmc_get_available_hmc_ptfsARead-only
Get available PTFs (fixes) for the HMC software.
Issues a GET to the ManagementConsole resource with the SoftwareUpdate group, which returns available PTF information. console_uuid is the ManagementConsole UUID (from hmc_console_info). Does not submit a job.
Inputs: console_uuid (required). Returns: result
hmc_get_jobARead-only
Get the status/result of an HMC job by UUID.
Inputs: job_uuid (required). Returns: result
hmc_get_ldap_configARead-only
Get the current HMC LDAP server configuration.
Returns a single resource dict describing the configured LDAP server URL,
base DN, bind DN, search filter, and HMC group mappings, or None if no
LDAP is configured.
Equivalent to Ansible hmc_user state=ldap_facts.
Inputs: no named parameters. Returns: result
hmc_get_lpar_descriptionARead-only
Get the description field of an LPAR via the HMC CLI.
Runs lssyscfg -r lpar -m <system_name> --filter lpar_names=<lpar_name> -F description on the HMC via SSH and returns the raw output (the
description string, or an empty line if none is set).
This field is not available via the HMC REST API; it is the same description visible in the HMC GUI Partitions tab.
The system and partition may be given by CLI name or by UUID; UUIDs are resolved to their CLI names via REST (falling back to an lssyscfg lookup over SSH when the REST API is unreachable) before the command runs.
Inputs: lpar_name_or_uuid (required), system_name_or_uuid (required). Returns: result
hmc_get_lpar_mspARead-only
Get the MSP (Migratable Service Partition) flag of an LPAR via the HMC CLI.
Runs lssyscfg -r lpar -m <system_name> --filter lpar_names=<lpar_name> -F msp on the HMC via SSH and returns True if the flag is 1,
False if 0.
The system and partition may be given by CLI name or by UUID; UUIDs are resolved to their CLI names via REST (falling back to an lssyscfg lookup over SSH when the REST API is unreachable) before the command runs.
Inputs: lpar_name_or_uuid (required), system_name_or_uuid (required). Returns: result
hmc_get_lpar_proc_compatARead-only
Get the current and pending processor compatibility modes for an LPAR.
Runs lssyscfg -r lpar -m <system_name> --filter lpar_names=<lpar_name> -F pend_lpar_proc_compat_mode,curr_lpar_proc_compat_mode on the HMC via SSH.
The system and partition may be given by CLI name or by UUID; UUIDs are resolved to their CLI names via REST (falling back to an lssyscfg lookup over SSH when the REST API is unreachable) before the command runs.
Returns a dict with keys "pend" and "curr".
Inputs: lpar_name_or_uuid (required), system_name_or_uuid (required). Returns: object
hmc_get_pcm_preferencesARead-only
Get PCM monitoring preferences for a resource.
category is the resource type, e.g. 'ManagedSystem' or 'LogicalPartition'; resource_name_or_uuid is the name or UUID of that resource (a SystemName or UUID from hmc_systems, or a PartitionName or UUID from hmc_lpars). Returns flags like LongTermMonitorEnabled, AggregationEnabled, ShortTermMonitorEnabled, ComputeLTMEnabled, EnergyMonitorEnabled.
Inputs: category (required), resource_name_or_uuid (required). Returns: object
hmc_get_proc_compat_modesARead-only
Get processor compatibility modes supported by a managed system.
Runs lssyscfg -r sys -m <system_name> -F lpar_proc_compat_modes
on the HMC via SSH and returns a list of supported mode strings.
The system may be given by CLI name or by UUID; a UUID is resolved to its CLI name via REST (falling back to an lssyscfg lookup over SSH when the REST API is unreachable) before the command runs.
Inputs: system_name_or_uuid (required). Returns: result
hmc_hmc_updateA
Submit an HMC software update or upgrade job.
kind='update' installs PTFs (patch level); kind='upgrade' performs a full HMC version upgrade. repository is a dict describing the software source: {"type": "nfs", "host": "repo.example.com", "path": "/images/hmc"} {"type": "sftp", "host": "repo.example.com", "path": "/hmc", "user": "admin", "sftp_pw": "..."} {"type": "disk"} # use files already on the HMC disk
Submits an Update or Upgrade job to ManagementConsole; poll hmc_get_job for status. console_uuid is the ManagementConsole UUID (from hmc_console_info).
Set wait=True to block until the job reaches a terminal state.
Inputs: repository (required), console_uuid (required), kind, wait, +2 more. Returns: result
hmc_install_lpar_osA
Submit a NIM-based LPAR OS installation job.
lpar_uuid is the UUID of an existing (powered-off) LPAR. The LPAR will PXE-boot from the NIM server at nim_ip to install its OS. nim_gateway and nim_subnetmask define the network for the NIM install boot; lpar_ip is the IP address the LPAR uses during the NIM install; vlan_id is the VLAN tag for the install network (use "0" for untagged). timeout is the job timeout in minutes (default 60). Returns the submitted job — poll hmc_get_job for status.
Set wait=True to block until the job reaches a terminal state.
Inputs: nim_ip (required), lpar_ip (required), lpar_uuid (required), nim_gateway (required), +6 more. Returns: result
hmc_install_viosA
Submit a NIM-based VIOS installation job.
vios_uuid is the UUID of an existing (powered-off) VIOS partition. The VIOS will PXE-boot from the NIM server at nim_ip to install its OS. nim_gateway and nim_subnetmask define the network for the NIM install boot; vios_ip is the IP address the VIOS uses during the NIM install; vlan_id is the VLAN tag for the install network (use "0" for untagged). timeout is the job timeout in minutes (default 60). Returns the submitted job — poll hmc_get_job for status.
Set wait=True to block until the job reaches a terminal state.
Inputs: nim_ip (required), vios_ip (required), vios_uuid (required), nim_gateway (required), +6 more. Returns: result
hmc_list_adaptersARead-only
List an LPAR's virtual adapters of a given type.
lpar_name_or_uuid: accepts either a PartitionName or a UUID (find it with hmc_lpars). adapter_type is one of: ClientNetworkAdapter, VirtualSCSIClientAdapter, VirtualFibreChannelClientAdapter, VirtualNICDedicated.
Inputs: lpar_name_or_uuid (required), adapter_type. Returns: result
hmc_list_clustersARead-only
List Clusters (sets of VIOS nodes sharing a storage pool).
Inputs: no named parameters. Returns: result
hmc_list_fc_portsARead-only
List Virtual Fibre Channel (NPIV) adapters for a managed system via the HMC CLI.
Runs lshwres -r virtualio --rsubtype fc --level lpar -m <system_name>
on the HMC via SSH and returns parsed dicts with fields including
lpar_name, slot_num, wwpns, and remote_lpar_id.
The system and partition may be given by CLI name or by UUID; UUIDs are resolved to their CLI names via REST (falling back to an lssyscfg lookup over SSH when the REST API is unreachable) before the command runs. Pass lpar_name_or_uuid to restrict results to a single partition. Either a CLI name or UUID works; use hmc_systems to find a system UUID and hmc_lpars to find an LPAR UUID.
Inputs: system_name_or_uuid (required), lpar_name_or_uuid. Returns: result
hmc_list_io_slotsARead-only
List physical I/O slots on a managed system via the HMC CLI.
Runs lshwres -r io --rsubtype slot -m <system_name> on the HMC via
SSH and returns one dict per slot. Each dict includes fields such as
drc_name, pci_class, feature_codes, and lpar_name
(empty string when the slot is unassigned).
The system may be given by CLI name or by UUID; a UUID is resolved to its CLI name via REST (falling back to an lssyscfg lookup over SSH when the REST API is unreachable) before the command runs.
pci_class filters by PCI class:
"all"— return every slot (default)"eth"— Ethernet adapters (PCI class 0200)"sas"— SAS/SCSI adapters (PCI class 0104)"san"— Fibre Channel / SAN adapters (PCI class 0C04)"nvme"— NVMe adapters (PCI class 0108)
Inputs: system_name_or_uuid (required), pci_class. Returns: result
hmc_list_memory_poolsARead-only
List shared memory pools on a managed system via the HMC CLI.
Runs lshwres -r mempool -m <system_name> on the HMC via SSH and
returns one dict per pool with fields such as pool_name, size,
lpar_names, and curr_lpar_names (comma-separated).
The system may be given by CLI name or by UUID; a UUID is resolved to its CLI name via REST (falling back to an lssyscfg lookup over SSH when the REST API is unreachable) before the command runs.
Inputs: system_name_or_uuid (required). Returns: result
hmc_list_network_bridgesARead-only
List NetworkBridges (Shared Ethernet Adapters) on a managed system.
system_name_or_uuid: accepts either a SystemName or a UUID (find it with hmc_systems).
Inputs: system_name_or_uuid (required). Returns: result
hmc_list_password_policiesARead-only
List HMC password policies.
policy_type selects what to return: 'policies' (default) returns the list of defined password policies, 'status' returns activation status. Returns one dict per policy: {UUID, title, link, ResourceType, Resource}.
Inputs: policy_type. Returns: result
hmc_list_resourcesARead-only
List any uom resource type exposed by the HMC.
Examples: ManagedSystem, LogicalPartition, VirtualIOServer, LogicalPartitionProfile, VirtualSwitch, VirtualNetwork, SharedMemoryPool, SharedProcessorPool, HostEthernetAdapter, SRIOVAdapter, Cluster.
Inputs: resource_type (required). Returns: result
hmc_list_sea_adaptersARead-only
List Shared Ethernet Adapter (SEA) virtual Ethernet ports via the HMC CLI.
Runs lshwres -r virtualio --rsubtype eth --level lpar -m <system_name> -F lpar_name,port_vlan_id,vswitch,state,trunk_priority on the HMC via
SSH and returns parsed dicts with those five fields.
The system and partition may be given by CLI name or by UUID; UUIDs are resolved to their CLI names via REST (falling back to an lssyscfg lookup over SSH when the REST API is unreachable) before the command runs. Pass lpar_name_or_uuid to restrict results to a single partition. Either a CLI name or UUID works; use hmc_systems to find a system UUID and hmc_lpars to find an LPAR UUID.
Inputs: system_name_or_uuid (required), lpar_name_or_uuid. Returns: result
hmc_list_vios_backupsARead-only
List existing VIOS backups for a given VIOS UUID.
Runs lsviosbackup -id <vios_uuid> on the HMC via SSH and parses the
fixed-width table into a list of dicts keyed by the output header
(BackupName, Date, Type). Find vios_uuid with hmc_vios.
Inputs: vios_uuid (required). Returns: result
hmc_list_virtual_networksARead-only
List Virtual Networks (VLANs) on a managed system.
system_name_or_uuid: accepts either a SystemName or a UUID (find it with hmc_systems).
Inputs: system_name_or_uuid (required). Returns: result
hmc_list_virtual_switchesARead-only
List VirtualSwitches on a managed system (names, SwitchIDs, mode).
system_name_or_uuid: accepts either a SystemName or a UUID (find it with hmc_systems). The SwitchID is what hmc_create_virtual_network and hmc_add_network_adapter reference.
Inputs: system_name_or_uuid (required). Returns: result
hmc_list_vnicsARead-only
List vNICs (SR-IOV-backed Virtual NICs) on an LPAR via the HMC CLI.
Runs lshwres -r virtualio --rsubtype vnic --level lpar -m <system_name> --filter lpar_names=<lpar_name> on the HMC via SSH and returns one dict
per vNIC with fields such as vnic_id, capacity, vswitch_name,
port_vlan_id, and backing_devices.
The system and partition may be given by CLI name or by UUID; UUIDs
are resolved to their CLI names via REST (falling back to an lssyscfg
lookup over SSH when the REST API is unreachable) before the command
runs. Use hmc_systems to find a system UUID and
hmc_lpars to find an LPAR UUID.
Inputs: lpar_name_or_uuid (required), system_name_or_uuid (required). Returns: result
hmc_list_volume_groupsARead-only
List Volume Groups on a VIOS.
vios_name_or_uuid: accepts either a PartitionName or a UUID (find it with hmc_vios). Each Volume Group shows free space (MiB), the physical volumes backing it and the virtual disks already carved out.
Inputs: vios_name_or_uuid (required). Returns: result
hmc_lparsARead-only
List logical partitions (LPARs) or get/find one.
Resolution priority (first match wins):
lpar_name_or_uuid + state_only=True → str | None — current LPAR state only (uses the cheap quick-property endpoint instead of a full fetch).
lpar_name_or_uuid → dict | None — full LPAR details. Accepts either a PartitionName or a UUID. When both lpar_name_or_uuid and name are supplied, lpar_name_or_uuid takes priority and name is ignored.
name → dict | None — find by PartitionName (exact match).
system_name_or_uuid → list[dict] — all LPARs on that system. Accepts either a SystemName or a UUID.
state → list[dict] — all LPARs whose PartitionState matches the given value (server-side /search/ endpoint).
(no arguments) → list[dict] — all LPARs known to the HMC.
Raises ValueError if state_only=True is supplied without lpar_name_or_uuid. The state filter is ignored when lpar_name_or_uuid or system_name_or_uuid is supplied.
Inputs: name, state, state_only, lpar_name_or_uuid, +1 more.
hmc_lpar_summaryARead-only
One-call LPAR summary: state, RMC, memory/CPU, OS, adapter count, description.
Composes data from three HMC endpoints in a single call:
GET /rest/api/uom/LogicalPartition/{uuid}— main partition data (state, memory, CPU, OS version, partition type / ID).GET /rest/api/uom/LogicalPartition/{uuid}/ClientNetworkAdapter— client network adapters attached to the partition (count returned).
Accepts either a PartitionName (exact match) or a UUID.
Returns a flat summary dict with the most useful fields:
state/rmc_state— current PartitionState and RMC status.current_memory_mb/desired_memory_mb— active and profile memory.current_proc_units/desired_proc_units— active and profile CPU.desired_vcpus/dedicated_procs— virtual processors or dedicated CPUs.os_version/os_type— OS details reported by the HMC.client_network_adapter_count— number of client network adapters.description— partition description if set.mapped_storage— alwaysnull; resolving vSCSI-mapped storage requires a VIOS UUID hop (vSCSI adapter →vios_partition_id→list_vios+ PartitionID match →get_vios_storage_detail) and is out of scope for this best-effort summary. Usehmc_viosfor per-VIOS storage mappings.
Raises ValueError when the partition cannot be found.
Inputs: lpar_name_or_uuid (required). Returns: object
hmc_map_storage_to_lparA
Map backing storage to an LPAR via a Virtual SCSI mapping on a VIOS.
vios_name_or_uuid: accepts either a PartitionName or a UUID (find it with hmc_vios). lpar_name_or_uuid: accepts either a PartitionName or a UUID (find it with hmc_lpars). The LPAR must already have a vSCSI adapter paired to this VIOS — see hmc_add_vscsi_adapter. storage_kind is 'VirtualDisk' (a logical volume created with hmc_create_virtual_disk) or 'PhysicalVolume' (a whole hdisk). storage_name is the DiskName / device name. target_device optionally pins the vtscsi device name on the VIOS.
Inputs: storage_name (required), lpar_name_or_uuid (required), vios_name_or_uuid (required), storage_kind, +1 more. Returns: result
hmc_migrate_abort_lparADestructive
Abort an in-progress LPM migration of an LPAR.
lpar_name_or_uuid: accepts either a PartitionName or a UUID (find it with hmc_lpars).
Inputs: lpar_name_or_uuid (required). Returns: result
hmc_migrate_lparA
Live-migrate (LPM) an LPAR to another managed system.
lpar_name_or_uuid: accepts either a PartitionName or a UUID (find it with hmc_lpars). Submits a Migrate job. target_system is the target managed-system name. Optionally pin the target profile / wait time. Poll hmc_get_job for status. Run hmc_migrate_validate_lpar first to pre-check.
Set wait=True to block until the job reaches COMPLETED / FAILED / EXCEPTION (or until timeout_seconds elapses).
Inputs: target_system (required), lpar_name_or_uuid (required), wait, wait_time, +3 more. Returns: result
hmc_migrate_recover_lparA
Recover an LPAR after a failed LPM migration.
lpar_name_or_uuid: accepts either a PartitionName or a UUID (find it with hmc_lpars).
Inputs: lpar_name_or_uuid (required). Returns: result
hmc_migrate_validate_lparA
Validate whether an LPM migration of an LPAR to target_system would succeed.
lpar_name_or_uuid: accepts either a PartitionName or a UUID (find it with hmc_lpars). Set wait=True to block until the validation job reaches a terminal state.
Inputs: target_system (required), lpar_name_or_uuid (required), wait, wait_time, +3 more. Returns: result
hmc_modify_lparA
Modify an LPAR's name and/or resource assignment (memory / CPU).
lpar_name_or_uuid: accepts either a PartitionName or a UUID (find it with hmc_lpars). Only the fields you pass are changed. Memory values are in MiB. For a running partition these are dynamic (DLPAR) operations and require an active RMC connection; otherwise the change applies on next activation. Set dedicated=True to assign whole CPUs, False for shared processing units + virtual processors; omit it to leave the sharing mode unchanged.
Inputs: lpar_name_or_uuid (required), name, uncapped, dedicated, +9 more. Returns: result
hmc_modify_password_policyA
Modify an existing HMC password policy.
Only the fields you supply are changed. Use hmc_list_password_policies to confirm the current state before calling. To activate or deactivate a policy, use the HMC console — the REST API activates a policy by name via the PolicyType=status query path rather than a direct field change. Returns the updated policy resource dict.
Inputs: policy_name (required), pwage, hist_size, min_pwage, +6 more. Returns: result
hmc_modify_systemA
Modify a managed system's configuration.
Only the fields you pass are changed; omitted fields are left as-is.
system_name_or_uuid: the managed system — accepts either a SystemName or a UUID (from hmc_systems). new_name: rename the managed system. power_off_policy: power-off policy — 1 powers the system off after all partitions shut down, 0 leaves it powered on. power_on_lpar_start_policy: LPAR auto-start policy on system power-on — 'autostart', 'userinit', or 'autorecovery'. pend_mem_region_size: pending memory region size (MiB). requested_num_sys_huge_pages: number of huge memory pages to allocate. mem_mirroring_mode: memory mirroring mode — 'none' or 'sys_firmware_only'.
Inputs: system_name_or_uuid (required), new_name, power_off_policy, mem_mirroring_mode, +3 more. Returns: result
hmc_modify_userA
Modify an existing HMC user account.
Only the fields you supply are changed. enable=True re-enables a disabled account; enable=False disables it. Use hmc_users(name=...) to confirm the current state before calling. Returns the updated user resource dict.
Inputs: name (required), enable, password, taskrole, +1 more. Returns: result
hmc_partition_templatesARead-only
List partition templates or get one by UUID.
When template_uuid is omitted, returns a list of all partition templates in the HMC template library.
When template_uuid is provided, returns the full config dict for that one template, or None if not found.
Inputs: template_uuid.
hmc_power_off_lparADestructive
Submit a PowerOff job for a logical partition.
lpar_name_or_uuid: accepts either a PartitionName or a UUID. immediate=True forces an immediate power off (no graceful OS shutdown). Returns the submitted job. This changes the state of a real partition.
Set wait=True to block until the job reaches a terminal state.
Inputs: lpar_name_or_uuid (required), wait, immediate, poll_interval, +1 more. Returns: result
hmc_power_off_systemADestructive
Power off a managed system (PowerOff job). immediate skips graceful shutdown.
system_name_or_uuid: accepts either a SystemName or a UUID. Set wait=True to block until the job reaches a terminal state.
Inputs: system_name_or_uuid (required), wait, immediate, poll_interval, +1 more. Returns: result
hmc_power_off_viosADestructive
Power off a VIOS (PowerOff job). immediate skips graceful shutdown.
vios_name_or_uuid: accepts either a PartitionName or a UUID. Set wait=True to block until the job reaches a terminal state.
Inputs: vios_name_or_uuid (required), wait, immediate, poll_interval, +1 more. Returns: result
hmc_power_on_lparA
Submit a PowerOn job for a logical partition.
lpar_name_or_uuid: accepts either a PartitionName or a UUID (find it with hmc_lpars). Returns the submitted job (check hmc_get_job for status). This changes the state of a real partition — confirm the target with hmc_lpars(name=...) before calling.
If the partition is already in the 'running' state, the tool returns
{"already_running": True, "message": "..."} without submitting a job.
Pass force=True to skip this check and submit the PowerOn unconditionally.
Set wait=True to block until the job reaches COMPLETED / FAILED / EXCEPTION (or until timeout_seconds elapses).
Inputs: lpar_name_or_uuid (required), wait, force, poll_interval, +1 more. Returns: result
hmc_power_on_systemA
Power on a managed system (PowerOn job).
system_name_or_uuid: accepts either a SystemName or a UUID (find it with hmc_systems). Set wait=True to block until the job reaches a terminal state.
Inputs: system_name_or_uuid (required), wait, poll_interval, timeout_seconds. Returns: result
hmc_power_on_viosB
Power on a VIOS (PowerOn job).
vios_name_or_uuid: accepts either a PartitionName or a UUID (find it with hmc_vios). Set wait=True to block until the job reaches a terminal state.
Inputs: vios_name_or_uuid (required), wait, poll_interval, timeout_seconds. Returns: result
hmc_processed_metricsARead-only
List or download processed PCM metrics JSON documents.
category is the resource type, e.g. 'ManagedSystem' or 'LogicalPartition'; resource_name_or_uuid is the name or UUID of that resource. Processed metrics have 30s granularity and ~2h retention. Timestamps are ISO-8601 UTC (yyyy-MM-ddTHH:mm:ssZ); start_ts is required.
mode='links' returns the Atom feed link list (list of dicts with 'link',
'updated', 'title' keys). mode='fetch' (default) downloads and returns the
parsed JSON of the most recent document, or {} when no metrics are
available in the requested range.
Inputs: category (required), start_ts (required), resource_name_or_uuid (required), mode, +2 more. Returns: result
hmc_provision_lparA
Provision a new LPAR end-to-end: create, add network adapter, add vSCSI adapter, map disk storage, and power on — in a single call.
Always validates preconditions first (name uniqueness, VLAN existence,
volume-group existence). Pass dry_run=True to run only the
precondition checks without creating anything; the result will show each
step as {"status": "dry_run"}.
On partial failure the completed steps are reported as "ok", the
failed step as "error", and remaining steps as "skipped".
No automatic rollback is performed — clean up manually with
hmc_delete_lpar / hmc_delete_adapter as appropriate.
Inputs: name (required), vios_slot (required), vios_uuid (required), port_vlan_id (required), +13 more. Returns: object
hmc_recent_jobsARead-only
List recent HMC jobs (most recent first, up to limit entries).
Returns a list of parsed job dicts with at minimum JobID and Status. Useful for auditing recent HMC activity — power operations, firmware updates, migrations, etc.
Inputs: limit. Returns: result
hmc_remote_restart_lparADestructive
Remote-restart a failed LPAR on another managed system.
lpar_name_or_uuid: accepts either a PartitionName or a UUID (find it with hmc_lpars).
Inputs: target_system (required), lpar_name_or_uuid (required). Returns: result
hmc_remove_ldap_configADestructive
Remove a component of the HMC LDAP server configuration.
resource selects what to remove. Valid values: 'backup' — remove the backup LDAP server 'ldap' — remove the entire LDAP configuration 'binddn' — remove the bind DN 'bindpw' — remove the bind password 'searchfilter' — remove the custom search filter 'hmcgroups' — remove HMC group mappings 'groupmemberattributes' — remove group-member attribute settings
Equivalent to Ansible hmc_user action=remove_ldap_config.
Use hmc_get_ldap_config to inspect the current state before calling.
Returns a confirmation string (immediate delete — no job to poll).
Inputs: resource (required). Returns: result
hmc_remove_memory_poolADestructive
Remove a shared memory pool from a managed system via the HMC CLI.
Before issuing the remove command, fetches the current pool list and
checks that pool_name exists and that no LPARs are still assigned to
it. If a pool with that name is missing, or any LPARs are still
assigned, the command is not executed and an HMCCLIError
describing the problem is raised instead.
Runs chhwres -r mempool -m <system_name> -o r -a <pool_name> on
the HMC via SSH when the pool exists and no LPARs are assigned.
The system may be given by CLI name or by UUID; a UUID is resolved to its CLI name via REST (falling back to an lssyscfg lookup over SSH when the REST API is unreachable) before the command runs.
WARNING: This permanently removes the pool — confirm system_name_or_uuid and pool_name before calling. Returns the HMC CLI output (immediate delete — no job to poll).
Raises: HMCCLIError: If pool_name has LPARs still assigned to it, or if no pool with that name exists on the managed system.
Inputs: pool_name (required), system_name_or_uuid (required). Returns: result
hmc_remove_vnicADestructive
Remove a vNIC from an LPAR via the HMC CLI.
Runs chhwres -r virtualio --rsubtype vnic -o r -m <system_name> --filter lpar_names=<lpar_name> -a "vnic_id=<vnic_id>" on the HMC
via SSH.
The system and partition may be given by CLI name or by UUID; UUIDs are resolved to their CLI names via REST (falling back to an lssyscfg lookup over SSH when the REST API is unreachable) before the command runs.
vnic_id is the numeric ID as reported by hmc_list_vnics.
WARNING: This modifies the LPAR configuration on the HMC. Confirm system_name_or_uuid, lpar_name_or_uuid, and vnic_id before calling. Returns the HMC CLI output (immediate delete — no job to poll).
Inputs: vnic_id (required), lpar_name_or_uuid (required), system_name_or_uuid (required). Returns: result
hmc_restore_lpar_profilesADestructive
Restore LPAR profiles from a backup file via the HMC CLI.
Runs rstprofdata -m <system_name> -f <file_path> on the HMC via SSH
and returns the raw command output.
The system may be given by CLI name or by UUID; a UUID is resolved to its CLI name via REST (falling back to an lssyscfg lookup over SSH when the REST API is unreachable) before the command runs.
IMPORTANT: file_path is on the HMC filesystem, not the local machine. The backup file must already exist at that path on the HMC host.
WARNING: Restoring overwrites the current LPAR profile configuration. Confirm the system_name_or_uuid and file_path before calling.
Inputs: file_path (required), system_name_or_uuid (required). Returns: result
hmc_restore_viosADestructive
Restore a VIOS from a named backup via the HMC CLI.
Runs chviosbackup -id <vios_uuid> -operation restore -file <backup_name>
on the HMC via SSH. vios_uuid is the VIOS UUID (from hmc_vios);
backup_name is the backup file name as listed by hmc_list_vios_backups.
WARNING: Restoring overwrites the current VIOS configuration. Confirm the vios_uuid and backup_name before calling.
Returns the raw HMC CLI output.
Inputs: vios_uuid (required), backup_name (required). Returns: result
hmc_run_commandA
Execute an arbitrary HMC CLI command over SSH and return its output.
WARNING: This tool executes arbitrary commands on the HMC with the
credentials configured in HMC_USER / HMC_PASSWORD (or HMC_SSH_KEY_FILE).
It is an operator escape-hatch equivalent to Ansible hmc_command.
Use only for HMC CLI operations that have no dedicated MCP tool.
Authentication follows the same env-var configuration as all other tools: set HMC_SSH_KEY_FILE to use key-based auth, otherwise password auth is used.
Reference: https://www.ibm.com/docs/en/power10/7063-CR1?topic=hmc-commands
Inputs: cmd (required). Returns: result
hmc_set_lpar_descriptionA
Set the description field of an LPAR via the HMC CLI.
Runs chsyscfg -r lpar -m <system_name> -i "name=<lpar_name>,description=<description>" on the HMC via SSH.
This field is not settable via the HMC REST API. The description appears in the HMC GUI Partitions tab and is useful for recording partition ownership, purpose, or current task.
The system and partition may be given by CLI name or by UUID; UUIDs are resolved to their CLI names via REST (falling back to an lssyscfg lookup over SSH when the REST API is unreachable) before the command runs.
WARNING: This modifies the LPAR configuration on the HMC. Confirm lpar_name_or_uuid and system_name_or_uuid before calling.
Inputs: description (required), lpar_name_or_uuid (required), system_name_or_uuid (required). Returns: result
hmc_set_lpar_mspA
Set the MSP (Migratable Service Partition) flag of an LPAR via the HMC CLI.
Runs chsyscfg -r lpar -m <system_name> -i "name=<lpar_name>,msp=<0|1>" on the HMC via SSH.
The system and partition may be given by CLI name or by UUID; UUIDs are resolved to their CLI names via REST (falling back to an lssyscfg lookup over SSH when the REST API is unreachable) before the command runs.
WARNING: This modifies the LPAR configuration on the HMC. Confirm lpar_name_or_uuid and system_name_or_uuid before calling.
Inputs: enabled (required), lpar_name_or_uuid (required), system_name_or_uuid (required). Returns: result
hmc_set_lpar_proc_compatA
Set the processor compatibility mode of an LPAR.
Runs chsyscfg -r lpar -m <system_name> -i "name=<lpar_name>,lpar_proc_compat_mode=<mode>"
on the HMC via SSH.
The system and partition may be given by CLI name or by UUID; UUIDs are resolved to their CLI names via REST (falling back to an lssyscfg lookup over SSH when the REST API is unreachable) before the command runs.
WARNING: This modifies the LPAR configuration on the HMC. Confirm lpar_name_or_uuid, system_name_or_uuid, and mode before calling.
Inputs: mode (required), lpar_name_or_uuid (required), system_name_or_uuid (required). Returns: result
hmc_set_pcm_preferencesA
Enable/disable PCM data collection for a resource.
category is the resource type, e.g. 'ManagedSystem' or 'LogicalPartition';
resource_name_or_uuid is the name or UUID of that resource. Only the flags
you set are changed. Turning on aggregation implicitly enables long-term
monitoring on the HMC. Long-term + aggregation are required before
processed/aggregated metrics become available. Returns the updated
preferences dict ({} if the HMC returns no body).
Raises: ValueError: if no preference flags are supplied.
Inputs: category (required), resource_name_or_uuid (required), aggregation, compute_ltm, +3 more. Returns: object
hmc_set_sriov_adapter_modeA
Toggle a physical SR-IOV adapter between SR-IOV and dedicated mode.
Runs chhwres -r sriov -m <system_name> -o s --id <adapter_id> -a "sriov_adapter_mode=<mode>" on the HMC via SSH and returns the raw
command output.
The system may be given by CLI name or by UUID; a UUID is resolved to its CLI name via REST (falling back to an lssyscfg lookup over SSH when the REST API is unreachable) before the command runs.
adapter_id is the physical adapter identifier as reported by
hmc_list_io_slots.
mode must be one of:
"sriov"— enable SR-IOV mode (shared virtual functions)"dedicated"— disable SR-IOV, use as a dedicated (passthrough) adapter
WARNING: Changing SR-IOV adapter mode affects all partitions using virtual functions on that adapter. Confirm system_name_or_uuid and adapter_id before calling.
Inputs: mode (required), adapter_id (required), system_name_or_uuid (required). Returns: result
hmc_sync_lpar_profileADestructive
Sync an LPAR's running configuration back to its current profile.
Runs chsyscfg -r lpar -m <system_name> -i "name=<lpar_name>,sync_curr_profile=1"
on the HMC via SSH and returns the raw command output.
This operation saves the LPAR's current running configuration to its current named profile, overwriting the previous profile definition.
WARNING: Overwrites the current profile definition. Confirm the system_name_or_uuid and lpar_name_or_uuid before calling.
The system and partition may be given by CLI name or by UUID; UUIDs are resolved to their CLI names via REST (falling back to an lssyscfg lookup over SSH when the REST API is unreachable) before the command runs.
Inputs: lpar_name_or_uuid (required), system_name_or_uuid (required). Returns: result
hmc_systemsARead-only
List all managed systems or get one by name or UUID.
When system_name_or_uuid is omitted, returns a list of all managed systems known to the HMC — each entry has UUID, SystemName, State, MTMS (machine type/model/serial), IPAddress, etc.
When system_name_or_uuid is provided, accepts either a SystemName or a UUID and returns the full details dict for that one system, or None if not found.
When state is provided and system_name_or_uuid is omitted, returns only systems whose State property matches the given value, using the HMC server-side search endpoint.
Inputs: state, system_name_or_uuid.
hmc_system_summaryARead-only
One-call managed system summary: state, MTMS, firmware, LPAR counts, free resources, VIOS count.
Composes data from three HMC endpoints in a single call:
GET /rest/api/uom/ManagedSystem/{uuid}— main system data (state, MTMS, firmware version, total memory/CPU).GET /rest/api/uom/ManagedSystem/{uuid}/LogicalPartition— LPAR list, counted by PartitionState.GET /rest/api/uom/ManagedSystem/{uuid}/VirtualIOServer— VIOS count.
Accepts either a SystemName (exact match) or a UUID.
Returns a flat summary dict with the most useful fields:
state— current system State (operating, standby, ...).mtms— machine type/model/serial (MachineTypeModelSerialNumber).firmware_version— system firmware version string.total_memory_mb/free_memory_mb— total assignable and free memory.total_proc_units/free_proc_units— total configurable and free CPU.lpar_count— total number of LPARs.lpar_states— dict mapping PartitionState → count.vios_count— number of Virtual I/O Servers.
Raises ValueError when the system cannot be found.
Inputs: system_name_or_uuid (required). Returns: object
hmc_update_firmwareA
Submit a managed system firmware update job.
system_name_or_uuid: accepts either a SystemName or a UUID (find it with hmc_systems). repository describes the firmware image source (same format as hmc_hmc_update). Submits an UpdateFirmware job to ManagedSystem; poll hmc_get_job for status.
Set wait=True to block until the job reaches a terminal state.
Inputs: repository (required), system_name_or_uuid (required), wait, poll_interval, +1 more. Returns: result
hmc_usersARead-only
List HMC user accounts or get one by username.
When name is provided, returns a single resource dict for that user, or None if not found. user_type is ignored when name is supplied.
When name is omitted, returns a list of all user accounts filtered by user_type: 'local' (local HMC accounts), 'kerberos' (Kerberos/LDAP-backed accounts), or 'all' (default). Returns one dict per user: {UUID, title, link, ResourceType, Resource} where Resource holds the flattened HmcUser fields.
Inputs: name, user_type.
hmc_viosARead-only
List Virtual I/O Servers or get storage-detail mappings for one.
When vios_name_or_uuid is provided, accepts either a PartitionName or a UUID and returns the VIOS device mapping facts (vSCSI, NPIV, virtual optical) for that VIOS.
When vios_name_or_uuid is omitted, returns a list of all VIOS entries, optionally restricted to one managed system via system_name_or_uuid (accepts either a SystemName or a UUID).
When state is provided and vios_name_or_uuid is omitted, returns only VIOS entries whose PartitionState matches the given value, using the HMC server-side search endpoint. The state filter is ignored when vios_name_or_uuid or system_name_or_uuid is supplied.
Inputs: state, vios_name_or_uuid, system_name_or_uuid.
hmc_vios_updateA
Submit a VIOS software update or upgrade job.
vios_name_or_uuid: accepts either a PartitionName or a UUID (find it with hmc_vios). kind='update' installs fixes (PTF level); kind='upgrade' performs a full VIOS version upgrade. repository describes the image source (same format as hmc_hmc_update). Submits an Update or Upgrade job to VirtualIOServer; poll hmc_get_job for status.
Set wait=True to block until the job reaches a terminal state.
Inputs: repository (required), vios_name_or_uuid (required), kind, wait, +2 more. Returns: result
hmc_wait_for_jobARead-only
Poll an HMC job until it reaches a terminal state (COMPLETED / FAILED / EXCEPTION).
Returns the final job entry. If timeout_seconds elapses before a terminal state is reached, returns the last-seen entry regardless of status — check the Status field to distinguish timeout from completion.
Inputs: job_uuid (required), poll_interval, timeout_seconds. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 101 tools
Most tools have clearly distinct purposes, but minor overlaps exist: hmc_find_system duplicates hmc_systems(name=...), hmc_provision_lpar overlaps with the create+adapter+storage sequence, and hmc_list_resources is a generic catch-all. Detailed descriptions mitigate most confusion.
The vast majority follow hmc_<verb>_<noun> (list, create, delete, modify, power, add, remove, backup, restore, install, migrate, get, set). A few tools use bare plural nouns (hmc_systems, hmc_lpars, hmc_vios) or noun phrases (hmc_console_info, hmc_capacity_report), creating minor inconsistency, but the pattern remains predictable.
At 101 tools, this is far beyond the 3-15 tool sweet spot. Even for a complex domain like HMC management, the sheer number overwhelms agents and makes tool selection costly. The server would benefit from consolidation, e.g., merging some list/get operations into single parameterized tools.
The tool set covers a remarkably broad range: LPAR/VIOS lifecycle, power, storage, networking, users, updates, metrics, migrations, and profiles. However, there are obvious gaps: no delete/modify for volume groups or virtual disks, no create for shared memory pools, no management for virtual switches beyond listing, and no CRUD for clusters/SSPs themselves.
Maintenance
Related MCP Connectors
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for Nutanix Prism Central v4 REST API, enabling AI agents to list and inspect VMs, control VM power state, list clusters, read alerts, and list subnets.8MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for interacting with QUADS infrastructure systems via API, enabling resource management and automation through LLM applications.MIT
- AlicenseAqualityDmaintenanceAI-powered MCP server for enterprise OpenShift/Kubernetes cluster management, providing diagnostic tools, RAG knowledge retrieval, and autonomous remediation recommendations.9MIT
- AlicenseCqualityCmaintenanceMCP server for IBM Concert Operate that exposes the full v2 REST API as callable tools, enabling AI assistants to manage alerts, incidents, policies, runbooks, and more.9710 npm3MIT