mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03:00
correct the arguments of migrate_speed
When we set migrate_speed by json, we receive the following error message: libvirtError: internal error unable to execute QEMU command 'migrate_set_speed': Invalid parameter type, expected: number The reason is that: the arguments of migrate_set_speed by json is json number, not json string. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
This commit is contained in:
parent
645c92297a
commit
4f7162d106
1
AUTHORS
1
AUTHORS
@ -135,6 +135,7 @@ Patches have also been contributed by:
|
||||
John Morrissey <jwm@horde.net>
|
||||
Osier Yang <jyang@redhat.com>
|
||||
Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
|
||||
Wen Congyang <wency@cn.fujitsu.com>
|
||||
|
||||
[....send patches to get your name here....]
|
||||
|
||||
|
@ -1453,17 +1453,11 @@ int qemuMonitorJSONSetMigrationSpeed(qemuMonitorPtr mon,
|
||||
unsigned long bandwidth)
|
||||
{
|
||||
int ret;
|
||||
char *bandwidthstr;
|
||||
virJSONValuePtr cmd;
|
||||
virJSONValuePtr reply = NULL;
|
||||
if (virAsprintf(&bandwidthstr, "%lum", bandwidth) < 0) {
|
||||
virReportOOMError();
|
||||
return -1;
|
||||
}
|
||||
cmd = qemuMonitorJSONMakeCommand("migrate_set_speed",
|
||||
"s:value", bandwidthstr,
|
||||
"U:value", bandwidth * 1024ULL * 1024ULL,
|
||||
NULL);
|
||||
VIR_FREE(bandwidthstr);
|
||||
if (!cmd)
|
||||
return -1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user