[ovirt-users] python floppy in RunOnce mode

Giulio Casella giulio at di.unimi.it
Thu Jan 7 09:52:29 UTC 2016


Hi Juan,
I've been using something you suggested some month ago (see below) to 
start windows 7 VMs and perform the sysprep specialize phase.
Some days ago I updated rhev from 3.5.3.1-1.4.el6ev to 
3.5.6.2-0.1.el6ev, and that code is not working anymore (no sysprep 
floppy attached).
I noticed that when params.Action() is empty, VMs start in normal mode, 
not "run once". So I tried to fill it with a vm:

action = params.Action(vm=params.VM(name="myvm"))

This way VM starts in "run once" mode, but, again, no sysprep floppy is 
attached, and no proper specialization is applied (e.g. windows domain 
join is not performed).

Any hints?

Thanks in advance,
Giulio Casella



Il 27/12/2014 17:38, Juan Hernández ha scritto:
> #!/usr/bin/env python
>
> from ovirtsdk.api import API
> from ovirtsdk.xml import params
>
> api = API(
>    url="https://ovirt.example.com/ovirt-engine/api",
>    username="admin at internal",
>    password="******",
>    ca_file="/etc/pki/ovirt-engine/ca.pem"
> )
>
> vm = api.vms.get(name="myvm")
>
> initialization = params.Initialization()
> vm.set_initialization(initialization)
> vm.update()
>
> action = params.Action()
> vm.start(action)
>
> api.disconnect()




More information about the Users mailing list