@@ -549,28 +549,28 @@ def save(id, drv_message)
549549
550550 # Save migration data to remote location
551551 steps << {
552- :driver => :vmm ,
553- :action => "/bin/cat - >#{ mfile } " ,
554- :is_local => false ,
555- :stdin => mdata ,
556- :no_extra_params => true
552+ :driver => :vmm ,
553+ :action => "/bin/cat - >#{ mfile } " ,
554+ :is_local => false ,
555+ :stdin => mdata ,
556+ :no_extra_params => true
557557 }
558558 end
559559
560560 steps . concat ( [
561- # Save the Virtual Machine state
562- {
563- :driver => :vmm ,
564- :action => :save ,
565- :parameters => [ :deploy_id , :checkpoint_file , :host ]
566- } ,
567- # Execute networking clean up operations
568- {
569- :driver => :vnm ,
570- :action => :clean ,
571- :parameters => [ :host ]
572- }
573- ] )
561+ # Save the Virtual Machine state
562+ {
563+ :driver => :vmm ,
564+ :action => :save ,
565+ :parameters => [ :deploy_id , :checkpoint_file , :host ]
566+ } ,
567+ # Execute networking clean up operations
568+ {
569+ :driver => :vnm ,
570+ :action => :clean ,
571+ :parameters => [ :host ]
572+ }
573+ ] )
574574
575575 action . run ( steps )
576576 end
@@ -658,69 +658,69 @@ def migrate(id, drv_message)
658658
659659 # Save migration data to remote location
660660 steps << {
661- :driver => :vmm ,
662- :action => "/bin/cat - >#{ mfile } " ,
663- :is_local => false ,
664- :stdin => mdata ,
665- :no_extra_params => true
661+ :driver => :vmm ,
662+ :action => "/bin/cat - >#{ mfile } " ,
663+ :is_local => false ,
664+ :stdin => mdata ,
665+ :no_extra_params => true
666666 }
667667 end
668668
669669 steps . concat ( [
670- # Execute a pre-migrate TM setup
671- {
672- :driver => :tm ,
673- :action => :tm_premigrate ,
674- :parameters => pre . split ,
675- :stdin => action . data [ :vm ]
676- } ,
677- # Execute pre-boot networking setup on migrating host
678- {
679- :driver => :vnm ,
680- :action => :pre ,
681- :destination => true
682- } ,
683- # Migrate the Virtual Machine
684- {
685- :driver => :vmm ,
686- :action => :migrate ,
687- :parameters => [ :deploy_id , :dest_host , :host ] ,
688- :fail_actions => [
689- {
690- :driver => :tm ,
691- :action => :tm_failmigrate ,
692- :parameters => failed . split ,
693- :stdin => action . data [ :vm ] ,
694- :no_fail => true
695- }
696- ]
697- } ,
698- # Execute networking clean up operations
699- # NOTE: VM is now in the new host. If we fail from now on, oned will
700- # assume that the VM is in the previous host but it is in fact
701- # migrated. Log errors will be shown in vm.log
702- {
703- :driver => :vnm ,
704- :action => :clean ,
705- :parameters => [ :host ] ,
706- :no_fail => true
707- } ,
708- # Execute post-boot networking setup on migrating host
709- {
710- :driver => :vnm ,
711- :action => :post ,
712- :parameters => [ :deploy_id , :host ] ,
713- :destination => true ,
714- :no_fail => true
715- } ,
716- {
717- :driver => :tm ,
718- :action => :tm_postmigrate ,
719- :parameters => post . split ,
720- :stdin => action . data [ :vm ] ,
721- :no_fail => true
722- }
723- ] )
670+ # Execute a pre-migrate TM setup
671+ {
672+ :driver => :tm ,
673+ :action => :tm_premigrate ,
674+ :parameters => pre . split ,
675+ :stdin => action . data [ :vm ]
676+ } ,
677+ # Execute pre-boot networking setup on migrating host
678+ {
679+ :driver => :vnm ,
680+ :action => :pre ,
681+ :destination => true
682+ } ,
683+ # Migrate the Virtual Machine
684+ {
685+ :driver => :vmm ,
686+ :action => :migrate ,
687+ :parameters => [ :deploy_id , :dest_host , :host ] ,
688+ :fail_actions => [
689+ {
690+ :driver => :tm ,
691+ :action => :tm_failmigrate ,
692+ :parameters => failed . split ,
693+ :stdin => action . data [ :vm ] ,
694+ :no_fail => true
695+ }
696+ ]
697+ } ,
698+ # Execute networking clean up operations
699+ # NOTE: VM is now in the new host. If we fail from now on, oned will
700+ # assume that the VM is in the previous host but it is in fact
701+ # migrated. Log errors will be shown in vm.log
702+ {
703+ :driver => :vnm ,
704+ :action => :clean ,
705+ :parameters => [ :host ] ,
706+ :no_fail => true
707+ } ,
708+ # Execute post-boot networking setup on migrating host
709+ {
710+ :driver => :vnm ,
711+ :action => :post ,
712+ :parameters => [ :deploy_id , :host ] ,
713+ :destination => true ,
714+ :no_fail => true
715+ } ,
716+ {
717+ :driver => :tm ,
718+ :action => :tm_postmigrate ,
719+ :parameters => post . split ,
720+ :stdin => action . data [ :vm ] ,
721+ :no_fail => true
722+ }
723+ ] )
724724
725725 action . run ( steps )
726726 end
0 commit comments