<div dir="ltr"><div><div><div><div>Hi All,<br><br></div><div>I was doing google to see if i can set Hostname,Password & IP details for Windows server from RHEV-M. I got to know that we can create VM Payload & send that to Windows VM (installed with Cloud-init)<br>
<br></div>Refer this link <a href="http://www.cloudbase.it/cloud-init-for-windows-instances/#comment-9411">http://www.cloudbase.it/cloud-init-for-windows-instances/#comment-9411</a><br><br></div>Cloud-init expects Meta-data & User-Data file to be sent either via Config Drive or via HTTP. I'm trying to achive this via ConfigDrive (created using VM Payload).<br>
<br></div>But i'm wondering what should be the format of this two files (Meta-data & User-data). Have any1 tried this? If yes, would request to share sample for both the files with setting Hostname, Password & IP details.<br>
<br></div>Java code:<br><br> org.ovirt.engine.sdk.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-data.txt");<br> payloadFile.setContent("hostname:"+vmName);<br>
payloadFiles.getFiles().add(payloadFile);<br> payload.setFiles(payloadFiles);<br> vm1.setPayloads(payloads);<br> Action action = new Action();<br> vm1.start(action);<br clear="all">
<div><div><div><div><div><div><div><div><div><div><br>-- <br><div>Thanks & Regards</div>
<div>Tejesh</div>
</div></div></div></div></div></div></div></div></div></div></div>