[Users] Cloud-init for Windows
Tejesh M
tejeshmk at gmail.com
Thu Mar 27 10:18:55 UTC 2014
Can you guide me on sysprep with sample code & sysprep file?
On Thu, Mar 27, 2014 at 3:16 PM, Itamar Heim <iheim at redhat.com> wrote:
> On 03/27/2014 05:33 AM, Tejesh M wrote:
>
>> Hi All,
>>
>> 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)
>>
>> Refer this link
>> http://www.cloudbase.it/cloud-init-for-windows-instances/#comment-9411
>>
>> 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).
>>
>
> note you can also just pass the full sysprep file as a payload yourself
> via the API, and set all these items in it.
>
>
>> 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.
>>
>
> just launch a linux VM and check the file we create?
>
>
>> Java code:
>>
>> org.ovirt.engine.sdk.decorators.VM vm1 = api.getVMs().get(vmName);
>> Payloads payloads = new Payloads();
>> Payload payload = new Payload();
>> payload.setType("cdrom");
>>
>> Files payloadFiles = new Files();
>> File payloadFile = new File();
>> payloadFile.setName("meta-data.txt");
>> payloadFile.setContent("hostname:"+vmName);
>> payloadFiles.getFiles().add(payloadFile);
>> payload.setFiles(payloadFiles);
>> vm1.setPayloads(payloads);
>> Action action = new Action();
>> vm1.start(action);
>>
>> --
>> Thanks & Regards
>> Tejesh
>>
>
>
--
Thanks & Regards
Tejesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20140327/1d2ef212/attachment-0001.html>
More information about the Users
mailing list