+Tue Aug 5 18:43:00 CEST 2008 Chris Lalancette <clalance@redhat.com>
+ * src/xend_internal.c: Fix three bugs related to virsh attach-disk:
+ a) make sure to break in the xenDaemonAttachDevice() in the switch
+ b) convert a stray fprintf to a virXendError()
+ c) remove an additional "(device" on the front of the sexpr
+ expression passed to xend. This actually fixes virsh attach-disk
+ and virsh attach-interface work with Xen again
+
Tue Aug 5 18:36:00 CEST 2008 Chris Lalancette <clalance@redhat.com>
* src/stats_linux.c tests/statstest.c: Update the parsing of disks for
xen block statistics. In particular, add support for > 16 xvd devices
STREQ(def->os.type, "hvm") ? 1 : 0,
priv->xendConfigVersion) < 0)
goto cleanup;
+ break;
case VIR_DOMAIN_DEVICE_NET:
if (xenDaemonFormatSxprNet(domain->conn,
STREQ(def->os.type, "hvm") ? 1 : 0,
priv->xendConfigVersion) < 0)
goto cleanup;
+ break;
default:
virXendError(domain->conn, VIR_ERR_NO_SUPPORT, "%s",
ret = xend_op(conn, "", "op", "new", "config", sexpr, NULL);
VIR_FREE(sexpr);
if (ret != 0) {
- fprintf(stderr, _("Failed to create inactive domain %s\n"), name);
+ virXendError(conn, VIR_ERR_XEN_CALL,
+ _("Failed to create inactive domain %s\n"), name);
goto error;
}
xendConfigVersion == 1)
return 0;
- virBufferAddLit(buf, "(device ");
/* Normally disks are in a (device (vbd ...)) block
* but blktap disks ended up in a differently named
* (device (tap ....)) block.... */
else
virBufferAddLit(buf, "(mode 'w')");
- virBufferAddLit(buf, "))");
+ virBufferAddLit(buf, ")");
return 0;
}
return -1;
}
- virBufferAddLit(buf, "(device (vif ");
+ virBufferAddLit(buf, "(vif ");
virBufferVSprintf(buf,
"(mac '%02x:%02x:%02x:%02x:%02x:%02x')",
if ((hvm) && (xendConfigVersion < 4))
virBufferAddLit(buf, "(type ioemu)");
- virBufferAddLit(buf, "))");
+ virBufferAddLit(buf, ")");
return 0;
}