- try
- let conn =
- let name = node.MS.node_status.MS.node.Mclu_conf.libvirt_uri in
- C.connect ~name () in
- let dom = D.create_xml conn xml [] in
- printf "mclu: %s:%s started\n" hostname (D.get_name dom)
- with Libvirt.Virterror msg ->
- eprintf "mclu: %s: %s\n" hostname (Libvirt.Virterror.to_string msg);
- exit 1
+ let dom =
+ try
+ let conn =
+ let name = node.MS.node_status.MS.node.Mclu_conf.libvirt_uri in
+ C.connect ~name () in
+ let dom = D.create_xml conn xml [] in
+ printf "mclu: %s:%s started\n" hostname (D.get_name dom);
+ dom
+ with Libvirt.Virterror msg ->
+ eprintf "mclu: %s: %s\n" hostname (Libvirt.Virterror.to_string msg);
+ exit 1 in
+
+ (* Graphical console? *)
+ if !open_viewer then
+ Mclu_viewer.viewer ~verbose ~host:hostname (D.get_name dom);
+
+ (* Serial console? (Interactive, so run it last) *)
+ if !open_console then
+ Mclu_console.console ~verbose ~host:hostname (D.get_name dom)