[ovirt-users] python floppy in RunOnce mode

Giulio Casella giulio at di.unimi.it
Thu Oct 23 07:40:53 UTC 2014


Hi,
I'm trying to boot a vm with non persistent floppy using python ovirt 
sdk (the "RunOnce" way in administrator portal), but guest OS can't see 
floppy drive. The ultimate goal is to deploy floppy with sysprep 
unattend.xml file for windows 7 pools of vm.

Here is a snippet of code I use:

-------------------------------------------------
myvm = api.vms.get(name="vmname")
content="This is file content!"
f=params.File(name="foobar.txt",content=content)
fs=params.Files()
fs.add_file(f)
payload=params.Payload()
payload.set_type("floppy")
payload.set_files(fs)
payloads=params.Payloads()
payloads.add_payload(payload)
thevm=params.VM()
thevm.set_payloads(payloads)
action=params.Action(vm=thevm)

myvm.start(action=action)

xml = ParseHelper.toXml(action)
print xml
-------------------------------------------------

As you can see, for debugging purpose, I print my xml action, and I get:

-------------------------------------------------
<action>
     <vm>
         <payloads>
             <payload type="floppy">
                 <files>
                     <file>
                         <name>foobar.txt</name>
                         <content>This is file content</content>
                     </file>
                 </files>
             </payload>
         </payloads>
     </vm>
</action>
-------------------------------------------------

in the admin portal I can see my vm in "RunOnce" state, but no floppy is 
present...
In fact in the vm process command line
(ps -ef | grep qemu-kvm | grep vmname) I can't see -drive option 
referring to floppy (I only see 2 "-drive" options, referring to vm 
system disk and to a correctly mounted cdrom ISO)

What I'm doing wrong?

(The engine is RHEV-M version 3.4.1-0.31.el6ev)

Thanks in advance,
Giulio



More information about the Users mailing list