# cloudhv_vm_list

List all Cloud Hypervisor virtual machines.

```rhai
cloudhv_vm_list() -> Array
```

## Returns

Returns an array of VM records, each containing `spec` and `runtime` maps.

## Examples

```rhai
let vms = cloudhv_vm_list();

for vm in vms {
    print("VM ID: " + vm.spec.id);
    print("  Status: " + vm.runtime.status);
    print("  vCPUs: " + vm.spec.vcpus);
    print("  Memory: " + vm.spec.memory_mb + "MB");
    print("  Disk: " + vm.spec.disk_path);
    
    if vm.runtime.pid != () {
        print("  PID: " + vm.runtime.pid);
    }
}
```

## VM Record Structure

Each VM record contains:
- `spec`: VM specification
  - `id`: VM identifier
  - `kernel_path`: Kernel path (if using direct boot)
  - `firmware_path`: Firmware path (if using UEFI)
  - `disk_path`: Disk image path
  - `api_socket`: API socket path
  - `vcpus`: Number of CPUs
  - `memory_mb`: Memory in MB
  - `cmdline`: Kernel command line
  - `extra_args`: Extra arguments
- `runtime`: VM runtime state
  - `pid`: Process ID (if running)
  - `status`: VM status ("running", "stopped", etc.)
  - `log_file`: Log file path

## Notes

- Lists all VMs regardless of their state
- Use to check which VMs exist and their status
