Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
0d81f231
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看板
提交
0d81f231
编写于
4月 14, 2016
作者:
S
ShaoHe Feng
提交者:
Jiri Denemark
4月 14, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
virsh: add compression options for migration
Signed-off-by:
N
Nikolay Shirokovskiy
<
nshirokovskiy@virtuozzo.com
>
上级
061e2428
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
91 addition
and
3 deletion
+91
-3
tools/virsh-domain.c
tools/virsh-domain.c
+76
-0
tools/virsh.pod
tools/virsh.pod
+15
-3
未找到文件。
tools/virsh-domain.c
浏览文件 @
0d81f231
...
...
@@ -9783,6 +9783,26 @@ static const vshCmdOptDef opts_migrate[] = {
.
type
=
VSH_OT_BOOL
,
.
help
=
N_
(
"compress repeated pages during live migration"
)
},
{.
name
=
"comp-methods"
,
.
type
=
VSH_OT_STRING
,
.
help
=
N_
(
"comma separated list of compression methods to be used"
)
},
{.
name
=
"comp-mt-level"
,
.
type
=
VSH_OT_INT
,
.
help
=
N_
(
"compress level for multithread compression"
)
},
{.
name
=
"comp-mt-threads"
,
.
type
=
VSH_OT_INT
,
.
help
=
N_
(
"number of compession threads for multithread compression"
)
},
{.
name
=
"comp-mt-dthreads"
,
.
type
=
VSH_OT_INT
,
.
help
=
N_
(
"number of decompession threads for multithread compression"
)
},
{.
name
=
"comp-xbzrle-cache"
,
.
type
=
VSH_OT_INT
,
.
help
=
N_
(
"page cache size for xbzrle compression"
)
},
{.
name
=
"auto-converge"
,
.
type
=
VSH_OT_BOOL
,
.
help
=
N_
(
"force convergence during live migration"
)
...
...
@@ -9863,6 +9883,9 @@ doMigrate(void *opaque)
virTypedParameterPtr
params
=
NULL
;
int
nparams
=
0
;
int
maxparams
=
0
;
int
intOpt
=
0
;
unsigned
long
long
ullOpt
=
0
;
int
rv
;
virConnectPtr
dconn
=
data
->
dconn
;
sigemptyset
(
&
sigmask
);
...
...
@@ -9930,6 +9953,59 @@ doMigrate(void *opaque)
VIR_FREE
(
val
);
}
if
(
vshCommandOptStringReq
(
ctl
,
cmd
,
"comp-methods"
,
&
opt
)
<
0
)
goto
out
;
if
(
opt
)
{
char
**
val
=
virStringSplit
(
opt
,
","
,
0
);
if
(
virTypedParamsAddStringList
(
&
params
,
&
nparams
,
&
maxparams
,
VIR_MIGRATE_PARAM_COMPRESSION
,
(
const
char
**
)
val
)
<
0
)
{
VIR_FREE
(
val
);
goto
save_error
;
}
VIR_FREE
(
val
);
}
if
((
rv
=
vshCommandOptInt
(
ctl
,
cmd
,
"comp-mt-level"
,
&
intOpt
))
<
0
)
{
goto
out
;
}
else
if
(
rv
>
0
)
{
if
(
virTypedParamsAddInt
(
&
params
,
&
nparams
,
&
maxparams
,
VIR_MIGRATE_PARAM_COMPRESSION_MT_LEVEL
,
intOpt
)
<
0
)
goto
save_error
;
}
if
((
rv
=
vshCommandOptInt
(
ctl
,
cmd
,
"comp-mt-threads"
,
&
intOpt
))
<
0
)
{
goto
out
;
}
else
if
(
rv
>
0
)
{
if
(
virTypedParamsAddInt
(
&
params
,
&
nparams
,
&
maxparams
,
VIR_MIGRATE_PARAM_COMPRESSION_MT_THREADS
,
intOpt
)
<
0
)
goto
save_error
;
}
if
((
rv
=
vshCommandOptInt
(
ctl
,
cmd
,
"comp-mt-dthreads"
,
&
intOpt
))
<
0
)
{
goto
out
;
}
else
if
(
rv
>
0
)
{
if
(
virTypedParamsAddInt
(
&
params
,
&
nparams
,
&
maxparams
,
VIR_MIGRATE_PARAM_COMPRESSION_MT_DTHREADS
,
intOpt
)
<
0
)
goto
save_error
;
}
if
((
rv
=
vshCommandOptULongLong
(
ctl
,
cmd
,
"comp-xbzrle-cache"
,
&
ullOpt
))
<
0
)
{
goto
out
;
}
else
if
(
rv
>
0
)
{
if
(
virTypedParamsAddULLong
(
&
params
,
&
nparams
,
&
maxparams
,
VIR_MIGRATE_PARAM_COMPRESSION_XBZRLE_CACHE
,
ullOpt
)
<
0
)
goto
save_error
;
}
if
(
vshCommandOptStringReq
(
ctl
,
cmd
,
"xml"
,
&
opt
)
<
0
)
goto
out
;
if
(
opt
)
{
...
...
tools/virsh.pod
浏览文件 @
0d81f231
...
...
@@ -1537,11 +1537,14 @@ to the I<uri> namespace is displayed instead of being modified.
=item B<migrate> [I<--live>] [I<--offline>] [I<--direct>] [I<--p2p> [I<--tunnelled>]]
[I<--persistent>] [I<--undefinesource>] [I<--suspend>] [I<--copy-storage-all>]
[I<--copy-storage-inc>] [I<--change-protection>] [I<--unsafe>] [I<--verbose>]
[I<--
compressed>] [I<--
abort-on-error>] [I<--auto-converge>] [I<--postcopy>]
[I<--abort-on-error>] [I<--auto-converge>] [I<--postcopy>]
[I<--postcopy-after-precopy>] I<domain> I<desturi> [I<migrateuri>]
[I<graphicsuri>] [I<listen-address>] [I<dname>]
[I<--timeout> B<seconds> [I<--timeout-suspend> | I<--timeout-postcopy>]]
[I<--xml> B<file>] [I<--migrate-disks> B<disk-list>] [I<--disks-port> B<port>]
[I<--compressed>] [I<--comp-methods> B<method-list>]
[I<--comp-mt-level>] [I<--comp-mt-threads>] [I<--comp-mt-dthreads>]
[I<--comp-xbzrle-cache>]
Migrate domain to another host. Add I<--live> for live migration; <--p2p>
for peer-2-peer migration; I<--direct> for direct migration; or I<--tunnelled>
...
...
@@ -1564,8 +1567,7 @@ enforces that no incompatible configuration changes will be made to the domain
while the migration is underway; this flag is implicitly enabled when supported
by the hypervisor, but can be explicitly used to reject the migration if the
hypervisor lacks change protection support. I<--verbose> displays the progress
of migration. I<--compressed> activates compression of memory pages that have
to be transferred repeatedly during live migration. I<--abort-on-error> cancels
of migration. I<--abort-on-error> cancels
the migration if a soft error (for example I/O error) happens during the
migration. I<--auto-converge> forces convergence during live migration.
I<--postcopy> enables post-copy logic in migration, but does not
...
...
@@ -1602,6 +1604,16 @@ I<--timeout-postcopy> is used, virsh will switch migration from pre-copy
to post-copy upon timeout; migration has to be started with I<--postcopy>
option for this to work.
I<--compressed> activates compression, the compression method is chosen
with I<--comp-methods>. Supported methods are "mt" and "xbzrle" and
can be used in any combination. When no methods are specified, a hypervisor
default methods will be used. QEMU defaults to "xbzrle". Compression methods
can be tuned further. I<--comp-mt-level> sets compression level.
Values are in range from 0 to 9, where 1 is maximum speed and 9 is maximum
compression. I<--comp-mt-threads> and I<--comp-mt-dthreads> set the number
of compress threads on source and the number of decompress threads on target
respectively. I<--comp-xbzrle-cache> sets size of page cache in bytes.
Running migration can be canceled by interrupting virsh (usually using
C<Ctrl-C>) or by B<domjobabort> command sent from another virsh instance.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录