1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-26 06:50:09 +03:00

B #5874: Fix ETIME when terminating VM in poweroff (#2144)

(cherry picked from commit 9811149add03fe2fb44f5bb6865907f4ee37eb25)
This commit is contained in:
Pavel Czerný 2022-06-20 19:04:49 +02:00 committed by Ruben S. Montero
parent 7a1a85edb6
commit 97664da2d9
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -320,6 +320,13 @@ void DispatchManager::free_vm_resources(unique_ptr<VirtualMachine> vm,
vm->set_exit_time(time(0));
if (vm->hasHistory() && vm->get_etime() == 0)
{
vm->set_etime(time(0));
vmpool->update_history(vm.get());
}
VectorAttribute * graphics = vm->get_template_attribute("GRAPHICS");
if ( graphics != nullptr && graphics->vector_value("PORT", port) == 0