mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	add host guid in migrate command
This commit is contained in:
		
							parent
							
								
									48342ff6e2
								
							
						
					
					
						commit
						ed7214c710
					
				| @ -20,6 +20,7 @@ package com.cloud.agent.api; | ||||
| public class MigrateCommand extends Command { | ||||
|     String vmName; | ||||
|     String destIp; | ||||
|     String hostGuid; | ||||
|     boolean isWindows; | ||||
| 
 | ||||
| 
 | ||||
| @ -44,6 +45,14 @@ public class MigrateCommand extends Command { | ||||
|         return vmName; | ||||
|     } | ||||
|      | ||||
|     public void setHostGuid(String guid) { | ||||
|         this.hostGuid = guid; | ||||
|     } | ||||
|      | ||||
|     public String getHostGuid() { | ||||
|         return this.hostGuid; | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public boolean executeInSequence() { | ||||
|         return true; | ||||
|  | ||||
| @ -1174,6 +1174,8 @@ public class VirtualMachineManagerImpl implements VirtualMachineManager, Listene | ||||
|         try { | ||||
|             boolean isWindows = _guestOsCategoryDao.findById(_guestOsDao.findById(vm.getGuestOSId()).getCategoryId()).getName().equalsIgnoreCase("Windows"); | ||||
|             MigrateCommand mc = new MigrateCommand(vm.getInstanceName(), dest.getHost().getPrivateIpAddress(), isWindows); | ||||
|             mc.setHostGuid(dest.getHost().getGuid()); | ||||
|              | ||||
|             try { | ||||
|                 MigrateAnswer ma = (MigrateAnswer) _agentMgr.send(vm.getLastHostId(), mc); | ||||
|                 if (!ma.getResult()) { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user