/* Migration support. */
+static bool ATTRIBUTE_NONNULL(1)
+qemuDomainIsMigratable(virDomainDefPtr def)
+{
+ if (def->nhostdevs > 0) {
+ qemuReportError(VIR_ERR_OPERATION_INVALID,
+ _("Domain with assigned host devices cannot be migrated"));
+ return false;
+ }
+
+ return true;
+}
+
+
/* Tunnelled migration stream support */
struct qemuStreamMigFile {
int fd;
goto cleanup;
}
+ if (!qemuDomainIsMigratable(def))
+ goto cleanup;
+
/* Target domain name, maybe renamed. */
if (dname) {
VIR_FREE(def->name);
goto cleanup;
}
+ if (!qemuDomainIsMigratable(def))
+ goto cleanup;
+
/* Target domain name, maybe renamed. */
if (dname) {
VIR_FREE(def->name);