if (!virCapabilitiesDomainSupported(caps, def->os.type,
def->os.arch,
- def->virtType))
+ def->virtType,
+ true))
return -1;
/* Add an implicit PCI root controller */
{
virCHDriver *driver = opaque;
g_autoptr(virCaps) caps = virCHDriverGetCapabilities(driver, false);
+
if (!caps)
return -1;
+
if (!virCapabilitiesDomainSupported(caps, def->os.type,
def->os.arch,
- def->virtType))
+ def->virtType,
+ true))
return -1;
return 0;
goto cleanup;
if (!virCapabilitiesDomainSupported(ch_driver->caps, -1,
- VIR_ARCH_NONE, VIR_DOMAIN_VIRT_KVM) &&
+ VIR_ARCH_NONE, VIR_DOMAIN_VIRT_KVM, false) &&
!virCapabilitiesDomainSupported(ch_driver->caps, -1,
- VIR_ARCH_NONE, VIR_DOMAIN_VIRT_HYPERV)) {
+ VIR_ARCH_NONE, VIR_DOMAIN_VIRT_HYPERV, false)) {
VIR_INFO("/dev/kvm and /dev/mshv are missing. CH driver failed to initialize.");
return VIR_DRV_STATE_INIT_SKIPPED;
}
if (vm->def->virtType == VIR_DOMAIN_VIRT_KVM) {
VIR_DEBUG("Checking for KVM availability");
if (!virCapabilitiesDomainSupported(driver->caps, -1,
- VIR_ARCH_NONE, VIR_DOMAIN_VIRT_KVM)) {
+ VIR_ARCH_NONE, VIR_DOMAIN_VIRT_KVM, false)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Domain requires KVM, but it is not available. Check that virtualization is enabled in the host BIOS, and host configuration is setup to load the kvm modules."));
return -1;
} else if (vm->def->virtType == VIR_DOMAIN_VIRT_HYPERV) {
VIR_DEBUG("Checking for mshv availability");
if (!virCapabilitiesDomainSupported(driver->caps, -1,
- VIR_ARCH_NONE, VIR_DOMAIN_VIRT_HYPERV)) {
+ VIR_ARCH_NONE, VIR_DOMAIN_VIRT_HYPERV, false)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Domain requires MSHV device, but it is not available. Check that virtualization is enabled in the host BIOS, and host configuration is setup to load the mshv modules."));
return -1;
virCapabilitiesDomainSupported(virCaps *caps,
int ostype,
virArch arch,
- int virttype)
+ int virttype,
+ bool reportError)
{
g_autofree virCapsDomainData *capsdata = NULL;
arch,
virttype,
NULL, NULL,
- true);
+ reportError);
return capsdata != NULL;
}
virCapabilitiesDomainSupported(virCaps *caps,
int ostype,
virArch arch,
- int domaintype);
+ int domaintype,
+ bool reportError);
void
if (!virCapabilitiesDomainSupported(cfg->caps, def->os.type,
def->os.arch,
- def->virtType))
+ def->virtType,
+ true))
return -1;
/* Xen+ovmf does not support secure boot */
return -1;
if (!virCapabilitiesDomainSupported(caps, def->os.type,
def->os.arch,
- def->virtType))
+ def->virtType,
+ true))
return -1;
/* check for emulator and create a default one if needed */
struct openvz_driver *driver = opaque;
if (!virCapabilitiesDomainSupported(driver->caps, def->os.type,
def->os.arch,
- def->virtType))
+ def->virtType,
+ true))
return -1;
/* fill the init path */
struct vmware_driver *driver = opaque;
if (!virCapabilitiesDomainSupported(driver->caps, def->os.type,
def->os.arch,
- def->virtType))
+ def->virtType,
+ true))
return -1;
return 0;
virCaps *caps = opaque;
if (!virCapabilitiesDomainSupported(caps, def->os.type,
def->os.arch,
- def->virtType))
+ def->virtType,
+ true))
return -1;
return 0;
struct _vzDriver *driver = opaque;
if (!virCapabilitiesDomainSupported(driver->caps, def->os.type,
def->os.arch,
- def->virtType))
+ def->virtType,
+ true))
return -1;
if (vzDomainDefAddDefaultInputDevices(def) < 0)