----- Original Message -----
> From: "Tejesh M" <tejes...@gmail.com>
> To: "Moti Asayag" <masa...@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
> 
_______________________________________________
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users

Reply via email to