[GH-ISSUE #34] Better documentation #24

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

Originally created by @enthusedcoder on GitHub (Mar 4, 2025).
Original GitHub issue: https://github.com/Corsinvest/cv4pve-api-powershell/issues/34

Dude. I am trying to use your module to create new vms in my proxmox instance, but I keep getting parameter validation errors whenever I attempt to attach a new disk to the vm. I have scoured the internet looking for an example of how to do this even in the regular rest API and I can find nothing. Here is what I have so far that successfully creates a new vm with no attached hard drives:

$net = @{}
$net.Add(0, "model=e1000,bridge=vmbr0,firewall=1")
New-PveQemu -Balloon 4096 -Bios ovmf -Cpu host -Cores 4 -Machine q35 -Node prox -Pool res -Ostype win10 -Scsihw virtio-scsi-pci -Vmid 200 -Name go -Storage fourt -Vga "type=qxl,memory=32" -NetN $net

What I need is to add an efi disk as well as a 100GB sata disk to act as the primary. Can you please provide some examples as to what valid parameters would be for "-efidisk0" and "-sataN"?

Originally created by @enthusedcoder on GitHub (Mar 4, 2025). Original GitHub issue: https://github.com/Corsinvest/cv4pve-api-powershell/issues/34 Dude. I am trying to use your module to create new vms in my proxmox instance, but I keep getting parameter validation errors whenever I attempt to attach a new disk to the vm. I have scoured the internet looking for an example of how to do this even in the regular rest API and I can find nothing. Here is what I have so far that successfully creates a new vm with no attached hard drives: ``` $net = @{} $net.Add(0, "model=e1000,bridge=vmbr0,firewall=1") New-PveQemu -Balloon 4096 -Bios ovmf -Cpu host -Cores 4 -Machine q35 -Node prox -Pool res -Ostype win10 -Scsihw virtio-scsi-pci -Vmid 200 -Name go -Storage fourt -Vga "type=qxl,memory=32" -NetN $net ``` What I need is to add an efi disk as well as a 100GB sata disk to act as the primary. Can you please provide some examples as to what valid parameters would be for "-efidisk0" and "-sataN"?
kerem closed this issue 2026-02-26 17:32:11 +03:00
Author
Owner

@TheDave1022 commented on GitHub (Jul 30, 2025):

I spent a while figuring this out as well and you need to send in a hash. Give this a try. Just plugin your storage path in the EFIStoragePath variable.

$EFIStoragePath = "Your_Storage"
$EFIPath = $EFIStoragePath + ":0,efitype=4m,size=4M"
Set-PveNodesQemuConfig -node prox  -Vmid 200  -efidisk0 $EFIPath

The same format is needed for sataN. This will create a Sata1 device, so change the number as needed near the @ symbol. The 100 is a 100 GB disk, so adjust as needed

$SataStoragePath  = "Your_Storage"
$SataPath = @{1 = $StoragePath +":100"}
Set-PveNodesQemuConfig -node $prox -Vmid 200 -SataN $SataPath 

Let me know if that doesnt work and I'll take a look at my documentation

<!-- gh-comment-id:3137307740 --> @TheDave1022 commented on GitHub (Jul 30, 2025): I spent a while figuring this out as well and you need to send in a hash. Give this a try. Just plugin your storage path in the EFIStoragePath variable. ``` $EFIStoragePath = "Your_Storage" $EFIPath = $EFIStoragePath + ":0,efitype=4m,size=4M" Set-PveNodesQemuConfig -node prox -Vmid 200 -efidisk0 $EFIPath ``` The same format is needed for sataN. This will create a Sata1 device, so change the number as needed near the @ symbol. The 100 is a 100 GB disk, so adjust as needed ``` $SataStoragePath = "Your_Storage" $SataPath = @{1 = $StoragePath +":100"} Set-PveNodesQemuConfig -node $prox -Vmid 200 -SataN $SataPath ``` Let me know if that doesnt work and I'll take a look at my documentation
Author
Owner

@franklupo commented on GitHub (Dec 3, 2025):

Hi! Thanks for your feedback. I've added comprehensive documentation that covers exactly this use case.

Please check out the new Common Issues & Examples page, specifically:

  • Hashtable Parameters section - explains how to use NetN, SataN, ScsiN, IdeN, etc.
  • Disk Configuration Syntax - shows proper syntax for different disk types including EFI
  • Creating VMs with Disks and Network - complete working examples

For your specific case with EFI disk and SATA disk:

```powershell
$net = @{0 = "model=e1000,bridge=vmbr0,firewall=1"}
$sata = @{0 = "fourt:100"}
$efidisk = @{0 = "fourt:1,efitype=4m,pre-enrolled-keys=1"}

New-PveNodesQemu -Node prox -Vmid 200 -Name go -Balloon 4096 -Bios ovmf -Cpu host -Cores 4 -Machine q35 -Pool res -Ostype win10 -Scsihw virtio-scsi-pci -Storage fourt -Vga "type=qxl,memory=32" -NetN $net -SataN $sata -Efidisk0 $efidisk
```

The documentation includes many more examples and covers other common issues users have encountered. Hope this helps!

<!-- gh-comment-id:3607559244 --> @franklupo commented on GitHub (Dec 3, 2025): Hi! Thanks for your feedback. I've added comprehensive documentation that covers exactly this use case. Please check out the new **[Common Issues & Examples](https://corsinvest.github.io/cv4pve-api-powershell/common-issues.html)** page, specifically: - **Hashtable Parameters section** - explains how to use NetN, SataN, ScsiN, IdeN, etc. - **Disk Configuration Syntax** - shows proper syntax for different disk types including EFI - **Creating VMs with Disks and Network** - complete working examples For your specific case with EFI disk and SATA disk: \`\`\`powershell $net = @{0 = "model=e1000,bridge=vmbr0,firewall=1"} $sata = @{0 = "fourt:100"} $efidisk = @{0 = "fourt:1,efitype=4m,pre-enrolled-keys=1"} New-PveNodesQemu -Node prox -Vmid 200 -Name go -Balloon 4096 -Bios ovmf -Cpu host -Cores 4 -Machine q35 -Pool res -Ostype win10 -Scsihw virtio-scsi-pci -Storage fourt -Vga "type=qxl,memory=32" -NetN $net -SataN $sata -Efidisk0 $efidisk \`\`\` The documentation includes many more examples and covers other common issues users have encountered. Hope this helps!
Author
Owner

@franklupo commented on GitHub (Dec 3, 2025):

Closing as the documentation has been added. Feel free to reopen if you have any other questions!

<!-- gh-comment-id:3607560322 --> @franklupo commented on GitHub (Dec 3, 2025): Closing as the documentation has been added. Feel free to reopen if you have any other questions!
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#24
No description provided.