[Users] 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? I want to do sysprep on windows 2008

----- Original Message -----
From: "Tejesh M" <tejeshmk@gmail.com> To: "Moti Asayag" <masayag@redhat.com>, "users@oVirt.org" <users@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

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@redhat.com> wrote:
----- Original Message -----
From: "Tejesh M" <tejeshmk@gmail.com> To: "Moti Asayag" <masayag@redhat.com>, "users@oVirt.org" < users@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

Attaching screenshot. On Tue, Mar 18, 2014 at 7:22 PM, Tejesh M <tejeshmk@gmail.com> wrote:
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@redhat.com> wrote:
----- Original Message -----
From: "Tejesh M" <tejeshmk@gmail.com> To: "Moti Asayag" <masayag@redhat.com>, "users@oVirt.org" < users@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
-- Thanks & Regards Tejesh
participants (2)
-
Moti Asayag
-
Tejesh M