QemuQEMU invocation logic fragments.
system determines the QEMU executable to run.
system_version cmd is the QEMU version of the system cmd or None if it cannot be found in the PATH.
machine determines the value of the -machine option.
val accel :
host_os:B0_std.Os.Name.t ->
host_arch:B0_std.Os.Arch.t ->
guest_arch:B0_std.Os.Arch.t ->
stringaccel determines the value of the -accel option.
val cpu :
host_arch:B0_std.Os.Arch.t ->
guest_arch:B0_std.Os.Arch.t ->
(string, string) Stdlib.resultcpu determines the value of the -cpu option.
val base_cmd :
system:B0_std.Cmd.t ->
machine:string ->
accel:string ->
cpu:string ->
smp:string ->
mem:string ->
B0_std.Cmd.tbase_cmd is the system executable with corresponding parameters
val uefi_code :
host_os:B0_std.Os.Name.t ->
guest_arch:B0_std.Os.Arch.t ->
(B0_std.Fpath.t, string) Stdlib.resultuefi_code determines the file where the UEFI blob stored.
uefi_drive is a -drive option with uefi_code as read-only flash memory.
See also Drives.
device_usb_qemu_xhci is the -device qemu-xhci. This gives the machine an USB xHCI controller. If the guest as an USB xHCI drivers gives access to USB devices out of the box. See usb_input_devices.
usb_input_devices () are the usb-kbd and usb-tablet USB devices.
type drive_device = | NvmeOn Windows this needs no drivers.
*)| SataOn Windows this needs no drivers.
*)| Sata_cdromOn Windows this needs no drivers.
*)| SmbOn Windows this needs no drivers.
*)| Usb| Usb_cdrom| Virtio_9p_pciI don't think that's supported on Windows.
*)| Virtio_blkOn Windows this needs the viostor driver.
| Virtio_scsiOn Windows this needs the vioscsi driver.
| Virtio_scsi_cdromOn Windows this needs the vioscsi driver.
The type for drives devices.
val drive_devices : drive_device listdrive_devices are all the cases of drive_device.
val drive_device_to_string : drive_device -> stringdrive_device_to_string d is a string representation of d.
val drive_device_of_string : string -> (drive_device, string) Stdlib.resultdrive_device_of_string s parses back the result of drive_device_to_string.
val drive_device_of_path :
B0_std.Fpath.t ->
(drive_device option * B0_std.Fpath.t, string) Stdlib.resultdrive_of_path p is a drive from p it determines a kind of device by parsing a trailing :DEVICE.
type drive = drive_device * B0_std.Fpath.tThe type for drives a drive device and a path to the disk image.
val choose_drive_devices :
use_virtio:bool ->
(drive_device option * B0_std.Fpath.t) list ->
(drive list, string) Stdlib.resultchoose_drive_devices ~use_virtio has the logic to default drive devices. For now this is done on the list because we have the special case for the first drive. This also checks that the paths exists and are files or directories depending on the drive_device and realpath them some of the stuff like smb device doesn't like relative paths.
val drives_cmd : drive list -> B0_std.Cmd.tdrives_cmd is the list of drives attached.
These are specified in boot order. If you need to install on an empty disk image, put it first and the ISO afterwards, it will be skipped by the bootloader before install and picked up afterwards.
device_virtio_gpu_pci is -device virtio-gpu-pci. On Windows guests this need the viogpudo virtio driver.
serial arg is an argument for -serial. If unspecified by default this is mon:stdout.
val cmd :
guest_arch:B0_std.Os.Arch.t ->
mem_size:string option ->
use_virtio:bool ->
drives:drive list ->
graphic:bool ->
use_ramfb:bool ->
use_usb_input:bool ->
(B0_std.Cmd.t, string) Stdlib.result