[ovirt-users] Setting PXE boot via Python API

Jamie Lawrence jlawrence at squaretrade.com
Thu Dec 3 21:59:33 UTC 2015


Hello,

I’m currently playing with scripted VM creation and have an issue getting the newly created VM to PXE boot. My objective is to port some creation scripts from the environment this will eventually replace and worry about making this more “Ovirt-ey” later.

Skipping the details, everything is happy through creation, and when I boot it, it attempts to boot from a ‘disk' and fails, and I don’t understand why.

Following the creation of the VM, creation/attachment of the disk and net,

        boot_dev = params.Boot(dev='network')
        vm.os.set_boot([boot_dev])
        vm.set_os(params.OperatingSystem(cmdline=kernel_cmd))
        vm.update()

kernel_cmd there evaluates to a fairly typical PXEboot string that works with our legacy setup - there isn’t really anything exotic going on. The BIOS doesn’t show any attempt at a PXE boot - it goes straight to the disk, declares it unbootable (because it was just created and is blank), and halts. It feels like the set_boot line is wrong or ignored, but this is new to me.

Anyone have a hint?

Thanks,

-j
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2763 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/users/attachments/20151203/a7e22c6a/attachment-0001.p7s>


More information about the Users mailing list