@@ -1955,7 +1955,17 @@ module VM = struct
19551955 b_info_hvm_default
19561956 | _ -> failwith " Expected HVM build_info here!"
19571957 in
1958- let console_path = Printf. sprintf " unix:%s/%s" ! Xl_path. vnc_dir vm.Vm. id in
1958+ let vnc_info =
1959+ let listen =
1960+ if ! Xenopsd. use_upstream_qemu then
1961+ let console_path = Printf. sprintf " unix:%s/%s" ! Xl_path. vnc_dir vm.Vm. id in
1962+ Some console_path
1963+ else None
1964+ in
1965+ let open Xenlight.Vnc_info in
1966+ let vnc_info_default = with_ctx (fun ctx -> default ctx () ) in
1967+ { vnc_info_default with enable = Some true ; listen = listen }
1968+ in
19591969 { b_info_default with
19601970 ty = Hvm { b_info_hvm_default with
19611971 pae = Some true ;
@@ -1964,12 +1974,12 @@ module VM = struct
19641974 nx = Some true ;
19651975 timeoffset = Some hvm_info.Xenops_interface.Vm. timeoffset;
19661976 nested_hvm = Some true ;
1967- vnc = Xenlight.Vnc_info. ({enable = Some true ; listen = Some console_path; passwd = None ; display = 0 ; findunused = None }) ;
1977+ vnc = vnc_info ;
19681978 keymap = hvm_info.Xenops_interface.Vm. keymap;
19691979 serial = hvm_info.Xenops_interface.Vm. serial;
19701980 boot = Some hvm_info.Xenops_interface.Vm. boot_order;
19711981 usb = Some true ;
1972- usbdevice = Some " tablet" ;
1982+ usbdevice_list = [ " tablet" ] ;
19731983 }
19741984 }
19751985 | PV { Xenops_interface.Vm. boot = Direct direct } ->
@@ -2096,11 +2106,8 @@ module VM = struct
20962106 match restore_fd with
20972107 | None ->
20982108 debug " Calling Xenlight.domain_create_new" ;
2099- (try
21002109 (* with_ctx (fun ctx -> Xenlight_events.async (Xenlight.Domain.create_new ctx domain_config))*)
21012110 Mutex. execute Xenlight_events. xl_m (fun () -> with_ctx (fun ctx -> Xenlight.Domain. create_new ctx domain_config () ))
2102- with e ->
2103- exit 1 )
21042111 | Some fd ->
21052112 debug " Calling Xenlight.domain_create_restore" ;
21062113 Mutex. execute Xenlight_events. xl_m (fun () -> with_ctx (fun ctx -> Xenlight.Domain. create_restore ctx domain_config fd () ))
0 commit comments