2011-01-31 10:47:03 +00:00
|
|
|
/*
|
|
|
|
* qemu_migration.h: QEMU migration handling
|
|
|
|
*
|
|
|
|
* Copyright (C) 2006-2011 Red Hat, Inc.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __QEMU_MIGRATION_H__
|
|
|
|
# define __QEMU_MIGRATION_H__
|
|
|
|
|
|
|
|
# include "qemu_conf.h"
|
|
|
|
|
|
|
|
|
|
|
|
bool qemuMigrationIsAllowed(virDomainDefPtr def)
|
|
|
|
ATTRIBUTE_NONNULL(1);
|
|
|
|
int qemuMigrationSetOffline(struct qemud_driver *driver,
|
|
|
|
virDomainObjPtr vm);
|
|
|
|
|
|
|
|
int qemuMigrationWaitForCompletion(struct qemud_driver *driver, virDomainObjPtr vm);
|
|
|
|
|
2011-02-03 11:09:28 +00:00
|
|
|
char *qemuMigrationBegin(struct qemud_driver *driver,
|
|
|
|
virDomainObjPtr vm,
|
2011-05-18 09:26:30 +00:00
|
|
|
const char *xmlin,
|
2011-02-03 11:09:28 +00:00
|
|
|
char **cookieout,
|
|
|
|
int *cookieoutlen);
|
|
|
|
|
2011-01-31 10:47:03 +00:00
|
|
|
int qemuMigrationPrepareTunnel(struct qemud_driver *driver,
|
|
|
|
virConnectPtr dconn,
|
2011-01-24 18:06:16 +00:00
|
|
|
const char *cookiein,
|
|
|
|
int cookieinlen,
|
|
|
|
char **cookieout,
|
|
|
|
int *cookieoutlen,
|
2011-01-31 10:47:03 +00:00
|
|
|
virStreamPtr st,
|
|
|
|
const char *dname,
|
|
|
|
const char *dom_xml);
|
|
|
|
|
|
|
|
int qemuMigrationPrepareDirect(struct qemud_driver *driver,
|
|
|
|
virConnectPtr dconn,
|
2011-01-24 18:06:16 +00:00
|
|
|
const char *cookiein,
|
|
|
|
int cookieinlen,
|
|
|
|
char **cookieout,
|
|
|
|
int *cookieoutlen,
|
2011-01-31 10:47:03 +00:00
|
|
|
const char *uri_in,
|
|
|
|
char **uri_out,
|
|
|
|
const char *dname,
|
|
|
|
const char *dom_xml);
|
|
|
|
|
|
|
|
int qemuMigrationPerform(struct qemud_driver *driver,
|
|
|
|
virConnectPtr conn,
|
|
|
|
virDomainObjPtr vm,
|
2011-05-18 09:26:30 +00:00
|
|
|
const char *xmlin,
|
Add a second URI parameter to virDomainMigratePerform3 method
The virDomainMigratePerform3 currently has a single URI parameter
whose meaning varies. It is either
- A QEMU migration URI (normal migration)
- A libvirtd connection URI (peer2peer migration)
Unfortunately when using peer2peer migration, without also
using tunnelled migration, it is possible that both URIs are
required.
This adds a second URI parameter to the virDomainMigratePerform3
method, to cope with this scenario. Each parameter how has a fixed
meaning.
NB, there is no way to actually take advantage of this yet,
since virDomainMigrate/virDomainMigrateToURI do not have any
way to provide the 2 separate URIs
* daemon/remote.c, src/remote/remote_driver.c,
src/remote/remote_protocol.x, src/remote_protocol-structs: Add
the second URI parameter to perform3 message
* src/driver.h, src/libvirt.c, src/libvirt_internal.h: Add
the second URI parameter to Perform3 method
* src/libvirt_internal.h, src/qemu/qemu_migration.c,
src/qemu/qemu_migration.h: Update to handle URIs correctly
2011-05-18 13:18:53 +00:00
|
|
|
const char *dconnuri,
|
2011-01-31 10:47:03 +00:00
|
|
|
const char *uri,
|
2011-01-24 18:06:16 +00:00
|
|
|
const char *cookiein,
|
|
|
|
int cookieinlen,
|
|
|
|
char **cookieout,
|
|
|
|
int *cookieoutlen,
|
2011-01-31 10:47:03 +00:00
|
|
|
unsigned long flags,
|
|
|
|
const char *dname,
|
2011-02-03 11:09:28 +00:00
|
|
|
unsigned long resource,
|
2011-05-23 12:50:11 +00:00
|
|
|
bool v3proto);
|
2011-01-31 10:47:03 +00:00
|
|
|
|
|
|
|
virDomainPtr qemuMigrationFinish(struct qemud_driver *driver,
|
|
|
|
virConnectPtr dconn,
|
|
|
|
virDomainObjPtr vm,
|
2011-01-24 18:06:16 +00:00
|
|
|
const char *cookiein,
|
|
|
|
int cookieinlen,
|
|
|
|
char **cookieout,
|
|
|
|
int *cookieoutlen,
|
2011-01-31 10:47:03 +00:00
|
|
|
unsigned long flags,
|
2011-05-23 12:50:11 +00:00
|
|
|
int retcode,
|
|
|
|
bool v3proto);
|
2011-01-31 10:47:03 +00:00
|
|
|
|
2011-02-03 11:09:28 +00:00
|
|
|
int qemuMigrationConfirm(struct qemud_driver *driver,
|
|
|
|
virConnectPtr conn,
|
|
|
|
virDomainObjPtr vm,
|
|
|
|
const char *cookiein,
|
|
|
|
int cookieinlen,
|
|
|
|
unsigned int flags,
|
2011-05-19 11:48:15 +00:00
|
|
|
int retcode);
|
2011-02-03 11:09:28 +00:00
|
|
|
|
2011-01-31 10:47:03 +00:00
|
|
|
|
2011-03-10 00:35:13 +00:00
|
|
|
int qemuMigrationToFile(struct qemud_driver *driver, virDomainObjPtr vm,
|
|
|
|
int fd, off_t offset, const char *path,
|
|
|
|
const char *compressor,
|
|
|
|
bool is_reg, bool bypassSecurityDriver)
|
2011-05-05 10:30:26 +00:00
|
|
|
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(5)
|
2011-03-10 00:35:13 +00:00
|
|
|
ATTRIBUTE_RETURN_CHECK;
|
|
|
|
|
2011-01-31 10:47:03 +00:00
|
|
|
#endif /* __QEMU_MIGRATION_H__ */
|