https://bugzilla.novell.com/show_bug.cgi?id=859361 https://bugzilla.novell.com/show_bug.cgi?id=859361#c14 --- Comment #14 from Michael Chang <mchang@suse.com> 2014-02-21 11:00:25 UTC --- (In reply to comment #13)
I think its possible to have a single disk image for several VM types, for testing purpose. But nothing in our code actually takes care of such setup.
Ok. Good to know that we don't have to deal with such setup and could concentrate on one vm type booting scenario for a single disk. (so question comment#12 closed.)
So the code should take care of the following:
native (includes KVM and Hyper-V guest) native dom0 xen PV dom0 xen PV domU xen HVM
xen HVM is like native, expect that it has /proc/xen. Look at /lib/mkinitrd/scripts/setup-fv_guest.sh. One possible method of detection is to see if /sys/class/dmi/id exists. If it does exist and product_name == "HVM domU" and sys_vendor == "Xen", then its HVM and just kernel-default has to be considered.
I will setup a xen HVM guest to test and verify it. And adding the check in my patch for HVM .. (so question on comment#9 can be closed ).
Maybe one day HVM can do nested virt and maybe it would be possible to run dom0 inside a HVM guest. If thats ever possible, I'm sure there will be other attributes to check for that. For the time being the check above is good.
Ok. Thanks to confirmation. So will keep 20_linux_xen skipped on domU.
xen PV domU or dom0 can be found by /proc/xen/capabilities, if it contains "control_d" its a dom0. Otherwise its a domU.
So could you please pointer me what is recommended check now? if /proc/xen/capabilities not exist native elif /proc/xen/capabilities has control_d dom0 else domU (PV/HVM) if [ ! -e /proc/xen/xsd_port -a -e /proc/xen ] # domU (PV/HVM) elif [ -e /proc/xen/xsd_port -a -e /proc/xen ] # dom0 else # native
and native dom0 can be found by checking if the kernel can actually act as a dom0, by looking at its .config. There are probably ways to poke around in the binary and look for certain capabilities, but that requires additional tools to extract that info.
Looks like has been done in the current patch.
Does that answer the question?
Should I change to /proc/xen/capabilities for checking domU/dom0 ? :) Thanks, Michael -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.