[Ovirt-devel] [PATCH server] Fix vnc port forwarding on VM start

Ian Main imain at redhat.com
Fri Mar 6 00:18:45 UTC 2009


This patch just puts the vnc config after the part where we set
which host it's running on :)

This one is already tested by 2 of us so I'll just push it.

Signed-off-by: Ian Main <imain at redhat.com>
Acked-by: Mohammed Morsi <mmorsi at redhat.com>
---
 src/task-omatic/taskomatic.rb |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/task-omatic/taskomatic.rb b/src/task-omatic/taskomatic.rb
index 67c1369..bad3dcf 100755
--- a/src/task-omatic/taskomatic.rb
+++ b/src/task-omatic/taskomatic.rb
@@ -353,12 +353,14 @@ class TaskOmatic
     # of places so you'll see a lot of .reloads.
     db_vm.reload
     set_vm_vnc_port(db_vm, result.description) unless result.status != 0
-    VmVnc.forward(db_vm)
 
     # This information is not available via the libvirt interface.
     db_vm.memory_used = db_vm.memory_allocated
     db_vm.boot_device = Vm::BOOT_DEV_HD
     db_vm.host_id = db_host.id
+    db_vm.save!
+
+    VmVnc.forward(db_vm)
 
     # We write the new state here even though dbomatic will set it soon anyway.
     # This is just to let the UI know that it's good to go right away and really
-- 
1.6.0.6




More information about the ovirt-devel mailing list