Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
1282bd80
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看板
提交
1282bd80
编写于
8月 26, 2011
作者:
J
Jim Fehlig
提交者:
Jim Fehlig
9月 01, 2011
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
virsh: Expose virDomainMigrateGetMaxSpeed API
上级
b12354be
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
45 addition
and
0 deletion
+45
-0
tools/virsh.c
tools/virsh.c
+41
-0
tools/virsh.pod
tools/virsh.pod
+4
-0
未找到文件。
tools/virsh.c
浏览文件 @
1282bd80
...
@@ -5199,6 +5199,45 @@ done:
...
@@ -5199,6 +5199,45 @@ done:
return
ret
;
return
ret
;
}
}
/*
* "migrate-getspeed" command
*/
static
const
vshCmdInfo
info_migrate_getspeed
[]
=
{
{
"help"
,
N_
(
"Get the maximum migration bandwidth"
)},
{
"desc"
,
N_
(
"Get the maximum migration bandwidth (in Mbps) for a domain."
)},
{
NULL
,
NULL
}
};
static
const
vshCmdOptDef
opts_migrate_getspeed
[]
=
{
{
"domain"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"domain name, id or uuid"
)},
{
NULL
,
0
,
0
,
NULL
}
};
static
bool
cmdMigrateGetMaxSpeed
(
vshControl
*
ctl
,
const
vshCmd
*
cmd
)
{
virDomainPtr
dom
=
NULL
;
unsigned
long
bandwidth
;
bool
ret
=
false
;
if
(
!
vshConnectionUsability
(
ctl
,
ctl
->
conn
))
return
false
;
if
(
!
(
dom
=
vshCommandOptDomain
(
ctl
,
cmd
,
NULL
)))
return
false
;
if
(
virDomainMigrateGetMaxSpeed
(
dom
,
&
bandwidth
,
0
)
<
0
)
goto
done
;
vshPrint
(
ctl
,
"%lu
\n
"
,
bandwidth
);
ret
=
true
;
done:
virDomainFree
(
dom
);
return
ret
;
}
typedef
enum
{
typedef
enum
{
VSH_CMD_BLOCK_JOB_ABORT
=
0
,
VSH_CMD_BLOCK_JOB_ABORT
=
0
,
VSH_CMD_BLOCK_JOB_INFO
=
1
,
VSH_CMD_BLOCK_JOB_INFO
=
1
,
...
@@ -12576,6 +12615,8 @@ static const vshCmdDef domManagementCmds[] = {
...
@@ -12576,6 +12615,8 @@ static const vshCmdDef domManagementCmds[] = {
opts_migrate_setmaxdowntime
,
info_migrate_setmaxdowntime
,
0
},
opts_migrate_setmaxdowntime
,
info_migrate_setmaxdowntime
,
0
},
{
"migrate-setspeed"
,
cmdMigrateSetMaxSpeed
,
{
"migrate-setspeed"
,
cmdMigrateSetMaxSpeed
,
opts_migrate_setspeed
,
info_migrate_setspeed
,
0
},
opts_migrate_setspeed
,
info_migrate_setspeed
,
0
},
{
"migrate-getspeed"
,
cmdMigrateGetMaxSpeed
,
opts_migrate_getspeed
,
info_migrate_getspeed
,
0
},
{
"reboot"
,
cmdReboot
,
opts_reboot
,
info_reboot
,
0
},
{
"reboot"
,
cmdReboot
,
opts_reboot
,
info_reboot
,
0
},
{
"restore"
,
cmdRestore
,
opts_restore
,
info_restore
,
0
},
{
"restore"
,
cmdRestore
,
opts_restore
,
info_restore
,
0
},
{
"resume"
,
cmdResume
,
opts_resume
,
info_resume
,
0
},
{
"resume"
,
cmdResume
,
opts_resume
,
info_resume
,
0
},
...
...
tools/virsh.pod
浏览文件 @
1282bd80
...
@@ -624,6 +624,10 @@ to be down at the end of live migration.
...
@@ -624,6 +624,10 @@ to be down at the end of live migration.
Set the maximum migration bandwidth (in Mbps) for a domain which is being
Set the maximum migration bandwidth (in Mbps) for a domain which is being
migrated to another host.
migrated to another host.
=item B<migrate-getspeed> I<domain-id>
Get the maximum migration bandwidth (in Mbps) for a domain.
=item B<reboot> I<domain-id>
=item B<reboot> I<domain-id>
Reboot a domain. This acts just as if the domain had the B<reboot>
Reboot a domain. This acts just as if the domain had the B<reboot>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录