vm_info – Retrieve information about the VMs.
Retrieve information about all or single VM present on the cluster.
New in version 0.0.1.
Examples
- name: Retrieve specific VM
scale_computing.hypercore.vm_info:
vm_name: demo-vm
register: result
- name: Retrieve all VMs.
scale_computing.hypercore.vm_info:
register: result
Parameters
- cluster_instance (optional)
Scale Computing HyperCore instance information.
type: dict- host (required)
The HyperCore instance URL.
If not set, the value of the
SC_URLenvironment variable will be used.For example “https://10.1.2.3:443”.
type: str- password (required)
Password used for authentication.
If not set, the value of the
SC_PASSWORDenvironment variable will be used.type: str- timeout (optional)
Timeout in seconds for the connection with the Scale Computing HyperCore API instance.
If not set, the value of the
SC_TIMEOUTenvironment variable will be used.type: float- username (required)
Username used for authentication.
If not set, the value of the
SC_USERNAMEenvironment variable will be used.type: str
- vm_name (optional)
VM’s name.
Serves as unique identifier across endpoint VirDomain.
If specified, the VM with that name will get returned. Otherwise, all VMs are going to get returned.
type: str
Return Values
- records
A list of VMs records.
sample:
boot_devices: - cache_mode: none disable_snapshotting: false disk_slot: 2 mount_points: [] name: '' read_only: false size: 10737418240 tiering_priority_factor: 8 type: virtio_disk uuid: d48847d0-91b1-4edf-ab28-3be864494711 vm_uuid: 183c5d7c-1e2e-4871-84e8-9ef35bfda5ca description: demo-vm-description disks: - cache_mode: none disable_snapshotting: false disk_slot: 0 mount_points: [] name: '' read_only: false size: 8100100100 tiering_priority_factor: 8 type: virtio_disk uuid: e8c8aa6b-1043-48a0-8407-2c432d705378 vm_uuid: 1596dab1-6f90-494c-9607-b14221830433 nics: - connected: true ipv4_addresses: [] mac: 12-34-56-78-AB type: virtio uuid: 07a2a68a-0afa-4718-9c6f-00a39d08b67e vlan: 15 node_affinity: backup_node: backplane_ip: 10.0.0.3 lan_ip: 10.0.0.4 node_uuid: f6v3c6b3-99c6-475b-8e8e-9ae2587db5fc peer_id: 2 preferred_node: backplane_ip: 10.0.0.1 lan_ip: 10.0.0.2 node_uuid: 638920f2-1069-42ed-b311-5368946f4aca peer_id: 1 strict_affinity: true power_state: stopped snapshot_schedule: demo-snapshot-schedule tags: group-name,tag1,tag2 uuid: f0c91f97-cbfc-40f8-b918-ab77ae8ea7fb vcpu: 2 vm_name: demo-vm