Added VM migration using the nova API in case of an underload
This commit is contained in:
parent
f88cc129cb
commit
717512f5ad
@ -337,6 +337,9 @@ def execute_underload(config, state, host):
|
||||
|
||||
if log.isEnabledFor(logging.INFO):
|
||||
log.info('Underload: obtained a new placement %s', str(placement))
|
||||
for vm, host in placement.items():
|
||||
state['nova'].servers.live_migrate(vm, host, False, False)
|
||||
log.info('Started migration of VM %s to %s', vm, host)
|
||||
|
||||
# TODO: initiate VM migrations according to the obtained placement
|
||||
# Switch of the underloaded host when the migrations are completed
|
||||
|
Loading…
x
Reference in New Issue
Block a user