and then make the pre-start hook just setup the environment for whatever is in the domain xml at that point?
vladikr
looking
vossel
basically, domain xml gets network parts during the conversion from VM -> DOmain xml... then later on the hook sets up the environment to reflect what we'd need for the domain xml to actually work
vladikr
vossel, that's a bit tricky, manly because I know the mac address of the container later in the process
vossel
ah, i see
i need to look at your patch
vladikr
sure
vossel
vladikr, ah okay I think i've got it now
you're going to have to set the domain xml again in the prestart hook i think
i'm looking for an example. i had to do that for something else too
vladikr
vossel, yeah, I do it now in my offline changes
vossel, we could also let networking and storage to update its changes with with updateDeviceFlags(xml) , but the pre-start hook should pass the virConn
or just call dom, err = util.SetDomainSpec(l.virConn, vm, domain.Spec)
if err != nil {
return nil, err
}
regardless, after the pre-start hook run
gbenhaim has quit
vossel
vladikr, how about this then
gbenhaim joined the channel
the domain spec can get altered in the hook, and the resulting domain is returned from the hook function. in SyncVM where we call the hook, we set the resulting domain spec after the hook function completes
so, we'll just always call SetDomainSpec after the hook on the resulting domain spec
vladikr
vossel, yeah, sounds good
vossel
i can make that change now. I'm rebasing
vladikr
great!
vossel
you'll get it for free when you update
awesome, okay i'll ping you when it goes in
vladikr
vossel, one other thing I was worried about it how will we handle the defaults in the hook
vossel, but maybe there is a simple way, I just didn't get to it yet
s/it/is
phoracek has quit
gbenhaim has quit
vossel
vladikr, i'm not sure I follow the problem there
vladikr
vossel, I mean, for example, when I set the network xml in the hook, I need to take the correct device defaults into an account
gbenhaim joined the channel
what-a-bot joined the channel
NOTICE: [kubevirt] rmohr opened pull request #688: Make cirros and alpine ready for q35 (master...q35) https://git.io/vNSII