<div dir="ltr"><div><div><div>Hi,<br><br></div>There is no option in &quot;Initial Run&quot; to set root password &amp; other stuff. Have attached screenshots &amp; debug output. Is there any configuration needs to be done? or any cloud-init service needs to be started? How do integrate cloud-init with RHEV-M?<br>
<br></div>Thanks &amp; Regards,<br></div>Tejesh<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 13, 2014 at 9:50 PM, Juan Hernandez <span dir="ltr">&lt;<a href="mailto:jhernand@redhat.com" target="_blank">jhernand@redhat.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 02/13/2014 05:15 PM, Tejesh M wrote:<br>
&gt; Actually, i want to automate the vm provisioning through java sdk. and<br>
&gt; this urgent requirement. &nbsp;Is it possible to automate setting hostname,<br>
&gt; root password n nic info by any means in 3.3? Also in windows<br>
&gt; administration password as similar to linux.. kindly help as im new to<br>
&gt; this..<br>
&gt;<br>
<br>
Yes, setting the hostname, root password and NIC info is possible in<br>
3.3, using cloud-init and the Java SDK. I tested this with 3.3 and it<br>
works correctly.<br>
<br>
As you are having problems I suggest to try it manually, from the GUI,<br>
if it doesn&#39;t work then please report the details, so that we can<br>
diagnose and fix it.<br>
<br>
Once it works manually from the GUI, we can see why it doesn&#39;t work with<br>
the SDK, but we will need the output generated when running in debug mode.<br>
<br>
&gt; On 13 Feb 2014 20:32, &quot;Juan Hernandez&quot; &lt;<a href="mailto:jhernand@redhat.com">jhernand@redhat.com</a><br>
&gt; &lt;mailto:<a href="mailto:jhernand@redhat.com">jhernand@redhat.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt; &nbsp; &nbsp; On 02/13/2014 03:59 PM, Shahar Havivi wrote:<br>
&gt; &nbsp; &nbsp; &gt; On 13.02.14 20:17, Tejesh M wrote:<br>
&gt; &nbsp; &nbsp; &gt;&gt; 1. The Version is RHEV-M 3.3 &amp; Cloud-init is<br>
&gt; &nbsp; &nbsp; &gt;&gt; cloud-init-0.6.3-0.12.bzr532.el6.noarch<br>
&gt; &nbsp; &nbsp; &gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt; 2. In Webadmin, i don&#39;t find any option to set Cloud-init data&#39;s.<br>
&gt; &nbsp; &nbsp; I checked<br>
&gt; &nbsp; &nbsp; &gt;&gt; under New VM-&gt;Initial Run.. Am i looking at the right place?<br>
&gt; &nbsp; &nbsp; &gt;&gt; How to enable cloud-init support in engine?<br>
&gt; &nbsp; &nbsp; &gt; You will not found it since you are working in 3.3 and this<br>
&gt; &nbsp; &nbsp; feature presented<br>
&gt; &nbsp; &nbsp; &gt; in 3.4.<br>
&gt; &nbsp; &nbsp; &gt; In 3.3 you can try to set the Cloud-Init via the Run-Once button.<br>
&gt; &nbsp; &nbsp; &gt;<br>
&gt;<br>
&gt; &nbsp; &nbsp; In 3.3 you need first to create the VM. Once it is created select it,<br>
&gt; &nbsp; &nbsp; click the &quot;Run Once&quot; button, then click on the plus sign next to<br>
&gt; &nbsp; &nbsp; &quot;Initial Run&quot;, check the &quot;Cloud-Init&quot; box, and populate the fields<br>
&gt; &nbsp; &nbsp; you want.<br>
&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt; I have installed cloud-init package in RHEV-M &amp; also in Template.<br>
&gt; &nbsp; &nbsp; &gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt; Please suggest.<br>
&gt; &nbsp; &nbsp; &gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt; On Thu, Feb 13, 2014 at 7:31 PM, Juan Hernandez<br>
&gt; &nbsp; &nbsp; &lt;<a href="mailto:jhernand@redhat.com">jhernand@redhat.com</a> &lt;mailto:<a href="mailto:jhernand@redhat.com">jhernand@redhat.com</a>&gt;&gt; wrote:<br>
&gt; &nbsp; &nbsp; &gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; On 02/13/2014 02:39 PM, Tejesh M wrote:<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; Hi All,<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; Thanks alot.<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; I have created one VM with minimal installation &amp; installed<br>
&gt; &nbsp; &nbsp; cloud-init<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; package. And, converted that VM into Template. Then executed<br>
&gt; &nbsp; &nbsp; the code<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; given in<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; <a href="http://lists.ovirt.org/pipermail/users/2014-February/021302.html" target="_blank">http://lists.ovirt.org/pipermail/users/2014-February/021302.html</a> , but<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; no luck, the code is not setting root password.<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; What version of the engine are you running? I may not have the<br>
&gt; &nbsp; &nbsp; required<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; cloud-init support.<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; Try to run the application in debug mode:<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; &nbsp; Api api = new Api(<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; &nbsp; &nbsp; &quot;<a href="https://whatever/api" target="_blank">https://whatever/api</a>&quot;,<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; &nbsp; &nbsp; &quot;user@domain&quot;,<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; &nbsp; &nbsp; &quot;password&quot;,<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; &nbsp; &nbsp; null,<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; &nbsp; &nbsp; null,<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; &nbsp; &nbsp; null,<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; &nbsp; &nbsp; null,<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; &nbsp; &nbsp; true,<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; &nbsp; &nbsp; null,<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; &nbsp; &nbsp; true &nbsp;// &lt;- This is to enable debug mode<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; &nbsp; );<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; It will send to the log the actual XML documents sent to the<br>
&gt; &nbsp; &nbsp; server. We<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; can use it to see if the request is generated correctly.<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; It may also happen that cloud-init support isn&#39;t working<br>
&gt; &nbsp; &nbsp; correctly. To<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; verify this try to use the cloud-init support manually from<br>
&gt; &nbsp; &nbsp; webadmin.<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; Does it work from there?<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; Also, there is no option to set *Hostname *for the VM.<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; To set the host name you need to add something like this:<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; &nbsp; Host hostData = new Host();<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; &nbsp; hostData.setAddress(&quot;<a href="http://the.host.name" target="_blank">the.host.name</a> &lt;<a href="http://the.host.name" target="_blank">http://the.host.name</a>&gt;&quot;);<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; &nbsp; cloudData.setHost(hostData);<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; _*Code:*_<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; /*********************Begin Customize<br>
&gt; &nbsp; &nbsp; VM*********************/<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; // Generate the random password, using whatever<br>
&gt; &nbsp; &nbsp; mechanism you<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // prefer:<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String password = &quot;cJql3P9XLQG4drCYVG/6Q/&quot;;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // You need to know the name of the template, the<br>
&gt; &nbsp; &nbsp; cluster and<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // the VM you are going to create:<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String templateName = &quot;rhel2_temp&quot;;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String clusterName = &quot;testCluster&quot;;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String vmName = &quot;myvm&quot;;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Prepare the data to create the VM from the template:<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; org.ovirt.engine.sdk.entities.Template templateData = new<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; Template();<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; templateData.setName(templateName);<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; org.ovirt.engine.sdk.entities.Cluster clusterData = new<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; Cluster();<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; clusterData.setName(clusterName);<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; org.ovirt.engine.sdk.entities.VM vmDataForCreate =<br>
&gt; &nbsp; &nbsp; new VM();<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vmDataForCreate.setName(vmName);<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vmDataForCreate.setCluster(clusterData);<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vmDataForCreate.setTemplate(templateData);<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Send the request to create the VM to the server:<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; api.getVMs().add(vmDataForCreate);<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String state;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // White till the VM is down (it will be locked for a<br>
&gt; &nbsp; &nbsp; while):<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (;;) {<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;state =<br>
&gt; &nbsp; &nbsp; api.getVMs().get(vmName).getStatus().getState();<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (&quot;down&quot;.equals(state)) {<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Thread.sleep(1000);<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;System Status:&quot;+state);<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Populate parameters for the action to start the VM<br>
&gt; &nbsp; &nbsp; with<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; cloud-init:<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; org.ovirt.engine.sdk.entities.User userData = new User();<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; userData.setUserName(&quot;root&quot;);<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; userData.setPassword(password);<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Users usersData = new Users();<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; usersData.getUsers().add(userData);<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CloudInit cloudData = new CloudInit();<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cloudData.setUsers(usersData);<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Initialization initData = new Initialization();<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; initData.setCloudInit(cloudData);<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VM vmDataForStart = new VM();<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vmDataForStart.setInitialization(initData);<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Action actionData = new Action();<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; actionData.setVm(vmDataForStart);<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Send the request to start the VM to the server:<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; api.getVMs().get(vmName).start(actionData);<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; System.out.println(&quot;After :<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &quot;+api.getVMs().get(vmName).getStatus());<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /*********************End Customize<br>
&gt; &nbsp; &nbsp; VM*********************/<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; Thanks &amp; Regards,<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; Tejesh<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; On Thu, Feb 13, 2014 at 2:26 PM, Juan Hernandez<br>
&gt; &nbsp; &nbsp; &lt;<a href="mailto:jhernand@redhat.com">jhernand@redhat.com</a> &lt;mailto:<a href="mailto:jhernand@redhat.com">jhernand@redhat.com</a>&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &lt;mailto:<a href="mailto:jhernand@redhat.com">jhernand@redhat.com</a> &lt;mailto:<a href="mailto:jhernand@redhat.com">jhernand@redhat.com</a>&gt;&gt;&gt; wrote:<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; On 02/13/2014 09:29 AM, Shahar Havivi wrote:<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt; On 13.02.14 00:59, Oved Ourfalli wrote:<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt; ----- Original Message -----<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt; From: &quot;Shahar Havivi&quot; &lt;<a href="mailto:shaharh@redhat.com">shaharh@redhat.com</a><br>
&gt; &nbsp; &nbsp; &lt;mailto:<a href="mailto:shaharh@redhat.com">shaharh@redhat.com</a>&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &lt;mailto:<a href="mailto:shaharh@redhat.com">shaharh@redhat.com</a> &lt;mailto:<a href="mailto:shaharh@redhat.com">shaharh@redhat.com</a>&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt; To: <a href="mailto:users@ovirt.org">users@ovirt.org</a> &lt;mailto:<a href="mailto:users@ovirt.org">users@ovirt.org</a>&gt;<br>
&gt; &nbsp; &nbsp; &lt;mailto:<a href="mailto:users@ovirt.org">users@ovirt.org</a> &lt;mailto:<a href="mailto:users@ovirt.org">users@ovirt.org</a>&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt; Cc: &quot;Juan Antonio Hernandez Fernandez&quot;<br>
&gt; &nbsp; &nbsp; &lt;<a href="mailto:jhernand@redhat.com">jhernand@redhat.com</a> &lt;mailto:<a href="mailto:jhernand@redhat.com">jhernand@redhat.com</a>&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &lt;mailto:<a href="mailto:jhernand@redhat.com">jhernand@redhat.com</a> &lt;mailto:<a href="mailto:jhernand@redhat.com">jhernand@redhat.com</a>&gt;&gt;&gt;,<br>
&gt; &nbsp; &nbsp; <a href="mailto:rhevm-api@lists.fedorahosted.org">rhevm-api@lists.fedorahosted.org</a><br>
&gt; &nbsp; &nbsp; &lt;mailto:<a href="mailto:rhevm-api@lists.fedorahosted.org">rhevm-api@lists.fedorahosted.org</a>&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &lt;mailto:<a href="mailto:rhevm-api@lists.fedorahosted.org">rhevm-api@lists.fedorahosted.org</a><br>
&gt; &nbsp; &nbsp; &lt;mailto:<a href="mailto:rhevm-api@lists.fedorahosted.org">rhevm-api@lists.fedorahosted.org</a>&gt;&gt;, &quot;Tejesh M&quot;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt; &lt;<a href="mailto:tejeshmk@gmail.com">tejeshmk@gmail.com</a> &lt;mailto:<a href="mailto:tejeshmk@gmail.com">tejeshmk@gmail.com</a>&gt;<br>
&gt; &nbsp; &nbsp; &lt;mailto:<a href="mailto:tejeshmk@gmail.com">tejeshmk@gmail.com</a> &lt;mailto:<a href="mailto:tejeshmk@gmail.com">tejeshmk@gmail.com</a>&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt; Sent: Wednesday, February 12, 2014 11:22:20 PM<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt; Subject: Re: [Users] [rhevm-api] Assign IP address to<br>
&gt; &nbsp; &nbsp; VM using<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; Java SDK<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt; On 12.02.14 22:55, Itamar Heim wrote:<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; On 02/12/2014 03:14 PM, Tejesh M wrote:<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;&gt; Hi,<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;&gt; Can anyone share sample code on how to assign IP<br>
&gt; &nbsp; &nbsp; address to<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; guest os &amp;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;&gt; changing the root password while creating VM from<br>
&gt; &nbsp; &nbsp; Template<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; using Java SDK?<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt; Hi Tejesh,<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt; You should start here:<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt; <a href="http://www.ovirt.org/Api" target="_blank">http://www.ovirt.org/Api</a><br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt; This link will explain the basics for fetching VM via<br>
&gt; &nbsp; &nbsp; the API<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; using HTTP via<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt; curl command line.<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt; Every VM have a collection of networks and manipulating<br>
&gt; &nbsp; &nbsp; them can<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; be seeing<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt; here with the REST API examples:<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; <a href="http://www.ovirt.org/Features/Design/Network/SetupNetworks#REST" target="_blank">http://www.ovirt.org/Features/Design/Network/SetupNetworks#REST</a><br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt; the section for you is &quot;Attaching a network to a NIC&quot;<br>
&gt; &nbsp; &nbsp; under the<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; REST<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt; category.<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt; Shahar Havivi.<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt; Actually it looks like Tejesh is referring to the Guests<br>
&gt; &nbsp; &nbsp; and not<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; the hosts, so you can use cloud-init in order to do that.<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt; See more in<br>
&gt; &nbsp; &nbsp; &quot;<a href="http://www.ovirt.org/Features/Cloud-Init_Integration" target="_blank">http://www.ovirt.org/Features/Cloud-Init_Integration</a><br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; &quot;.<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt; If the VM&#39;s operating system is defined as some kind of<br>
&gt; &nbsp; &nbsp; Linux,<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; then you&#39;ll be able to set some stuff using cloud-init,<br>
&gt; &nbsp; &nbsp; either via<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; the Run-Once Dialog, or in the regular VM properties dialog.<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt; Omer - we have REST API support for cloud-init, right?<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt; Yes, more on that can be found here:<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt; <a href="http://www.ovirt.org/Features/vm-init-persistent" target="_blank">http://www.ovirt.org/Features/vm-init-persistent</a><br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; &gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; Tajesh, you have a detailed example of how to set the<br>
&gt; &nbsp; &nbsp; password in the<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; following message:<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; <a href="http://lists.ovirt.org/pipermail/users/2014-February/021302.html" target="_blank">http://lists.ovirt.org/pipermail/users/2014-February/021302.html</a><br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt; &nbsp; &nbsp; Setting the IP address is similar.<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; --<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3,<br>
&gt; &nbsp; &nbsp; planta<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; 3ºD, 28016 Madrid, Spain<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt; Inscrita en el Reg. Mercantil de Madrid - C.I.F. B82657941 - Red<br>
&gt; &nbsp; &nbsp; Hat S.L.<br>
&gt; &nbsp; &nbsp; &gt;&gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt;<br>
&gt; &nbsp; &nbsp; &gt;&gt; --<br>
&gt; &nbsp; &nbsp; &gt;&gt; Thanks &amp; Regards<br>
&gt; &nbsp; &nbsp; &gt;&gt; Tejesh<br>
&gt; &nbsp; &nbsp; &gt; _______________________________________________<br>
&gt; &nbsp; &nbsp; &gt; Users mailing list<br>
&gt; &nbsp; &nbsp; &gt; <a href="mailto:Users@ovirt.org">Users@ovirt.org</a> &lt;mailto:<a href="mailto:Users@ovirt.org">Users@ovirt.org</a>&gt;<br>
&gt; &nbsp; &nbsp; &gt; <a href="http://lists.ovirt.org/mailman/listinfo/users" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
&gt; &nbsp; &nbsp; &gt;<br>
&gt;<br>
&gt;<br>
&gt; &nbsp; &nbsp; --<br>
&gt; &nbsp; &nbsp; Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta<br>
&gt; &nbsp; &nbsp; 3ºD, 28016 Madrid, Spain<br>
&gt; &nbsp; &nbsp; Inscrita en el Reg. Mercantil de Madrid &ndash; C.I.F. B82657941 - Red Hat<br>
&gt; &nbsp; &nbsp; S.L.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Users mailing list<br>
&gt; <a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
&gt; <a href="http://lists.ovirt.org/mailman/listinfo/users" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
&gt;<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta<br>
3ºD, 28016 Madrid, Spain<br>
Inscrita en el Reg. Mercantil de Madrid &ndash; C.I.F. B82657941 - Red Hat S.L.<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div>Thanks &amp; Regards</div>
<div>Tejesh</div>
</div>