[GH-ISSUE #25] Get-PveNodesQemuConfig returns nothing #21

Closed
opened 2026-02-26 17:32:09 +03:00 by kerem · 2 comments
Owner

Originally created by @smitty-nieto on GitHub (Sep 25, 2024).
Original GitHub issue: https://github.com/Corsinvest/cv4pve-api-powershell/issues/25

I can't seem to get this to return anything. Everything else in the API seems to function as expected. The api keys and such below are in a test lab so not concerned with exposure.

PS C:\Users\MikeSmith> Get-PveNodesQemuConfig -Current -Node pve2 -Vmid 120

Response            : @{data=}
StatusCode          : 200
ReasonPhrase        :
IsSuccessStatusCode : True
RequestResource     : /nodes/pve2/qemu/120/config
Parameters          : {[current, 1]}
Method              : Get
ResponseType        : json

I can call it directly with curl and get a good response

curl -k -H 'Authorization: PVEAPIToken=root@pam!snap=50d43893-f934-41b1-b31b-b8f8a547b473' "https://192.168.2.200:8006/api2/json/nodes/pve2/qemu/120/config" | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   799  100   799    0     0  13868      0 --:--:-- --:--:-- --:--:-- 14017
{
  "data": {
    "scsihw": "virtio-scsi-single",
    "cpu": "x86-64-v2-AES",
    "meta": "creation-qemu=8.1.5,ctime=1718052671",
    "efidisk0": "Shared_Storage:120/vm-120-disk-1.qcow2,efitype=4m,pre-enrolled-keys=1,size=528K",
    "agent": "1",
    "bios": "ovmf",
    "scsi0": "Shared_Storage:120/vm-120-disk-0.qcow2,iothread=1,size=52G,ssd=1",
    "sockets": 2,
    "boot": "order=scsi0;ide0",
    "machine": "pc-q35-8.1",
    "net0": "e1000=BC:24:11:25:D8:CA,bridge=vmbr0,firewall=1",
    "tpmstate0": "ZFS-Pool:vm-120-disk-2,size=4M,version=v2.0",
    "memory": "16384",
    "vmgenid": "beccf04e-525b-43c1-821a-3b0b9f9e24a5",
    "cores": 2,
    "name": "Jumpbox-1",
    "digest": "3e90bff8536452d3b81dd2cbf467c53c6484e95b",
    "net1": "virtio=BC:24:11:E1:F1:07,bridge=LAN,mtu=1,queues=4,tag=800",
    "ostype": "win11",
    "smbios1": "uuid=ad0f2e98-198b-4567-82db-3841525e2b6d",
    "numa": 0,
    "ide0": "none,media=cdrom"
  }
}

Originally created by @smitty-nieto on GitHub (Sep 25, 2024). Original GitHub issue: https://github.com/Corsinvest/cv4pve-api-powershell/issues/25 I can't seem to get this to return anything. Everything else in the API seems to function as expected. The api keys and such below are in a test lab so not concerned with exposure. ``` PS C:\Users\MikeSmith> Get-PveNodesQemuConfig -Current -Node pve2 -Vmid 120 Response : @{data=} StatusCode : 200 ReasonPhrase : IsSuccessStatusCode : True RequestResource : /nodes/pve2/qemu/120/config Parameters : {[current, 1]} Method : Get ResponseType : json ``` I can call it directly with curl and get a good response ``` curl -k -H 'Authorization: PVEAPIToken=root@pam!snap=50d43893-f934-41b1-b31b-b8f8a547b473' "https://192.168.2.200:8006/api2/json/nodes/pve2/qemu/120/config" | jq % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 799 100 799 0 0 13868 0 --:--:-- --:--:-- --:--:-- 14017 { "data": { "scsihw": "virtio-scsi-single", "cpu": "x86-64-v2-AES", "meta": "creation-qemu=8.1.5,ctime=1718052671", "efidisk0": "Shared_Storage:120/vm-120-disk-1.qcow2,efitype=4m,pre-enrolled-keys=1,size=528K", "agent": "1", "bios": "ovmf", "scsi0": "Shared_Storage:120/vm-120-disk-0.qcow2,iothread=1,size=52G,ssd=1", "sockets": 2, "boot": "order=scsi0;ide0", "machine": "pc-q35-8.1", "net0": "e1000=BC:24:11:25:D8:CA,bridge=vmbr0,firewall=1", "tpmstate0": "ZFS-Pool:vm-120-disk-2,size=4M,version=v2.0", "memory": "16384", "vmgenid": "beccf04e-525b-43c1-821a-3b0b9f9e24a5", "cores": 2, "name": "Jumpbox-1", "digest": "3e90bff8536452d3b81dd2cbf467c53c6484e95b", "net1": "virtio=BC:24:11:E1:F1:07,bridge=LAN,mtu=1,queues=4,tag=800", "ostype": "win11", "smbios1": "uuid=ad0f2e98-198b-4567-82db-3841525e2b6d", "numa": 0, "ide0": "none,media=cdrom" } } ```
kerem closed this issue 2026-02-26 17:32:09 +03:00
Author
Owner

@franklupo commented on GitHub (Sep 26, 2024):

The object result contain data parameter

<!-- gh-comment-id:2376701082 --> @franklupo commented on GitHub (Sep 26, 2024): The object result contain data parameter
Author
Owner

@J-Corentin commented on GitHub (Sep 26, 2024):

To return the config, you need to use the command as follows:

(Get-PveNodesQemuConfig -Current -Node pve2 -Vmid 120).ToData()
<!-- gh-comment-id:2377303559 --> @J-Corentin commented on GitHub (Sep 26, 2024): To return the config, you need to use the command as follows: ```ps (Get-PveNodesQemuConfig -Current -Node pve2 -Vmid 120).ToData() ```
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cv4pve-api-powershell#21
No description provided.