mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
Bug #1609: Poweroff action creates a new history entry
This commit is contained in:
parent
b3bf623670
commit
627058c341
@ -532,11 +532,21 @@ void LifeCycleManager::restart_action(int vid)
|
||||
}
|
||||
else // if ( vm->get_state() == VirtualMachine::POWEROFF )
|
||||
{
|
||||
time_t the_time = time(0);
|
||||
|
||||
vm->set_state(VirtualMachine::ACTIVE); // Only needed by poweroff
|
||||
vm->set_state(VirtualMachine::BOOT_POWEROFF);
|
||||
|
||||
vm->cp_history();
|
||||
|
||||
vmpool->update(vm);
|
||||
|
||||
vm->set_stime(the_time);
|
||||
|
||||
vm->set_running_stime(the_time);
|
||||
|
||||
vmpool->update_history(vm);
|
||||
|
||||
vm->log("LCM", Log::INFO, "New VM state is BOOT_POWEROFF");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user