Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
6fba577e
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,发现更多精彩内容 >>
提交
6fba577e
编写于
1月 24, 2012
作者:
M
Michal Privoznik
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
virsh: Expose new VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE flag
to cmdSnapshotCreate and cmdSnapshotCreateAs.
上级
109593ec
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
20 addition
and
2 deletion
+20
-2
tools/virsh.c
tools/virsh.c
+6
-0
tools/virsh.pod
tools/virsh.pod
+14
-2
未找到文件。
tools/virsh.c
浏览文件 @
6fba577e
...
@@ -14662,6 +14662,7 @@ static const vshCmdOptDef opts_snapshot_create[] = {
...
@@ -14662,6 +14662,7 @@ static const vshCmdOptDef opts_snapshot_create[] = {
{"halt", VSH_OT_BOOL, 0, N_("halt domain after snapshot is created")},
{"halt", VSH_OT_BOOL, 0, N_("halt domain after snapshot is created")},
{"disk-only", VSH_OT_BOOL, 0, N_("capture disk state but not vm state")},
{"disk-only", VSH_OT_BOOL, 0, N_("capture disk state but not vm state")},
{"reuse-external", VSH_OT_BOOL, 0, N_("reuse any existing external files")},
{"reuse-external", VSH_OT_BOOL, 0, N_("reuse any existing external files")},
{"quiesce", VSH_OT_BOOL, 0, N_("quiesce guest's file systems")},
{NULL, 0, 0, NULL}
{NULL, 0, 0, NULL}
};
};
...
@@ -14686,6 +14687,8 @@ cmdSnapshotCreate(vshControl *ctl, const vshCmd *cmd)
...
@@ -14686,6 +14687,8 @@ cmdSnapshotCreate(vshControl *ctl, const vshCmd *cmd)
flags |= VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY;
flags |= VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY;
if (vshCommandOptBool(cmd, "reuse-external"))
if (vshCommandOptBool(cmd, "reuse-external"))
flags |= VIR_DOMAIN_SNAPSHOT_CREATE_REUSE_EXT;
flags |= VIR_DOMAIN_SNAPSHOT_CREATE_REUSE_EXT;
if (vshCommandOptBool(cmd, "quiesce"))
flags |= VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE;
if (!vshConnectionUsability(ctl, ctl->conn))
if (!vshConnectionUsability(ctl, ctl->conn))
goto cleanup;
goto cleanup;
...
@@ -14795,6 +14798,7 @@ static const vshCmdOptDef opts_snapshot_create_as[] = {
...
@@ -14795,6 +14798,7 @@ static const vshCmdOptDef opts_snapshot_create_as[] = {
{"halt", VSH_OT_BOOL, 0, N_("halt domain after snapshot is created")},
{"halt", VSH_OT_BOOL, 0, N_("halt domain after snapshot is created")},
{"disk-only", VSH_OT_BOOL, 0, N_("capture disk state but not vm state")},
{"disk-only", VSH_OT_BOOL, 0, N_("capture disk state but not vm state")},
{"reuse-external", VSH_OT_BOOL, 0, N_("reuse any existing external files")},
{"reuse-external", VSH_OT_BOOL, 0, N_("reuse any existing external files")},
{"quiesce", VSH_OT_BOOL, 0, N_("quiesce guest's file systems")},
{"diskspec", VSH_OT_ARGV, 0,
{"diskspec", VSH_OT_ARGV, 0,
N_("disk attributes: disk[,snapshot=type][,driver=type][,file=name]")},
N_("disk attributes: disk[,snapshot=type][,driver=type][,file=name]")},
{NULL, 0, 0, NULL}
{NULL, 0, 0, NULL}
...
@@ -14820,6 +14824,8 @@ cmdSnapshotCreateAs(vshControl *ctl, const vshCmd *cmd)
...
@@ -14820,6 +14824,8 @@ cmdSnapshotCreateAs(vshControl *ctl, const vshCmd *cmd)
flags |= VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY;
flags |= VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY;
if (vshCommandOptBool(cmd, "reuse-external"))
if (vshCommandOptBool(cmd, "reuse-external"))
flags |= VIR_DOMAIN_SNAPSHOT_CREATE_REUSE_EXT;
flags |= VIR_DOMAIN_SNAPSHOT_CREATE_REUSE_EXT;
if (vshCommandOptBool(cmd, "quiesce"))
flags |= VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE;
if (!vshConnectionUsability(ctl, ctl->conn))
if (!vshConnectionUsability(ctl, ctl->conn))
goto cleanup;
goto cleanup;
...
...
tools/virsh.pod
浏览文件 @
6fba577e
...
@@ -2046,7 +2046,8 @@ used to represent properties of snapshots.
...
@@ -2046,7 +2046,8 @@ used to represent properties of snapshots.
=over 4
=over 4
=item B<snapshot-create> I<domain> [I<xmlfile>] {[I<--redefine> [I<--current>]]
=item B<snapshot-create> I<domain> [I<xmlfile>] {[I<--redefine> [I<--current>]]
| [I<--no-metadata>] [I<--halt>] [I<--disk-only>] [I<--reuse-external]}
| [I<--no-metadata>] [I<--halt>] [I<--disk-only>] [I<--reuse-external]
[I<--quiesce>]}
Create a snapshot for domain I<domain> with the properties specified in
Create a snapshot for domain I<domain> with the properties specified in
I<xmlfile>. Normally, the only properties settable for a domain snapshot
I<xmlfile>. Normally, the only properties settable for a domain snapshot
...
@@ -2088,6 +2089,11 @@ external snapshot with a destination of an existing file, then the
...
@@ -2088,6 +2089,11 @@ external snapshot with a destination of an existing file, then the
existing file is truncated and reused; otherwise, a snapshot is refused
existing file is truncated and reused; otherwise, a snapshot is refused
to avoid losing contents of the existing files.
to avoid losing contents of the existing files.
If I<--quiesce> is specified, libvirt will try to use guest agent
to freeze and unfreeze domain's mounted file systems. However,
if domain has no guest agent, snapshot creation will fail.
Currently, this requires I<--disk-only> to be passed as well.
Existence of snapshot metadata will prevent attempts to B<undefine>
Existence of snapshot metadata will prevent attempts to B<undefine>
a persistent domain. However, for transient domains, snapshot
a persistent domain. However, for transient domains, snapshot
metadata is silently lost when the domain quits running (whether
metadata is silently lost when the domain quits running (whether
...
@@ -2095,7 +2101,8 @@ by command such as B<destroy> or by internal guest action).
...
@@ -2095,7 +2101,8 @@ by command such as B<destroy> or by internal guest action).
=item B<snapshot-create-as> I<domain> {[I<--print-xml>]
=item B<snapshot-create-as> I<domain> {[I<--print-xml>]
| [I<--no-metadata>] [I<--halt>] [I<--reuse-existing>]} [I<name>]
| [I<--no-metadata>] [I<--halt>] [I<--reuse-existing>]} [I<name>]
[I<description>] [I<--disk-only> [[I<--diskspec>] B<diskspec>]...]
[I<description>] [I<--disk-only> [I<--quiesce>]
[[I<--diskspec>] B<diskspec>]...]
Create a snapshot for domain I<domain> with the given <name> and
Create a snapshot for domain I<domain> with the given <name> and
<description>; if either value is omitted, libvirt will choose a
<description>; if either value is omitted, libvirt will choose a
...
@@ -2123,6 +2130,11 @@ option requests an external snapshot with a destination of an existing
...
@@ -2123,6 +2130,11 @@ option requests an external snapshot with a destination of an existing
file, then the existing file is truncated and reused; otherwise, a
file, then the existing file is truncated and reused; otherwise, a
snapshot is refused to avoid losing contents of the existing files.
snapshot is refused to avoid losing contents of the existing files.
If I<--quiesce> is specified, libvirt will try to use guest agent
to freeze and unfreeze domain's mounted file systems. However,
if domain has no guest agent, snapshot creation will fail.
Currently, this requires I<--disk-only> to be passed as well.
If I<--no-metadata> is specified, then the snapshot data is created,
If I<--no-metadata> is specified, then the snapshot data is created,
but any metadata is immediately discarded (that is, libvirt does not
but any metadata is immediately discarded (that is, libvirt does not
treat the snapshot as current, and cannot revert to the snapshot
treat the snapshot as current, and cannot revert to the snapshot
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录