Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
34a6e847
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看板
提交
34a6e847
编写于
5月 27, 2016
作者:
N
Nikolay Shirokovskiy
提交者:
Michal Privoznik
9月 13, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
virsh: add --keep-nvram option to undefine command
Signed-off-by:
N
Nikolay Shirokovskiy
<
nshirokovskiy@virtuozzo.com
>
上级
048e5c64
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
3 deletion
+11
-3
tools/virsh-domain.c
tools/virsh-domain.c
+8
-0
tools/virsh.pod
tools/virsh.pod
+3
-3
未找到文件。
tools/virsh-domain.c
浏览文件 @
34a6e847
...
...
@@ -3605,6 +3605,10 @@ static const vshCmdOptDef opts_undefine[] = {
.
type
=
VSH_OT_BOOL
,
.
help
=
N_
(
"remove nvram file, if inactive"
)
},
{.
name
=
"keep-nvram"
,
.
type
=
VSH_OT_BOOL
,
.
help
=
N_
(
"keep nvram file, if inactive"
)
},
{.
name
=
NULL
}
};
...
...
@@ -3630,6 +3634,7 @@ cmdUndefine(vshControl *ctl, const vshCmd *cmd)
bool
remove_all_storage
=
vshCommandOptBool
(
cmd
,
"remove-all-storage"
);
bool
delete_snapshots
=
vshCommandOptBool
(
cmd
,
"delete-snapshots"
);
bool
nvram
=
vshCommandOptBool
(
cmd
,
"nvram"
);
bool
keep_nvram
=
vshCommandOptBool
(
cmd
,
"keep-nvram"
);
/* Positive if these items exist. */
int
has_managed_save
=
0
;
int
has_snapshots_metadata
=
0
;
...
...
@@ -3658,6 +3663,7 @@ cmdUndefine(vshControl *ctl, const vshCmd *cmd)
virshControlPtr
priv
=
ctl
->
privData
;
VSH_REQUIRE_OPTION
(
"delete-snapshots"
,
"remove-all-storage"
);
VSH_EXCLUSIVE_OPTIONS
(
"nvram"
,
"keep-nvram"
);
ignore_value
(
vshCommandOptStringQuiet
(
ctl
,
cmd
,
"storage"
,
&
vol_string
));
...
...
@@ -3681,6 +3687,8 @@ cmdUndefine(vshControl *ctl, const vshCmd *cmd)
}
if
(
nvram
)
flags
|=
VIR_DOMAIN_UNDEFINE_NVRAM
;
if
(
keep_nvram
)
flags
|=
VIR_DOMAIN_UNDEFINE_KEEP_NVRAM
;
if
(
!
(
dom
=
virshCommandOptDomain
(
ctl
,
cmd
,
&
name
)))
return
false
;
...
...
tools/virsh.pod
浏览文件 @
34a6e847
...
...
@@ -2443,7 +2443,7 @@ Output the device used for the TTY console of the domain. If the information
is not available the processes will provide an exit code of 1.
=item B<undefine> I<domain> [I<--managed-save>] [I<--snapshots-metadata>]
[I<--nvram>]
[I<--nvram>]
[I<--keep-nvram>]
[ {I<--storage> B<volumes> | I<--remove-all-storage> [I<--delete-snapshots>]}
I<--wipe-storage>]
...
...
@@ -2461,8 +2461,8 @@ domain. Without the flag, attempts to undefine an inactive domain with
snapshot metadata will fail. If the domain is active, this flag is
ignored.
The I<--nvram> flag ensures no nvram (/domain/os/nvram/) file is
left behind. If the domain has an nvram file and the flag is
I<--nvram> and I<--keep-nvram> specify accordingly to delete or keep nvram
(/domain/os/nvram/) file. If the domain has an nvram file and the flags are
omitted, the undefine will fail.
The I<--storage> flag takes a parameter B<volumes>, which is a comma separated
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录