On Wed, 2010-09-29 at 15:21 +0200, Tomas Von Veschler wrote:
On 09/29/2010 09:03 AM, Mark McLoughlin wrote:
> On Tue, 2010-09-28 at 23:28 +0200, Tomas Von Veschler wrote:
>
>> Oh ok works now, maybe the documentation could be more explicit about this?
>>
>>
http://markmc.fedorapeople.org/rhevm-api/en-US/html/sect-REST_API_Guide-V...
>
> Care to send a patch? :)
Sure, just one more question below :-)
>> Now I'm in a new trouble. When installing VMs via PXE if I specify<boot
>> dev="network"/>, the VM will never use the disc as boot device.
Options
>> I've seen:
>>
>> 1) Set network as boot device, wait for install, shutdown, change boot
>> device, start. This is too complex to implement.
>
> How about set network as boot device, start and immediately change boot
> device to network. The new boot device will only take effect next time
> the VM is restarted
Mmm I've tested this approach but it doesn't work as expected. Seems
that RHEV only takes that change after a VM shutdown. So add vm, start,
change boot device, install, reboot: the VM will keep booting via network.
Okay, if that's the case then we definitely need to support RunOnce
support
>> 2) Specify second boot device. It's not very well
documented, but the
>> Add-Vm param -DefaultBootSequence accepts two letters being C=hd,
>> D=cdrom, N=network, so "CN" would mean boot from HD if not available
use
>> Network.
>
> You can do that with the REST API using:
>
> <os>
> <boot dev="network"/>
> <boot dev="hd"/>
> </os>
This is what I'm doing now:
1) Add vm with:
<os>
<boot dev="hd"/>
<boot dev="network"/>
</os>
2) start vm
3) Edit VM to:
<os>
<boot dev="hd"/>
</os>
A little tricky but does the job :-) Want me to document this?
Nah, if we add RunOnce you won't need to do this
>> 3) Set Add-VM -DefaultBootSequence C and "run
once" the VM with Start-VM
>> -BootDevice N
>
> We haven't implemented "run once" yet, since we're tying to figure
out
> what the use case for it is above my answer to (1). If/when we
> understand the use case, we'll add it
I can think on the cdrom case, run once would automatically detach the
ISO on reboot (shutdown?).
RunOnce basically doesn't affect the VM configuration. So, if the VM is
configured to boot from disk and you do RunOnce with dev="cdrom", then
the next time you start without RunOnce the VM it goes back to booting
from disk.
Actually, it probably makes sense to support RunOnce by allowing the
start action to take parameters like <boot dev=.../>
Cheers,
Mark.