search for: set_vm_stop

Displaying 4 results from an estimated 4 matches for "set_vm_stop".

2009 Jun 25
2
[PATCH] Fix dbomatic state changes.
...anged, 60 insertions(+), 25 deletions(-) diff --git a/src/db-omatic/db_omatic.rb b/src/db-omatic/db_omatic.rb index b3d5e73..1091333 100755 --- a/src/db-omatic/db_omatic.rb +++ b/src/db-omatic/db_omatic.rb @@ -113,6 +113,15 @@ class DbOmatic < Qpid::Qmf::Console end end + def set_vm_stopped(db_vm) + db_vm.host_id = nil + db_vm.memory_used = nil + db_vm.num_vcpus_used = nil + db_vm.needs_restart = nil + db_vm.vnc_port = nil + db_vm.state = Vm::STATE_STOPPED + end + def update_domain_state(domain, state_override = nil) vm = V...
2009 Jun 29
0
[PATCH server] Add svc_vm_actions method to VmService.
...Cancels queued tasks for for Vm with +id+ diff --git a/src/db-omatic/db_omatic.rb b/src/db-omatic/db_omatic.rb index b3d5e73..155ff5e 100755 --- a/src/db-omatic/db_omatic.rb +++ b/src/db-omatic/db_omatic.rb @@ -113,6 +113,15 @@ class DbOmatic < Qpid::Qmf::Console end end + def set_vm_stopped(db_vm) + db_vm.host_id = nil + db_vm.memory_used = nil + db_vm.num_vcpus_used = nil + db_vm.needs_restart = nil + db_vm.vnc_port = nil + db_vm.state = Vm::STATE_STOPPED + end + def update_domain_state(domain, state_override = nil) vm = V...
2009 Aug 07
1
[PATCH server] Fixed db-omatic to update the host for a running vm when the object_props callback is fired.
...+ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/src/db-omatic/db_omatic.rb b/src/db-omatic/db_omatic.rb index b5b7b81..d2540e1 100755 --- a/src/db-omatic/db_omatic.rb +++ b/src/db-omatic/db_omatic.rb @@ -202,7 +202,18 @@ class DbOmatic < Qpid::Qmf::Console set_vm_stopped(vm) end end + # If we are running, update the node that the domain is running on + elsif state == Vm::STATE_RUNNING + @logger.info "VM is running, determine the node it is running on" + qmf_vm = @session.object(:class =&...
2009 Dec 02
0
Qmf::Query Hang in db-omatic
...db_vm = Vm.find(:all, :conditions => ["host_id = ? AND state = ?", db_host.id, Vm::STATE_UNREACHABLE]) db_vm.each do |vm| @logger.info "Moving vm #{vm.description} in state #{vm.state} to state stopped." set_vm_stopped(vm) vm.save! end end rescue Exception => e # just log any errors here @logger.info "Exception checking for dead VMs (could be normal): #{e.message}" @logger.info e.backtrace end end end </...