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

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

This commit is contained in:
Pavel Czerný 2022-06-20 19:04:49 +02:00 committed by GitHub
parent e2d4141599
commit 9811149add
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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