Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Platform Request: VirtualBox #1008

Closed
11 tasks done
bgilbert opened this issue Nov 1, 2021 · 8 comments
Closed
11 tasks done

Platform Request: VirtualBox #1008

bgilbert opened this issue Nov 1, 2021 · 8 comments

Comments

@bgilbert
Copy link
Contributor

bgilbert commented Nov 1, 2021

In order to implement support for a new cloud platform in Fedora CoreOS, we need to know several things about the platform. Please try to answer as many questions as you can.

  • Why is the platform important? Who uses it?

VirtualBox is a user-friendly, OSS desktop virtualization package that runs on Linux, Windows, and macOS. It provides a free, cross-platform alternative to VMware.

  • What is the official name of the platform? Is there a short name that's commonly used in client API implementations?

VirtualBox. It's sometimes shortened to VBox. Ignition already uses the virtualbox platform ID.

  • How can the OS retrieve instance userdata? What happens if no userdata is provided?

There's a "guest property" mechanism, added to Ignition in coreos/ignition#1269. The host-guest interface allows detecting that a property is absent.

  • Does the platform provide a way to configure SSH keys for the instance? How can the OS retrieve them? What happens if none are provided?

There's no special platform support for SSH keys.

  • How can the OS retrieve network configuration? Is DHCP sufficient, or is there some other network-accessible metadata service?

DHCP.

  • In particular, how can the OS retrieve the system hostname?

No special support.

  • Does the platform require the OS to have a specific console configuration?

No. Graphical console is the default. Serial ports can be configured but the output is not accessible via the GUI.

  • Is there a mechanism for the OS to report to the platform that it has successfully booted? Is the mechanism required?

It's possible to report status to the host via guest properties, but not required.

  • Does the platform have an agent that runs inside the instance? Is it required? What does it do? What language is it implemented in, and where is the source code repository?

VirtualBox Guest Additions are implemented in C++ and included in the VirtualBox source tree. They provide several optional features.

  • How are VM images uploaded to the platform and published to other users? Is there an API? What disk image format is expected?

VirtualBox can import existing disk images in a variety of formats, including its native VDI format. However, this requires manually creating a VM afterward. It also supports creating VMs from OVF and OVA packages containing VMDK disk images. OVA seems like the best image format for publication.

  • Are there any other platform quirks we should know about?

The primary user interface for setting guest properties is to include the new value inline in a VBoxManage command. With this approach, Ignition configs are constrained by OS-specific limits on command line length.

@bgilbert
Copy link
Contributor Author

bgilbert commented Nov 1, 2021

This would be a good project for someone who wants to get experience adding a platform to the OS. There's a WIP coreos-assembler PR in coreos/coreos-assembler#2489. I think the remaining items are:

@dustymabe dustymabe added the meeting topics for meetings label Nov 3, 2021
@cgwalters
Copy link
Member

One thing that seems specifically useful about this platform is for testing changes (specifically Ignition) locally, particularly on non-Linux (e.g. MacOS and Windows). Basically if we documented to people how to have a Vagrantfile that runs some Ignition code on vagrant up it'd feel familiar to Vagrant users.

I know nowadays particularly on Windows there's WSL, and there's even an effort to have something like FCOS in WSL but part of the idea of Vagrant is that it's cross-platform.

@dustymabe
Copy link
Member

We discussed this at the community meeting today. There didn't seem to be any objects to adding a platform for VirtualBox. Only some concerns from Neal about the OVA image format. He's going to followup with @bgilbert on that.

@dustymabe dustymabe added status/decided status/pending-action Needs action and removed meeting topics for meetings labels Nov 3, 2021
@bgilbert
Copy link
Contributor Author

bgilbert commented Nov 3, 2021

A few followups to the meeting discussion:

  • From a quick test, it appears that VirtualBox's DHCP server in NAT mode does not send a DHCP hostname.
  • It seems that all of the VBox kernel modules are now included in kernel-core.
  • The current plan is to use a VirtualBox-specific OVF template that accounts for VirtualBox's hardware support and quirks, wrapped into an OVA with a VMDK disk image. @Conan-Kudo, does that address your concerns?

@Conan-Kudo
Copy link

@bgilbert Works for me, yeah!

@bgilbert bgilbert added the jira for syncing to jira label Nov 16, 2021
@jmarrero jmarrero self-assigned this Nov 17, 2021
@jmarrero
Copy link
Member

jmarrero commented Mar 1, 2022

working on other issues, I don't think I will get to this any time soon. Someone else can feel free to pick it up.

@bgilbert
Copy link
Contributor Author

This functionality went into stable release 35.20220327.3.0, testing release 35.20220410.2.1, and next release 36.20220410.1.1. Please try it out and report any issues.

@dustymabe
Copy link
Member

With updated documentation to use these new images at https://docs.fedoraproject.org/en-US/fedora-coreos/provisioning-virtualbox/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants