mirror of https://github.com/apache/cloudstack.git
Bug 12078 - pxe config file not being sent down (edit)
status 12078: resolved fixed
This commit is contained in:
parent
d387e586ef
commit
41799f021b
|
|
@ -459,10 +459,13 @@ public class BareMetalVmManagerImpl extends UserVmManagerImpl implements BareMet
|
|||
}
|
||||
s_logger.debug("This is a PXE start, prepare PXE server first");
|
||||
|
||||
List<HostVO> servers = _hostDao.listBy(Host.Type.PxeServer, vm.getDataCenterIdToDeployIn());
|
||||
List<HostVO> servers = _hostDao.listBy(Host.Type.PxeServer, null, dest.getPod().getId(), dest.getDataCenter().getId());
|
||||
if (servers.size() == 0) {
|
||||
throw new CloudRuntimeException("Cannot find PXE server, please make sure there is one PXE server per zone");
|
||||
}
|
||||
if (servers.size() > 1) {
|
||||
throw new CloudRuntimeException("Find more than one PXE server, please make sure there is only one PXE server per zone");
|
||||
}
|
||||
HostVO pxeServer = servers.get(0);
|
||||
|
||||
if (!_pxeMgr.prepare(pxeType, profile, dest, context, pxeServer.getId())) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue