Rather than hardcoding a path to the /opt/homebrew/lib directory for the
build.rs file to link with, we should use the path provided by the user
in LIBKRUN_EFI instead. If the environment variable cannot be found
because a user didn't use it, then fallback to the default path.
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Adds the "Bootloader Configuration" section to the docs page. Additionaly, it
specifies the option is purely for vfkit parity and does not get processed by
the CLI.
Resolves: #55
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Vfkit supports the schemes `unix` and `none` in addition to `tcp`.
Krunkit currently only implements `tcp`, so implement the remaining
schemes to meet vfkit parity.
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Update the documentation for the virtio-blk device to be more accurate.
The user may include 1 or more disks, where the first is the root disk
and any subsequent disks will be used as data disks. Also do not restrict
the backing image to be a raw image, as we now support QCOW2.
Resolves: #48
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Version 1.11 of libkrun introduces support for Nested
Virtualization on macOS hosts. Let's add a flag to allow users to
request its enablement.
Signed-off-by: Sergio Lopez <slp@redhat.com>
Update the README.md to give instructions on how to build krunkit from
source assuming all necessary dependencies are installed.
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Add an LIBKRUN_EFI variable that will link the specified library with the krunkit binary.
This is only necessary for when the user has built libkrun-efi from source
or if libkrun-efi.dylib is not in /opt/homebrew/lib/.
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Updates the argument parsing in src/cmdline.rs to no longer use
`args_parse` or `val_parse`.
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Updates the argument parsing for `virtio-blk` to use new helper
functions.
Makes the `format=` argument optional and provides the default value
`raw`.
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Link with libkrun's new `krun_add_disk2` API to allow the user to use
either a Raw or Qcow2 disk image.
Adds the `format` argument to the `virtio-blk` device.
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Automatically adjust VRAM so VRAM+RAM doesn't exceed the space
available in a 36 bit IPA, accounting for the start address and
rounding in libkrun, which sets an upper limit of ~62GiB.
Also, reject a memory configuration larger than 60 GiB to ensure
we leave some room for VRAM.
Fixes: #17
Signed-off-by: Sergio Lopez <slp@redhat.com>
On version 1.9.5 libkrun introduced an API to set the size of the
SHM window for virtio-gpu. Use it to set it to be as large as the
host's RAM. This should give us enough room for running large
models, accounting for potential device memory fragmentation.
Signed-off-by: Sergio Lopez <slp@redhat.com>
Use the new krun_add_disk API, introduced in libkrun 1.9.5, to be
able to add an arbitrary number of virtio-blk devices.
Signed-off-by: Sergio Lopez <slp@redhat.com>