close_monitor_socket socket name
)
+let verify_config cfg =
+ let verify_hvm = cfg.hvm in
+ let verify_directio = cfg.hvm && cfg.pcis <> [] in
+ if verify_hvm || verify_directio then (
+ let physinfo = Xc.with_intf (fun xc -> Xc.physinfo xc) in
+ let verify =
+ (if verify_hvm then [ ("hvm", List.mem Xc.CAP_HVM physinfo.Xc.capabilities) ] else []) @
+ (if verify_directio then [ ("directio", List.mem Xc.CAP_DirectIO physinfo.Xc.capabilities) ] else [])
+ in
+ let missings = List.map fst (List.filter (fun (_, found) -> found) verify) in
+ if missings <> [] then (
+ error "config requires %s" (String.concat ", " missings);
+ exit 1
+ )
+ )
+
let () =
let anon = ref [] in
let config = ref "" in
in
let cfg = Config.of_file error_report !config in
+
+ verify_config cfg;
+
if cfg.daemonize then
Unixext.daemonize ();