Hello all and thank you in advance for your help.

I have been able to work out how to add vm via a call to the vms API.   I am 
passing in a template via the api call and that is working.  I do not have a 
network installed in the template. My use case for that was to hit “New vm”, 
fill in the hostname and network and let cloud-init set the hostname.  That way 
I can create a new vm with just a few clicks.  

What I can’t seem to figure out is how to define the network interface in the 
add vm api call.   It looks like I should have to add the network interface in 
a second call after creation.    If I add the interface in the  
<initialization> section for cloud-init I seems to have a chicken and egg 
problem.  When I add the  <initialization> section and the data for the ip 
address, netmask, default gateway, I get;
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fault>
    <detail>[Cannot add VM. Static IPv4 address is missing in cloud-init 
configuration.]</detail>
    <reason>Operation Failed</reason>
</fault>

That would seem to indicate to me that I need and interface before I can 
configure it.  That makes sense.  But how do I get an interface before I create 
the vm ?

What might I be missing?

The desired result is create a vm and set the hostname and ip info via the api 
so that I get a fully formed vm connected to the network.  That gets me to the 
point of being able to download build scripts to install and start puppet.

Alan
_______________________________________________
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/YQRSABCJ7Y3L44XRFLUFDTFPK6OGBKPH/

Reply via email to