On 2012年12月01日 04:26, Daniel P. Berrange wrote:
From: "Daniel P. Berrange"<berrange@xxxxxxxxxx> The virDomainDefCompatibleDevice method checks if the domain has a USB controller for any USB devices. This is not required when using containers, so skip that check Signed-off-by: Daniel P. Berrange<berrange@xxxxxxxxxx> --- src/conf/domain_conf.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d97bbc8..43336d7 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -14530,12 +14530,14 @@ int virDomainDefCompatibleDevice(virDomainDefPtr def, virDomainDeviceDefPtr dev) { - if (!virDomainDefHasUSB(def)&& - virDomainDeviceIsUSB(dev)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("Device configuration is not compatible: " - "Domain has no USB bus support")); - return -1; + if (virDomainDeviceIsUSB(dev)) { + if (STRNEQ(def->os.type, "exe")&& + !virDomainDefHasUSB(def)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("Device configuration is not compatible: " + "Domain has no USB bus support")); + return -1; + } } return 0;
ACK -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list