mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Fixed deploying bug in VMWare VMM
git-svn-id: http://svn.opennebula.org/one/trunk@498 3034c82b-c49b-4eb3-8279-a7acafdc01c0
This commit is contained in:
parent
5e106d57d7
commit
4bfc6ac484
@ -392,7 +392,7 @@ public class DeployVM
|
||||
}
|
||||
*/
|
||||
|
||||
DeployVM(String[] args, String hostName, ParseXML _pXML) throws Exception
|
||||
DeployVM(String[] args, String hostName, String vid, ParseXML _pXML) throws Exception
|
||||
{
|
||||
|
||||
String[] argsWithHost = new String[args.length+2];
|
||||
@ -415,7 +415,8 @@ public class DeployVM
|
||||
datastoreName = "datastore1";
|
||||
datacenterName = "ha-datacenter";
|
||||
|
||||
vmName = _pXML.getName();
|
||||
vmName = _pXML.getName() + "-" + vid;
|
||||
vmDiskName = _pXML.getName();
|
||||
pXML = _pXML;
|
||||
|
||||
// Get reference to host
|
||||
|
@ -123,22 +123,22 @@ class OneVmmVmware extends Thread
|
||||
{
|
||||
// let's read the XML file and extract needed info
|
||||
ParseXML pXML = new ParseXML(fileName);
|
||||
|
||||
|
||||
// First, register the VM
|
||||
DeployVM dVM = new DeployVM(arguments, hostName, pXML);
|
||||
|
||||
DeployVM dVM = new DeployVM(arguments, hostName, vid_str, pXML);
|
||||
|
||||
if(!dVM.registerVirtualMachine())
|
||||
{
|
||||
// We will skip this error, it may be pre-registered
|
||||
}
|
||||
|
||||
|
||||
// Now, proceed with the reconfiguration
|
||||
|
||||
if(!dVM.shapeVM())
|
||||
{
|
||||
throw new Exception("Error reconfiguring VM (" + pXML.getName() + ").");
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
oVM = new OperationsOverVM(arguments,hostName);
|
||||
@ -153,7 +153,7 @@ class OneVmmVmware extends Thread
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!oVM.powerOn(pXML.getName()))
|
||||
if(!oVM.powerOn(pXML.getName() + "-" + vid_str))
|
||||
{
|
||||
throw new Exception("Error powering on VM(" + pXML.getName() + ").");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user