Deploy vm to specified host through Infrastructure -> Hosts -> <Select one> -> View Instances -> Add Instance

(cherry picked from commit ce2b2a1fc7)
This commit is contained in:
Wei Zhou 2014-12-01 14:47:06 +01:00
parent 513adab51b
commit bf9e1ae7e8
3 changed files with 11 additions and 1 deletions

View File

@ -947,7 +947,13 @@
keyboard : keyboard
});
}
if (g_hostid != null) {
$.extend(deployVmData, {
hostid : g_hostid
});
}
$(window).trigger('cloudStack.deployVirtualMachine', {
deployVmData: deployVmData,
formData: args.data

View File

@ -325,9 +325,12 @@
}
if ("hosts" in args.context) {
g_hostid = args.context.hosts[0].id;
$.extend(data, {
hostid: args.context.hosts[0].id
});
} else {
g_hostid = null;
}
if ("affinityGroups" in args.context) {

View File

@ -21,6 +21,7 @@ var g_username = null;
var g_userid = null;
var g_account = null;
var g_domainid = null;
var g_hostid = null;
var g_loginCmdText = null;
var g_enableLogging = false;
var g_timezoneoffset = null;