mirror of
https://github.com/Corsinvest/cv4pve-api-powershell.git
synced 2026-04-25 12:15:48 +03:00
[GH-ISSUE #34] Better documentation #24
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cv4pve-api-powershell#24
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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:
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"?
@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.
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
Let me know if that doesnt work and I'll take a look at my documentation
@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:
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!
@franklupo commented on GitHub (Dec 3, 2025):
Closing as the documentation has been added. Feel free to reopen if you have any other questions!