Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
5d784bd6
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5d784bd6
编写于
10月 14, 2011
作者:
J
Jiri Denemark
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Clarify semantics of virDomainMigrate2
Explicitly disallow conflicts between domain name from dxml and dname.
上级
24b8be89
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
20 addition
and
5 deletion
+20
-5
src/libvirt.c
src/libvirt.c
+3
-0
src/qemu/qemu_driver.c
src/qemu/qemu_driver.c
+2
-2
src/qemu/qemu_migration.c
src/qemu/qemu_migration.c
+14
-3
src/qemu/qemu_migration.h
src/qemu/qemu_migration.h
+1
-0
未找到文件。
src/libvirt.c
浏览文件 @
5d784bd6
...
...
@@ -4854,6 +4854,9 @@ error:
* in accessing the underlying storage. The migration will fail
* if @dxml would cause any guest-visible changes. Pass NULL
* if no changes are needed to the XML between source and destination.
* @dxml cannot be used to rename the domain during migration (use
* @dname for that purpose). Domain name in @dxml must either match the
* original domain name or @dname if it was specified.
*
* Returns the new domain object if the migration was successful,
* or NULL in case of error. Note that the new domain object
...
...
src/qemu/qemu_driver.c
浏览文件 @
5d784bd6
...
...
@@ -8043,7 +8043,7 @@ qemuDomainMigrateBegin3(virDomainPtr domain,
char
**
cookieout
,
int
*
cookieoutlen
,
unsigned
long
flags
,
const
char
*
dname
ATTRIBUTE_UNUSED
,
const
char
*
dname
,
unsigned
long
resource
ATTRIBUTE_UNUSED
)
{
struct
qemud_driver
*
driver
=
domain
->
conn
->
privateData
;
...
...
@@ -8083,7 +8083,7 @@ qemuDomainMigrateBegin3(virDomainPtr domain,
if
(
qemuDomainCheckEjectableMedia
(
driver
,
vm
)
<
0
)
goto
endjob
;
if
(
!
(
xml
=
qemuMigrationBegin
(
driver
,
vm
,
xmlin
,
if
(
!
(
xml
=
qemuMigrationBegin
(
driver
,
vm
,
xmlin
,
dname
,
cookieout
,
cookieoutlen
)))
goto
endjob
;
...
...
src/qemu/qemu_migration.c
浏览文件 @
5d784bd6
...
...
@@ -993,6 +993,7 @@ qemuDomainMigrateGraphicsRelocate(struct qemud_driver *driver,
char
*
qemuMigrationBegin
(
struct
qemud_driver
*
driver
,
virDomainObjPtr
vm
,
const
char
*
xmlin
,
const
char
*
dname
,
char
**
cookieout
,
int
*
cookieoutlen
)
{
...
...
@@ -1001,8 +1002,10 @@ char *qemuMigrationBegin(struct qemud_driver *driver,
virDomainDefPtr
def
=
NULL
;
qemuDomainObjPrivatePtr
priv
=
vm
->
privateData
;
VIR_DEBUG
(
"driver=%p, vm=%p, xmlin=%s, cookieout=%p, cookieoutlen=%p"
,
driver
,
vm
,
NULLSTR
(
xmlin
),
cookieout
,
cookieoutlen
);
VIR_DEBUG
(
"driver=%p, vm=%p, xmlin=%s, dname=%s,"
" cookieout=%p, cookieoutlen=%p"
,
driver
,
vm
,
NULLSTR
(
xmlin
),
NULLSTR
(
dname
),
cookieout
,
cookieoutlen
);
/* Only set the phase if we are inside QEMU_ASYNC_JOB_MIGRATION_OUT.
* Otherwise we will start the async job later in the perform phase losing
...
...
@@ -1028,6 +1031,14 @@ char *qemuMigrationBegin(struct qemud_driver *driver,
VIR_DOMAIN_XML_INACTIVE
)))
goto
cleanup
;
if
(
STRNEQ
(
def
->
name
,
vm
->
def
->
name
)
&&
STRNEQ_NULLABLE
(
def
->
name
,
dname
))
{
qemuReportError
(
VIR_ERR_INVALID_ARG
,
"%s"
,
_
(
"target domain name doesn't match source name"
" nor destination name"
));
goto
cleanup
;
}
if
(
!
virDomainDefCheckABIStability
(
vm
->
def
,
def
))
goto
cleanup
;
...
...
@@ -2012,7 +2023,7 @@ static int doPeer2PeerMigrate3(struct qemud_driver *driver,
* bit here, because we are already running inside the context of
* a single job. */
dom_xml
=
qemuMigrationBegin
(
driver
,
vm
,
xmlin
,
dom_xml
=
qemuMigrationBegin
(
driver
,
vm
,
xmlin
,
dname
,
&
cookieout
,
&
cookieoutlen
);
if
(
!
dom_xml
)
goto
cleanup
;
...
...
src/qemu/qemu_migration.h
浏览文件 @
5d784bd6
...
...
@@ -79,6 +79,7 @@ int qemuMigrationSetOffline(struct qemud_driver *driver,
char
*
qemuMigrationBegin
(
struct
qemud_driver
*
driver
,
virDomainObjPtr
vm
,
const
char
*
xmlin
,
const
char
*
dname
,
char
**
cookieout
,
int
*
cookieoutlen
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录