-
由 Nikolay Shirokovskiy 提交于
As usual we try to deal correctly with vz domains that were created by other means and thus can have all range of SDK domain parameters. If vz domain boot order can't be represented in libvirt os boot section let's give warning and make os boot section represent SDK to some extent. 1. Os boot section supports up to 4 boot devices. Here we just cut SDK boot order up to this limit. Not too bad. 2. If there is a floppy in boot order let's just skip it. Anyway we don't show it in the xml. Not too bad too. 3. SDK boot order with unsupported disks order. Say we have "hdb, hda" in SDK. We can not present this thru os boot order. Well let's just give warning but leave double <boot dev='hd'/> in xml. It's kind of misleading but we warn you! SDK boot order have an extra parameters 'inUse' and 'sequenceIndex' which makes our task more complicated. In realitly however 'inUse' is always on and 'sequenceIndex' is not less than 'boot position index' which simplifies out task back again! To be on a safe side let's explicitly check for this conditions! We have another exercise here. We want to check for unrepresentable condition 3 (see above). The tricky part is that in contrast to domains defined thru this driver 3-rd party defined domains can have device ordering different from default. Thus we need some id to check that N-th boot disk of os boot section is same as N-th boot disk of SDK boot. This is what prlsdkBootOrderCheck for. It uses disks sources paths as id for disks and iface names for network devices. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> Signed-off-by: NMaxim Nestratov <mnestratov@virtuozzo.com>
032c5bf9