DaanHoogland commented on a change in pull request #2824: Fix SystemVMs running
in Xen HVM mode are not configured (#2760)
URL: https://github.com/apache/cloudstack/pull/2824#discussion_r214975527
##########
File path: systemvm/debian/opt/cloud/bin/setup/cloud-early-config
##########
@@ -51,6 +45,19 @@ hypervisor() {
fi
fi
+ [ -x /usr/sbin/virt-what ] && local facts=( $(virt-what) )
+ if [ "$facts" != "" ]; then
+ # Xen HVM is recognized as Hyperv when Viridian extensions are enabled
+ if [ "${facts[-1]}" == "xen-domU" ] && [ "${facts[0]}" == "hyperv" ]; then
+ echo "xen-hvm" && return 0
+ else
+ echo ${facts[-1]} && return 0
+ fi
+ fi
+
+ grep -q QEMU /proc/cpuinfo && echo "kvm" && return 0
Review comment:
I realize this is old code moved but it does not seem reliable or future
proof. How about a call to virsh (--version or so)?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services