]> xenbits.xensource.com Git - xenclient/toolstack.git/commitdiff
fix restore that got completly mishandled during the last code refactor
authorVincent Hanquez <vincent.hanquez@eu.citrix.com>
Wed, 10 Jun 2009 12:22:47 +0000 (13:22 +0100)
committerVincent Hanquez <vincent.hanquez@eu.citrix.com>
Wed, 10 Jun 2009 12:22:47 +0000 (13:22 +0100)
xenvm/vmact.ml

index c383283b0dda9dc93e7ae577ee0bf64c7e32f9d5..f42598ffd5872a2e186003e90d06b4efd6a42088 100644 (file)
@@ -362,13 +362,13 @@ let build_info_of_cfg cfg =
                Domain.priv = spec_info;
        }
 
-let build_vm xc xs state f =
+let build_vm xc xs state f restore =
        let cfg = state.vm_cfg in
        let domid = state.vm_domid in
        try
                f state cfg;
                set_cpuid xc domid cfg;
-               add_devices xc xs domid state false;
+               add_devices xc xs domid state restore;
        with exn ->
                warn "receive exception building vm: %s" (Printexc.to_string exn);
                stop_vm xc xs state;
@@ -391,7 +391,7 @@ let start_vm xc xs state =
                        state.vm_arch <- arch;
                ) in
        create_vm xc xs state;
-       build_vm xc xs state from_scratch;
+       build_vm xc xs state from_scratch false;
 
        if cfg.startup = StartupStart then (
                try
@@ -411,7 +411,7 @@ let restart_vm xc xs state fd =
                        Domain.restore ~xc ~xs info state.vm_domid fd;
                ) in
        create_vm xc xs state;
-       build_vm xc xs state from_fd;
+       build_vm xc xs state from_fd true;
        try
                Domain.unpause ~xc state.vm_domid;
                change_vmstate state VmRunning;