
You can follow this example: http://ovirt.github.io/ovirt-engine-api-model/master/#_create_a_virtual_mach... Have you tried creating first the VM without the NIC and then creating its nic with POST /ovirt-engine/api/vms/#id/nics ? *Regards,* *Shani Leviim* On Sun, May 2, 2021 at 1:14 PM Shani Leviim <sleviim@redhat.com> wrote:
For updating VMs, use PUT instead of POST
http://ovirt.github.io/ovirt-engine-api-model/master/#services/vm/methods/up...
*Regards,*
*Shani Leviim*
On Sun, May 2, 2021 at 10:29 AM <ovirt.org@nevim.eu> wrote:
Temporary solution for me is:
PUT /ovirt-engine/api/vms/$serverID/nics/$nicID
<nic> <name>ovirtmgmt_25</name> <interface>virtio</interface> <vnic_profile id="$profileID"/> </nic>
But this solution is not optional, i need set this on "create VM".
Ad this to:
POST /ovirt-engine/api/vms
<vm> <name>$hostname</name> <description>$description</description> <cluster> <name>$cluster</name> </cluster> <template> <name>$template</name> </template>
<cpu> <topology> <cores>1</cores> <sockets>$cpu</sockets> <threads>1</threads> </topology> </cpu> <memory>$ramMB</memory> <memory_policy> <ballooning>true</ballooning> <guaranteed>$ramMBguaranteed</guaranteed> <max>$ramMBmax</max> </memory_policy> </vm>
like this, but not workling:
<vm> <name>$hostname</name> <description>$description</description> <cluster> <name>$cluster</name> </cluster> <template> <name>$template</name> </template>
<nic> <name>ovirtmgmt_25</name> <interface>virtio</interface> <vnic_profile id='$profileID'/> </nic>
<cpu> <topology> <cores>1</cores> <sockets>$cpu</sockets> <threads>1</threads> </topology> </cpu> <memory>$ramMB</memory> <memory_policy> <ballooning>true</ballooning> <guaranteed>$ramMBguaranteed</guaranteed> <max>$ramMBmax</max> </memory_policy> </vm> _______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/I3IHCJIR5N7M6O...