Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
880b1a2e
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
880b1a2e
编写于
6月 06, 2017
作者:
P
Peter Krempa
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
virsh: Add support for VIR_DOMAIN_BLOCK_COPY_TRANSIENT_JOB
Allow using the new flag with virsh.
上级
b7e534c6
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
15 addition
and
1 deletion
+15
-1
tools/virsh-domain.c
tools/virsh-domain.c
+9
-1
tools/virsh.pod
tools/virsh.pod
+6
-0
未找到文件。
tools/virsh-domain.c
浏览文件 @
880b1a2e
...
...
@@ -2184,6 +2184,10 @@ static const vshCmdOptDef opts_block_copy[] = {
.
type
=
VSH_OT_BOOL
,
.
help
=
N_
(
"the bandwidth limit is in bytes/s rather than MiB/s"
)
},
{.
name
=
"transient-job"
,
.
type
=
VSH_OT_BOOL
,
.
help
=
N_
(
"the copy job is not persisted if VM is turned off"
)
},
{.
name
=
NULL
}
};
...
...
@@ -2205,6 +2209,7 @@ cmdBlockCopy(vshControl *ctl, const vshCmd *cmd)
bool
blocking
=
vshCommandOptBool
(
cmd
,
"wait"
)
||
finish
||
pivot
;
bool
async
=
vshCommandOptBool
(
cmd
,
"async"
);
bool
bytes
=
vshCommandOptBool
(
cmd
,
"bytes"
);
bool
transientjob
=
vshCommandOptBool
(
cmd
,
"transient-job"
);
int
timeout
=
0
;
const
char
*
path
=
NULL
;
int
abort_flags
=
0
;
...
...
@@ -2234,6 +2239,8 @@ cmdBlockCopy(vshControl *ctl, const vshCmd *cmd)
flags
|=
VIR_DOMAIN_BLOCK_REBASE_SHALLOW
;
if
(
vshCommandOptBool
(
cmd
,
"reuse-external"
))
flags
|=
VIR_DOMAIN_BLOCK_REBASE_REUSE_EXT
;
if
(
transientjob
)
flags
|=
VIR_DOMAIN_BLOCK_COPY_TRANSIENT_JOB
;
if
(
vshCommandOptTimeoutToMs
(
ctl
,
cmd
,
&
timeout
)
<
0
)
return
false
;
...
...
@@ -2282,7 +2289,8 @@ cmdBlockCopy(vshControl *ctl, const vshCmd *cmd)
}
}
if
(
granularity
||
buf_size
||
(
format
&&
STRNEQ
(
format
,
"raw"
))
||
xml
)
{
if
(
granularity
||
buf_size
||
(
format
&&
STRNEQ
(
format
,
"raw"
))
||
xml
||
transientjob
)
{
/* New API */
if
(
bandwidth
||
granularity
||
buf_size
)
{
params
=
vshCalloc
(
ctl
,
3
,
sizeof
(
*
params
));
...
...
tools/virsh.pod
浏览文件 @
880b1a2e
...
...
@@ -1078,6 +1078,7 @@ command.
| I<--xml> B<file> } [I<--shallow>] [I<--reuse-external>] [I<bandwidth>]
[I<--wait> [I<--async>] [I<--verbose>]] [{I<--pivot> | I<--finish>}]
[I<--timeout> B<seconds>] [I<granularity>] [I<buf-size>] [I<--bytes>]
[I<--transient-job>]
Copy a disk backing image chain to a destination. Either I<dest> as
the destination file name, or I<--xml> with the name of an XML file containing
...
...
@@ -1132,6 +1133,11 @@ within a certain range. Specifying I<buf-size> will control how much data can
be simultaneously in-flight during the copy; larger values use more memory but
may allow faster completion (the default value is usually correct).
I<--transient-job> allows to specify that the user does not require the job to
be recovered if the VM crashes or is turned off before the job completes. This
flag removes the restriction of copy jobs to transient domains if that
restriction is applied by the hypervisor.
=item B<blockpull> I<domain> I<path> [I<bandwidth>] [I<--bytes>] [I<base>]
[I<--wait> [I<--verbose>] [I<--timeout> B<seconds>] [I<--async>]]
[I<--keep-relative>]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录