search for: db_vm

Displaying 16 results from an estimated 16 matches for "db_vm".

2010 Sep 02
1
[PATCH 1/1] Introduce an option to always pxe-boot a vm.
...skomatic.rb @@ -415,9 +415,17 @@ class TaskOmatic end net_interfaces.push({ :mac => nic.mac, :interface => net_device, :virtio => nic.virtio }) } + # network_always indicates that the boot device is "network" and will not change + # upon reboot. + if db_vm.boot_device == "network_always" + boot_device = "network" + else + boot_device = db_vm.boot_device + end + xml = create_vm_xml(db_vm.description, db_vm.uuid, db_vm.memory_allocated, - db_vm.memory_used, db_vm.num_vcpus_allocated, db_vm.boot_...
2009 Jun 25
2
[PATCH] Fix dbomatic state changes.
...tions(+), 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 = Vm.find(:f...
2010 Aug 25
2
[PATCH] Virtio support
...ce = "breth0" # FIXME remove this default at some point end - net_interfaces.push({ :mac => nic.mac, :interface => net_device }) + net_interfaces.push({ :mac => nic.mac, :interface => net_device, :virtio => nic.virtio }) } xml = create_vm_xml(db_vm.description, db_vm.uuid, db_vm.memory_allocated, db_vm.memory_used, db_vm.num_vcpus_allocated, db_vm.boot_device, - net_interfaces, storagedevs) + db_vm.virtio, net_interfaces, storagedevs) @logger.debug("XML Domain definition: #{xml}") --...
2010 Sep 01
1
[PATCH 2/2] Adding the ability to select a Host to start a VM [2/2]
...k-omatic/taskomatic.rb b/src/task-omatic/taskomatic.rb index 471ec88..1dfd74f 100755 --- a/src/task-omatic/taskomatic.rb +++ b/src/task-omatic/taskomatic.rb @@ -355,11 +355,10 @@ class TaskOmatic end end - if task.args + if task.args && !task.args.blank? db_host = db_vm.vm_resource_pool.get_hardware_pool.hosts.find(task.args) - else - db_host = find_capable_host(db_vm) end + db_host ||= find_capable_host(db_vm) node = @qmfc.object(:class => "node", 'hostname' => db_host.hostname) -- 1.7.2.2
2010 Sep 21
1
[PATCH] Check cpus capacity, not real cores.
...69,7 @@ class TaskOmatic #puts "and not #{curr.is_disabled.nil?} and #{curr.is_disabled == 0}" #puts "and #{vm ? vm : 'nil'} or #{vm ? vm.active : 'nil'}) or #{vm ? vm.node : 'nil'} != #{node.object_id}" - if node and node.cores >= db_vm.num_vcpus_allocated \ + if node and node.cpus >= db_vm.num_vcpus_allocated \ and node.memory >= db_vm.memory_allocated \ and not curr.is_disabled.nil? and curr.is_disabled == 0 \ and ((!vm or vm.active == 'false') or vm.node != node.object_id) -- 1....
2009 Nov 04
4
[PATCH server] Update daemons to use new QMF.
...3,7 @@ class DbOmatic < Qpid::Qmf::Console # them to stopped. VMs that exist as QMF objects will get set appropriately when the objects # appear on the bus. begin - qmf_vm = @session.object(:class => 'domain', 'uuid' => db_vm.uuid) + qmf_vm = @qmfc.object(Qmf::Query.new(:class => "domain", 'uuid' => db_vm.uuid)) if qmf_vm == nil set_stopped = true end @@ -498,15 +499,6 @@ class DbOmatic < Qpid::Qmf::Console end...
2009 May 28
0
[PATCH server] Use qpid for migration and add more debugging to taskomatic.
...raise "Unable to find volume #{volume_name} attached to pool #{pool.name}." unless volume + @logger.debug "Verified volume of pool #{volume.path}" + storagedevs << volume.path end @@ -342,6 +357,8 @@ class TaskOmatic volumes = [] volumes += db_vm.storage_volumes volumes << image_volume if image_volume + + @logger.debug("Connecting volumes: #{volumes}") storagedevs = connect_storage_pools(node, volumes) # determine if vm has been assigned to physical or @@ -370,6 +387,8 @@ class TaskOmatic d...
2009 Jun 29
0
[PATCH server] Add svc_vm_actions method to VmService.
...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 = Vm.find(:f...
2009 Jul 24
1
permit many-to-many vms / networks relationship redux
redux patchset permitting a vm to be associated with multiple networks and vice-versa. updated patchset so as to be applicable against current oVirt server HEAD these patches may be applied in any order, they all need to be pushed together
2009 Jul 09
2
permit many-to-many vms / networks relationship
This patchset contains changes to the ovirt server frontend, backend, and tests components, permitting vms to be associated with multiple networks and vice versa. Also included are two patches which are required for the frontend bits; a patch adding collapsable sections to the vm form, which in itself depends on the second patch that provides default values for the cpu and memory vm table fields
2009 May 29
1
[PATCH server] Don't set VM state to shut down in task.
.../src/task-omatic/taskomatic.rb b/src/task-omatic/taskomatic.rb index 11d13cb..5393c29 100755 --- a/src/task-omatic/taskomatic.rb +++ b/src/task-omatic/taskomatic.rb @@ -286,7 +286,6 @@ class TaskOmatic result = vm.undefine if result.status == 0 @logger.info "Deleted VM #{db_vm.description}." - set_vm_shut_down(db_vm) teardown_storage_pools(node) end return -- 1.6.0.6
2010 Aug 26
1
[PATCH] Adding the ability to select a Host to start a VM
...taskomatic.rb index 31c38e3..8e80115 100755 --- a/src/task-omatic/taskomatic.rb +++ b/src/task-omatic/taskomatic.rb @@ -354,7 +354,12 @@ class TaskOmatic raise "Virtual machine is currently paused, cannot start, must resume." end end - db_host = find_capable_host(db_vm) + + if task.args + db_host = db_vm.vm_resource_pool.get_hardware_pool.hosts.find(task.args) + else + db_host = find_capable_host(db_vm) + end node = @qmfc.object(:class => "node", 'hostname' => db_host.hostname) -- 1.7.2.1
2010 Aug 30
1
taskomatic.rb : set_vm_vnc_port
Hi, Does somebody know what is the purpose of this line in taskomatic.rb : set_vm_vnc_port(db_vm, result.description) unless result.status != 0 We removed it to avoid 2 errors in taskomatic.log when a vm is launched : ERROR Mon Aug 30 15:23:00 +0000 2010 (26416) Task action processing failed: ActiveRecord::RecordInvalid: Validation failed: Vnc port must be greater than or equal to 0 ERRO...
2009 Jun 30
0
[PATCH server] permit many-to-many vms / networks relationship
...quot;, "listen" => "0.0.0.0"}) diff --git a/src/task-omatic/taskomatic.rb b/src/task-omatic/taskomatic.rb index b3c0592..7eb8a6c 100755 --- a/src/task-omatic/taskomatic.rb +++ b/src/task-omatic/taskomatic.rb @@ -168,6 +168,8 @@ class TaskOmatic and node.memory >= db_vm.memory_allocated \ and not curr.is_disabled.nil? and curr.is_disabled == 0 \ and ((!vm or vm.active == 'false') or vm.node != node.object_id) + # FIXME ensure host is on all networks a vm's assigned to + # db_vm.nics.each { |nic| ignore if nic.network !...
2009 Dec 02
0
Qmf::Query Hang in db-omatic
...Qmf::Query.new(:class => "node"), 'hostname' => host_info['hostname']) if !qmf_host @logger.info "Host #{host_info['hostname']} is not up after waiting 20 seconds, skipping dead VM check." else 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)...
2009 Nov 13
1
[PATCH server] Replace the occurence of the type @qmfc.object(Qmf::Query.new(:class => "xxx", 'key' => search_key)) for @qmfc.object(Qmf::Query.new(:class => "xxx"), 'key' => search_key) else the search on the key is not functionnal.
...Omatic < Qmf::ConsoleHandler # them to stopped. VMs that exist as QMF objects will get set appropriately when the objects # appear on the bus. begin - qmf_vm = @qmfc.object(Qmf::Query.new(:class => "domain", 'uuid' => db_vm.uuid)) + qmf_vm = @qmfc.object(Qmf::Query.new(:class => "domain"), 'uuid' => db_vm.uuid) if qmf_vm == nil set_stopped = true end diff --git a/src/libvirt-list.rb b/src/libvirt-list.rb index c81926a..f4df67...