mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
parent
6faed83d43
commit
1bd3d61354
@ -497,6 +497,7 @@ void LifeCycleManager::shutdown_action(const LCMAction& la, bool hard)
|
||||
void LifeCycleManager::undeploy_action(const LCMAction& la, bool hard)
|
||||
{
|
||||
int vid = la.vm_id();
|
||||
unsigned int port;
|
||||
VirtualMachine * vm = vmpool->get(vid,true);
|
||||
|
||||
if ( vm == 0 )
|
||||
@ -531,6 +532,14 @@ void LifeCycleManager::undeploy_action(const LCMAction& la, bool hard)
|
||||
vmm->trigger(VMMAction::SHUTDOWN,vid);
|
||||
}
|
||||
|
||||
VectorAttribute * graphics = vm->get_template_attribute("GRAPHICS");
|
||||
|
||||
if ( graphics != 0 && (graphics->vector_value("PORT", port) == 0))
|
||||
{
|
||||
graphics->remove("PORT");
|
||||
clpool->release_vnc_port(vm->get_cid(), port);
|
||||
}
|
||||
|
||||
vmpool->update_history(vm);
|
||||
|
||||
vmpool->update(vm);
|
||||
|
@ -924,7 +924,15 @@ void LifeCycleManager::epilog_success_action(int vid)
|
||||
vm->set_etime(the_time);
|
||||
|
||||
vm->set_vm_info();
|
||||
|
||||
VectorAttribute * graphics = vm->get_template_attribute("GRAPHICS");
|
||||
|
||||
if ( graphics != 0 && (graphics->vector_value("PORT", port) == 0))
|
||||
{
|
||||
graphics->remove("PORT");
|
||||
clpool->release_vnc_port(vm->get_cid(), port);
|
||||
}
|
||||
|
||||
vmpool->update_history(vm);
|
||||
|
||||
vmpool->update(vm);
|
||||
@ -933,13 +941,6 @@ void LifeCycleManager::epilog_success_action(int vid)
|
||||
|
||||
hpool->del_capacity(vm->get_hid(), vm->get_oid(), cpu, mem, disk, pci);
|
||||
|
||||
const VectorAttribute * graphics = vm->get_template_attribute("GRAPHICS");
|
||||
|
||||
if ( graphics != 0 && (graphics->vector_value("PORT", port) == 0))
|
||||
{
|
||||
clpool->release_vnc_port(vm->get_cid(), port);
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
dm->trigger(action,vid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user