<div dir="ltr">Can you guide me on sysprep with sample code & sysprep file?<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 27, 2014 at 3:16 PM, Itamar Heim <span dir="ltr"><<a href="mailto:iheim@redhat.com" target="_blank">iheim@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 03/27/2014 05:33 AM, Tejesh M wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi All,<br>
<br>
I was doing google to see if i can set Hostname,Password & IP details<br>
for Windows server from RHEV-M. I got to know that we can create VM<br>
Payload & send that to Windows VM (installed with Cloud-init)<br>
<br>
Refer this link<br>
<a href="http://www.cloudbase.it/cloud-init-for-windows-instances/#comment-9411" target="_blank">http://www.cloudbase.it/cloud-<u></u>init-for-windows-instances/#<u></u>comment-9411</a><br>
<br>
Cloud-init expects Meta-data & User-Data file to be sent either via<br>
Config Drive or via HTTP. I'm trying to achive this via ConfigDrive<br>
(created using VM Payload).<br>
</blockquote>
<br>
note you can also just pass the full sysprep file as a payload yourself via the API, and set all these items in it.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
But i'm wondering what should be the format of this two files (Meta-data<br>
& User-data). Have any1 tried this? If yes, would request to share<br>
sample for both the files with setting Hostname, Password & IP details.<br>
</blockquote>
<br>
just launch a linux VM and check the file we create?<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Java code:<br>
<br>
org.ovirt.engine.sdk.<u></u>decorators.VM vm1 = api.getVMs().get(vmName);<br>
Payloads payloads = new Payloads();<br>
Payload payload = new Payload();<br>
payload.setType("cdrom");<br>
<br>
Files payloadFiles = new Files();<br>
File payloadFile = new File();<br>
payloadFile.setName("meta-<u></u>data.txt");<br>
payloadFile.setContent("<u></u>hostname:"+vmName);<br>
payloadFiles.getFiles().add(<u></u>payloadFile);<br>
payload.setFiles(payloadFiles)<u></u>;<br>
vm1.setPayloads(payloads);<br>
Action action = new Action();<br>
vm1.start(action);<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
Thanks & Regards<br>
Tejesh<br>
</font></span></blockquote>
<br>
</blockquote></div><br><br clear="all"><br>-- <br><div>Thanks & Regards</div>
<div>Tejesh</div>
</div>