[Users] Attach floppy as [sysprep] to VM - API

Tejesh M tejeshmk at gmail.com
Tue Mar 18 13:52:30 UTC 2014


I want to select "[sysprep]" [refer screenshot] & attach to floppy drive
through java code? I'm trying to change administrator password for the VM
which is cloned & change IP address. but i'm stuck, as there is no option
to set new password & IP for windows.  Is there any workaround?





On Tue, Mar 18, 2014 at 6:22 PM, Moti Asayag <masayag at redhat.com> wrote:

>
>
> ----- Original Message -----
> > From: "Tejesh M" <tejeshmk at gmail.com>
> > To: "Moti Asayag" <masayag at redhat.com>, "users at oVirt.org" <
> users at ovirt.org>
> > Sent: Monday, March 17, 2014 1:05:21 PM
> > Subject: Attach floppy as [sysprep] to VM - API
> >
> > Hi,
> >
> > I want to attach floppy as [sysprep] to windows VM in the Run once via
> API.
> > can you help?
> >
>
> Have a look on the exposed actions on your engine-server:
> http://localhost:8080/ovirt-engine/api?rsdl
>
> Specifically in the expected parameters of running a vm:
> - name: /vms/{vm:id}/start|rel=start
>
> I haven't tried executing this code, so adding Omer to adjust it:
>
> Action action = new Action();
> action.setVm(vm);
> Domain domain = new Domain();
> domain.setName("domainname");
> User user = new User();
> user.setName("username");
> user.setPassword("passwd");
> domain.setUser(user);
> vm.setDomain(domain);
>
> //not too sure if this is the way to use it or via vm payload
> Floppies floppies = new Floppies();
> Floppy floppy = new Floppy();
> File file = new File();
> file.setContent("content ?");
> floppy.setFile(file);
> floppies.getFloppies().add(floppy);
> vm.setFloppies(floppies);
> vm.start(action);
>
> > I want to do sysprep on windows 2008
> >
>



-- 
Thanks & Regards
Tejesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20140318/711e52d4/attachment-0001.html>


More information about the Users mailing list