-
Notifications
You must be signed in to change notification settings - Fork 3
mcp_tools
The OpenNebula MCP Server provides a suite of tools for interacting with your cloud infrastructure. They are grouped into three categories.
These tools provide read-only access to information about your OpenNebula cloud's core infrastructure.
Lists all OpenNebula clusters accessible to the current user.
list_clusters() -> strReturns: An XML string containing the list of clusters.
Lists all available compute hosts.
list_hosts(cluster_id: str = None) -> strParameters:
-
cluster_id(optional): The ID of a specific cluster to filter the hosts by.
Returns: An XML string containing the list of hosts.
Lists all available storage datastores.
list_datastores() -> strReturns: An XML string containing the list of datastores.
Lists all available virtual networks.
list_networks() -> strReturns: An XML string containing the list of virtual networks.
Lists all available virtual machine images.
list_images() -> strReturns: An XML string containing the list of VM images.
This category contains tools for managing VM templates.
Lists all VM templates available for instantiation.
list_templates() -> strReturns: An XML string containing the list of VM templates.
These tools are used to manage the lifecycle of virtual machines. Tools that modify the system state are marked and require the --allow-write flag to be enabled.
Retrieves a list of all virtual machines, with optional filters.
list_vms(state: str = None, host_id: str = None, cluster_id: str = None) -> strParameters:
-
state(optional): Filter by VM state ID (e.g.,3,8). -
host_id(optional): Filter VMs running on a specific host ID. -
cluster_id(optional): Filter VMs within a specific cluster ID.
Returns: An XML string containing the list of virtual machines.
Retrieves detailed information for a single VM.
get_vm_status(vm_id: str) -> strParameters:
-
vm_id: The ID of the virtual machine to query.
Returns: An XML string with the detailed status and configuration of the VM.
Creates a new VM from an existing template.
instantiate_vm(template_id: str, vm_name: str = None, cpu: str = None, memory: str = None, network_name: str = None) -> strParameters:
-
template_id: The ID of the template to instantiate from. -
vm_name(optional): A name for the new VM. -
cpu(optional): The number of virtual CPUs to allocate. -
memory(optional): The amount of memory in MB to allocate. -
network_name(optional): The name of the network to attach.
Returns: An XML string containing the details of the newly created VM.
Performs a lifecycle action on a VM (start, stop, reboot, terminate).
manage_vm(vm_id: str, operation: str, hard: bool = False) -> strParameters:
-
vm_id: The ID of the VM to manage. -
operation: The action to perform (start,stop,reboot,terminate). -
hard(optional): IfTrue, forces the operation (e.g., a hard stop instead of a graceful one).
Returns: A status message indicating the result of the operation.
Executes a non-interactive shell command inside a running VM.
execute_command(vm_ip_address: str, command: str) -> strParameters:
-
vm_ip_address: The IP address of the target VM. -
command: The shell command to execute.
Returns: An XML string containing the standard output of the command.
If you observe incorrect behavior or unexpected results, please report it via GitHub Issues so the team can investigate and improve the experience.