mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
(cherry picked from commit 28924db84ba7b0f6c78e2ab754c4390b0c86aac3)
This commit is contained in:
parent
f4326ea714
commit
c78e7f614b
@ -320,11 +320,27 @@ void DispatchManager::free_vm_resources(unique_ptr<VirtualMachine> vm,
|
||||
|
||||
vm->set_exit_time(time(0));
|
||||
|
||||
if (vm->hasHistory() && vm->get_etime() == 0)
|
||||
if (vm->hasHistory())
|
||||
{
|
||||
vm->set_etime(time(0));
|
||||
bool update_history = false;
|
||||
|
||||
vmpool->update_history(vm.get());
|
||||
if (vm->get_running_stime() != 0 && vm->get_running_etime() == 0)
|
||||
{
|
||||
update_history = true;
|
||||
vm->set_running_etime(time(0));
|
||||
}
|
||||
|
||||
if (vm->get_etime() == 0)
|
||||
{
|
||||
update_history = true;
|
||||
|
||||
vm->set_etime(time(0));
|
||||
}
|
||||
|
||||
if (update_history)
|
||||
{
|
||||
vmpool->update_history(vm.get());
|
||||
}
|
||||
}
|
||||
|
||||
VectorAttribute * graphics = vm->get_template_attribute("GRAPHICS");
|
||||
|
Loading…
x
Reference in New Issue
Block a user