Closed domodwyer closed 18 hours ago
Hi!
First off, thanks for the work to make this collection! I've found it really helpful.
I was struggling to provision a VM though - it looks like it's a simple validation failure and it works with the attached patch.
% incus version Client version: 6.7 Server version: 6.0.2
fix: creation of virtual machine instances (4267852)
The incus_instance task would only allow "container" and "vm" to be passed as the instance type, but using "vm" would rest in a server error:
Unexpected instance type "vm"
The argument sent by the CLI is "virtual-machine":
{ "architecture": "", "config": {}, "devices": {}, "ephemeral": false, "profiles": null, "stateful": false, "description": "", "name": "bananas", "source": { "type": "image", "certificate": "", "alias": "debian/bookworm/cloud", "server": "https://images.linuxcontainers.org", "protocol": "simplestreams", "mode": "pull", "allow_inconsistent": false }, "instance_type": "", --> "type": "virtual-machine", <-- "start": true }
This commit fixes the validation logic to allow the correct VM instance type to be sent.
Great find. Could you please correct the documentation in the same file as well?
Hi!
First off, thanks for the work to make this collection! I've found it really helpful.
I was struggling to provision a VM though - it looks like it's a simple validation failure and it works with the attached patch.
fix: creation of virtual machine instances (4267852)
The incus_instance task would only allow "container" and "vm" to be passed as the instance type, but using "vm" would rest in a server error:
The argument sent by the CLI is "virtual-machine":
This commit fixes the validation logic to allow the correct VM instance type to be sent.