memset(&def, 0, sizeof(def));
if (disk->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE) {
- VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
+ VMX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported disk address type '%s'"),
virDomainDeviceAddressTypeToString(disk->info.type));
return -1;
return -1;
}
} else {
- VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
+ VMX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported bus type '%s'"),
virDomainDiskBusTypeToString(disk->bus));
return -1;
goto cleanup;
}
} else {
- VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
+ VMX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported bus type '%s' for device type '%s'"),
virDomainDiskBusTypeToString(busType),
virDomainDiskDeviceTypeToString(device));
goto cleanup;
}
} else {
- VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
+ VMX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported bus type '%s' for device type '%s'"),
virDomainDiskBusTypeToString(busType),
virDomainDiskDeviceTypeToString(device));
goto cleanup;
}
} else {
- VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
+ VMX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported device type '%s'"),
virDomainDiskDeviceTypeToString(device));
goto cleanup;
goto cleanup;
}
} else {
- VMX_ERROR(VIR_ERR_INTERNAL_ERROR, _("Unsupported device type '%s'"),
+ VMX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED, _("Unsupported device type '%s'"),
virDomainDiskDeviceTypeToString(device));
goto cleanup;
}
break;
default:
- VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
+ VMX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported graphics type '%s'"),
virDomainGraphicsTypeToString(def->graphics[i]->type));
goto cleanup;
break;
default:
- VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
+ VMX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported disk device type '%s'"),
virDomainDiskDeviceTypeToString(def->disks[i]->device));
goto cleanup;
return -1;
}
} else {
- VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
+ VMX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported bus type '%s' for harddisk"),
virDomainDiskBusTypeToString(def->bus));
return -1;
}
if (def->type != VIR_DOMAIN_DISK_TYPE_FILE) {
- VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
+ VMX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED,
_("%s harddisk '%s' has unsupported type '%s', expecting '%s'"),
busName, def->dst, virDomainDiskTypeToString(def->type),
virDomainDiskTypeToString(VIR_DOMAIN_DISK_TYPE_FILE));
virBufferVSprintf(buffer, "%s%d:%d.writeThrough = \"true\"\n",
entryPrefix, controllerOrBus, unit);
} else if (def->cachemode != VIR_DOMAIN_DISK_CACHE_DEFAULT) {
- VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
+ VMX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED,
_("%s harddisk '%s' has unsupported cache mode '%s'"),
busName, def->dst,
virDomainDiskCacheTypeToString(def->cachemode));
return -1;
}
} else {
- VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
+ VMX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported bus type '%s' for cdrom"),
virDomainDiskBusTypeToString(def->bus));
return -1;
entryPrefix, controllerOrBus, unit, def->src);
}
} else {
- VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
+ VMX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED,
_("%s cdrom '%s' has unsupported type '%s', expecting '%s' "
"or '%s'"), busName, def->dst,
virDomainDiskTypeToString(def->type),
unit, def->src);
}
} else {
- VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
+ VMX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED,
_("Floppy '%s' has unsupported type '%s', expecting '%s' "
"or '%s'"), def->dst,
virDomainDiskTypeToString(def->type),
break;
default:
- VMX_ERROR(VIR_ERR_INTERNAL_ERROR, _("Unsupported net type '%s'"),
+ VMX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED, _("Unsupported net type '%s'"),
virDomainNetTypeToString(def->type));
return -1;
}
break;
default:
- VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
+ VMX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported character device TCP protocol '%s'"),
virDomainChrTcpProtocolTypeToString(
def->source.data.tcp.protocol));
break;
default:
- VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
+ VMX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported character device type '%s'"),
virDomainChrTypeToString(def->source.type));
return -1;
break;
default:
- VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
+ VMX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported character device type '%s'"),
virDomainChrTypeToString(def->source.type));
return -1;
virVMXFormatSVGA(virDomainVideoDefPtr def, virBufferPtr buffer)
{
if (def->type != VIR_DOMAIN_VIDEO_TYPE_VMVGA) {
- VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
+ VMX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED,
_("Unsupported video device type '%s'"),
virDomainVideoTypeToString(def->type));
return -1;
}
if (def->heads > 1) {
- VMX_ERROR(VIR_ERR_INTERNAL_ERROR, "%s",
+ VMX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Multi-head video devices are unsupported"));
return -1;
}