char **cookieout,
int *cookieoutlen,
unsigned int flags,
- unsigned long resource,
+ unsigned long bandwidth,
qemuMigrationSpec *spec,
virConnectPtr dconn,
const char *graphicsuri,
g_autoptr(virDomainDef) persistDef = NULL;
int rc;
- if (resource > 0)
- priv->migMaxBandwidth = resource;
+ if (bandwidth > 0)
+ priv->migMaxBandwidth = bandwidth;
VIR_DEBUG("driver=%p, vm=%p, cookiein=%s, cookieinlen=%d, "
- "cookieout=%p, cookieoutlen=%p, flags=0x%x, resource=%lu, "
+ "cookieout=%p, cookieoutlen=%p, flags=0x%x, bandwidth=%lu, "
"spec=%p (dest=%d, fwd=%d), dconn=%p, graphicsuri=%s, "
"migrate_disks=%p, migrate_disks_detect_zeroes=%p",
driver, vm, NULLSTR(cookiein), cookieinlen,
- cookieout, cookieoutlen, flags, resource,
+ cookieout, cookieoutlen, flags, bandwidth,
spec, spec->destType, spec->fwdType, dconn,
NULLSTR(graphicsuri), migrate_disks, migrate_disks_detect_zeroes);
char **cookieout,
int *cookieoutlen,
unsigned int flags,
- unsigned long resource,
+ unsigned long bandwidth,
virConnectPtr dconn,
const char *graphicsuri,
const char **migrate_disks,
qemuMigrationSpec spec;
VIR_DEBUG("driver=%p, vm=%p, uri=%s, cookiein=%s, cookieinlen=%d, "
- "cookieout=%p, cookieoutlen=%p, flags=0x%x, resource=%lu, "
+ "cookieout=%p, cookieoutlen=%p, flags=0x%x, bandwidth=%lu, "
"graphicsuri=%s, migrate_disks=%p, migrate_disks_detect_zeroes=%p",
driver, vm, uri, NULLSTR(cookiein), cookieinlen,
- cookieout, cookieoutlen, flags, resource,
+ cookieout, cookieoutlen, flags, bandwidth,
NULLSTR(graphicsuri), migrate_disks, migrate_disks_detect_zeroes);
if (!(uribits = qemuMigrationAnyParseURI(uri, NULL)))
cookieout, cookieoutlen, &spec, dconn, flags);
} else {
ret = qemuMigrationSrcRun(driver, vm, persist_xml, cookiein, cookieinlen,
- cookieout, cookieoutlen, flags, resource,
+ cookieout, cookieoutlen, flags, bandwidth,
&spec, dconn, graphicsuri,
migrate_disks, migrate_disks_detect_zeroes,
migParams, nbdURI);
char **cookieout,
int *cookieoutlen,
unsigned int flags,
- unsigned long resource,
+ unsigned long bandwidth,
virConnectPtr dconn,
const char *graphicsuri,
const char **migrate_disks,
int fds[2] = { -1, -1 };
VIR_DEBUG("driver=%p, vm=%p, st=%p, cookiein=%s, cookieinlen=%d, "
- "cookieout=%p, cookieoutlen=%p, flags=0x%x, resource=%lu, "
+ "cookieout=%p, cookieoutlen=%p, flags=0x%x, bandwidth=%lu, "
"graphicsuri=%s, migrate_disks=%p",
driver, vm, st, NULLSTR(cookiein), cookieinlen,
- cookieout, cookieoutlen, flags, resource,
+ cookieout, cookieoutlen, flags, bandwidth,
NULLSTR(graphicsuri), migrate_disks);
spec.fwdType = MIGRATION_FWD_STREAM;
/* Migration with NBD is not supported with _TUNNELLED, thus
* 'migrate_disks_detect_zeroes' is NULL here */
ret = qemuMigrationSrcRun(driver, vm, persist_xml, cookiein, cookieinlen,
- cookieout, cookieoutlen, flags, resource, &spec,
+ cookieout, cookieoutlen, flags, bandwidth, &spec,
dconn, graphicsuri, migrate_disks, NULL,
migParams, NULL);
const char *dconnuri,
unsigned int flags,
const char *dname,
- unsigned long resource,
+ unsigned long bandwidth,
qemuMigrationParams *migParams)
{
virDomainPtr ddomain = NULL;
unsigned long destflags;
VIR_DEBUG("driver=%p, sconn=%p, dconn=%p, vm=%p, dconnuri=%s, "
- "flags=0x%x, dname=%s, resource=%lu",
+ "flags=0x%x, dname=%s, bandwidth=%lu",
driver, sconn, dconn, vm, NULLSTR(dconnuri),
- flags, NULLSTR(dname), resource);
+ flags, NULLSTR(dname), bandwidth);
/* In version 2 of the protocol, the prepare step is slightly
* different. We fetch the domain XML of the source domain
qemuDomainObjEnterRemote(vm);
ret = dconn->driver->domainMigratePrepareTunnel
- (dconn, st, destflags, dname, resource, dom_xml);
+ (dconn, st, destflags, dname, bandwidth, dom_xml);
if (qemuDomainObjExitRemote(vm, true) < 0)
goto cleanup;
} else {
qemuDomainObjEnterRemote(vm);
ret = dconn->driver->domainMigratePrepare2
(dconn, &cookie, &cookielen, NULL, &uri_out,
- destflags, dname, resource, dom_xml);
+ destflags, dname, bandwidth, dom_xml);
if (qemuDomainObjExitRemote(vm, true) < 0)
goto cleanup;
}
if (flags & VIR_MIGRATE_TUNNELLED)
ret = qemuMigrationSrcPerformTunnel(driver, vm, st, NULL,
NULL, 0, NULL, NULL,
- flags, resource, dconn,
+ flags, bandwidth, dconn,
NULL, NULL, migParams);
else
ret = qemuMigrationSrcPerformNative(driver, vm, NULL, uri_out,
cookie, cookielen,
NULL, NULL, /* No out cookie with v2 migration */
- flags, resource, dconn, NULL, NULL,
+ flags, bandwidth, dconn, NULL, NULL,
NULL, migParams, NULL);
/* Perform failed. Make sure Finish doesn't overwrite the error */
qemuMigrationParams *migParams,
unsigned int flags,
const char *dname,
- unsigned long resource,
+ unsigned long bandwidth,
bool *v3proto)
{
int ret = -1;
VIR_DEBUG("driver=%p, sconn=%p, vm=%p, xmlin=%s, dconnuri=%s, uri=%s, "
"graphicsuri=%s, listenAddress=%s, "
"migrate_disks=%p, nbdPort=%d, nbdURI=%s, flags=0x%x, "
- "dname=%s, resource=%lu",
+ "dname=%s, bandwidth=%lu",
driver, sconn, vm, NULLSTR(xmlin), NULLSTR(dconnuri),
NULLSTR(uri), NULLSTR(graphicsuri), NULLSTR(listenAddress),
migrate_disks, nbdPort, NULLSTR(nbdURI),
- flags, NULLSTR(dname), resource);
+ flags, NULLSTR(dname), bandwidth);
if (flags & VIR_MIGRATE_TUNNELLED && uri) {
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
ret = qemuMigrationSrcPerformPeer2Peer3(driver, sconn, dconn, dconnuri, vm, xmlin,
persist_xml, dname, uri, graphicsuri,
listenAddress, migrate_disks, migrate_disks_detect_zeroes,
- nbdPort, nbdURI, migParams, resource,
+ nbdPort, nbdURI, migParams, bandwidth,
!!useParams, flags);
} else {
ret = qemuMigrationSrcPerformPeer2Peer2(driver, sconn, dconn, vm,
- dconnuri, flags, dname, resource,
+ dconnuri, flags, dname, bandwidth,
migParams);
}
int *cookieoutlen,
unsigned int flags,
const char *dname,
- unsigned long resource,
+ unsigned long bandwidth,
bool v3proto)
{
virObjectEvent *event = NULL;
dconnuri, uri, graphicsuri, listenAddress,
migrate_disks, migrate_disks_detect_zeroes, nbdPort,
nbdURI,
- migParams, flags, dname, resource,
+ migParams, flags, dname, bandwidth,
&v3proto);
} else {
if (qemuMigrationJobStartPhase(vm, QEMU_MIGRATION_PHASE_PERFORM2) < 0)
ret = qemuMigrationSrcPerformNative(driver, vm, persist_xml, uri, cookiein, cookieinlen,
cookieout, cookieoutlen,
- flags, resource, NULL, NULL, NULL, NULL,
+ flags, bandwidth, NULL, NULL, NULL, NULL,
migParams, nbdURI);
}
if (ret < 0)
char **cookieout,
int *cookieoutlen,
unsigned int flags,
- unsigned long resource,
+ unsigned long bandwidth,
const char *nbdURI)
{
qemuDomainObjPrivate *priv = vm->privateData;
if (qemuMigrationSrcPerformNative(driver, vm, persist_xml, uri, cookiein, cookieinlen,
cookieout, cookieoutlen,
- flags, resource, NULL, graphicsuri,
+ flags, bandwidth, NULL, graphicsuri,
migrate_disks, migrate_disks_detect_zeroes,
migParams, nbdURI) < 0)
goto cleanup;