let dm_info_of_cfg cfg =
let nics = get_nics cfg in
let nics = List.map (fun nic -> nic.nic_mac, nic.nic_bridge, if nic.nic_model="" then None else Some nic.nic_model) nics in
+
+ let extrahvm =
+ (match cfg.cdrom_pt with
+ | None -> []
+ | Some path -> [ ("-cdrom-pt", Some path) ]
+ ) @ cfg.extrahvm
+ in
+
let disp =
match cfg.display with
| DisplayNone -> Device.Dm.NONE
Device.Dm.oem_features = cfg.oem_features;
Device.Dm.inject_sci = cfg.inject_sci;
Device.Dm.videoram = (match cfg.videoram with None -> 8 | Some i -> i);
- Device.Dm.extras = cfg.extrahvm;
+ Device.Dm.extras = extrahvm;
}
let rm_snapshots disks =
sound: string option;
inject_sci: int;
qemu_pv: bool;
+ cdrom_pt: string option;
cpus_affinity: (int * (int list)) list;
}
| "sound" -> string_of_string_option cfg.sound
| "notify" -> string_of_notify cfg.notify
| "qemu-pv" -> string_of_bool cfg.qemu_pv
+ | "cdrom-pt" -> string_of_string_option cfg.cdrom_pt
| _ -> raise (Unknown_field field)
let set cfg field value =
| "sound" -> { cfg with sound = string_option_of_string value }
| "notify" -> { cfg with notify = config_notify_of_string value }
| "qemu-pv" -> { cfg with qemu_pv = bool_of_string value }
+ | "cdrom-pt" -> { cfg with cdrom_pt = string_option_of_string value }
| _ -> raise (Unknown_field field)
let list_add cfg field value =
inject_sci = 0;
sound = None;
qemu_pv = true;
+ cdrom_pt = None;
(* list_{get/del/add} *)
disks = [];