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

Support Linux #62

Closed
fkorotkov opened this issue May 10, 2022 · 19 comments · Fixed by #190
Closed

Support Linux #62

fkorotkov opened this issue May 10, 2022 · 19 comments · Fixed by #190
Assignees
Labels
enhancement New feature or request

Comments

@fkorotkov
Copy link
Contributor

At the moment Tart only supports macOS VMs but Virtualization.Framework allows to run Linux VMs itself. Linux subsystem seems to even have better support for Virtio related stuff and things like #13 should work for Linux even right now.

One of the use case might be @mitchellh's NixOS setup simplification: https://github.com/mitchellh/nixos-config

@fkorotkov fkorotkov added the enhancement New feature or request label May 10, 2022
@jmgilman
Copy link

As far as I know, the "scripted VM" space for the M1 architecture is very limited right now. UTM is the most popular open-source solution for M1, but the developer has noted that scripted interactions are not in the short-term plan. There's multipass, but for obvious reasons it's very biased towards Ubuntu.

So, if the maintainers of this project are so interested, I think there's a large gap that needs to be covered here. Tart looks promising so long as it remains open-source and committed to development workflows.

@fkorotkov
Copy link
Contributor Author

@jmgilman, "scripted VM" term is new for me so I want to clarify something. If I understood you correctly you'd like to see Tart Vagrant Provider, right?

Tart is built to be interacted with via CLI and we are very open to providing necessary APIs for more tools.

We already created a Packer Plugin which can automate VM creation. You kind of scripting them with templates. For example, here is how we build our virtual machines (see files in templates folder).

@ChefAustin
Copy link
Contributor

+1 to Tart Vagrant Provider.

@fkorotkov
Copy link
Contributor Author

Sounds good. Let's leave scope of this issue to just support booting and running Linux VMs.

I've created a separate feature request in Vagrant repository about Tart provider. Please upvote and subscribe to it.

@scottslowe
Copy link

Big +1 for Linux support in Tart

@fkorotkov
Copy link
Contributor Author

@scottslowe are you also interested in the Vagrant support or you have something different in mind? Trying to compile a list of possible workflows.

@jmgilman
Copy link

To clarify, I wasn't explicitly asking for Vagrant support. There are a plethora of task runners out there that can do as much or as little as needed for automation - the only pre-requisite is a useful CLI interface with sane outputs. As such, I'm only pushing for adopting Linux support so that I can engage in that rich ecosystem to further improve my development workflows and pipelines on the M1 architecture.

@scottslowe
Copy link

@fkorotkov Like @jmgilman, I'm also not asking specifically for Vagrant support; I'm seeking first-class Linux support in Tart (and, I suppose, in cirrus-cli).

@fkorotkov
Copy link
Contributor Author

Got it. Thank you @scottslowe and @jmgilman for swifty response! Right now our thinking is to wait for the new macOS which will be available after WWDC next month and we'll see what will change in the Virtualization.Framework.

Right now there is a concerning thing like #13 which we can implement for Linux even right now since virtiofs is supported there but not in macOS Monterey. Which means in case of supporting both Linux and macOS there will be a feature disturbancy. Or alternatively we'll support only thing that work both in Linux and macOS in Tart.

@ringods
Copy link

ringods commented May 27, 2022

+1 to Tart Vagrant Provider.

@ChefAustin I made a new ticket for this: #108

@fkorotkov
Copy link
Contributor Author

Seems there are some extra Linux support just got announced at WWDC https://developer.apple.com/documentation/virtualization/running_gui_linux_in_a_virtual_machine_on_a_mac

We'll investigate and will reevaluate feasibility of supporting Linux. But so far it looks promising...

@geerlingguy
Copy link

Mostly a +1 for Linux support here, but partly for selfish reasons; Tart has been the nicest VM-on-Apple-Silicon experience so far, at least for automated/scripted use, so I would love to adopt Tart (instead of VirtualBox, which doesn't work at all anymore) for all my examples testing SSH-based automation on macOS for things like my Ansible for DevOps examples.

I might not be able to help as much on the Swift/code side, but I would be quite willing to help with testing, and also porting Packer image builds over to Tart (https://github.com/geerlingguy/packer-boxes).

@edigaryev edigaryev self-assigned this Aug 22, 2022
@b00ga
Copy link

b00ga commented Aug 22, 2022

I'm still Intel mac at home, but at work, I'm transitioning to an M1 MBP and ordered a Mac Studio, so I'm looking for a good virtualization story on Apple Silicon mac. On x86 Mac, I use vagrant and virtualbox extensively for building and testing applications and ansible development on Linux, including maintaining OS base images for my organization, so I'm interested in both Linux support and a vagrant provider.

@fkorotkov
Copy link
Contributor Author

fkorotkov commented Aug 24, 2022

We just release 0.22.0 version of Tart with early Linux support. Please try it out! You can either create a linux VM from scratch from an *.iso file:

# Create a bare VM
tart create --linux ubuntu

# Install Ubuntu
tart run --disk focal-desktop-arm64.iso ubuntu

# Run VM
tart run ubuntu

Or try one that we pushed to GitHub packages:

tart clone ghcr.io/cirruslabs/ubuntu:focal ubuntu
tart run ubuntu

The one that we pushed has username preconfigured as tart with tart as password as well. In contrast with macOS VMs where admin is used for both.

@dan-snelson
Copy link

❯ tart --version
0.22.0

❯ tart create --linux ubuntu
UnsupportedOSError()

❯ sw_vers
ProductName:	macOS
ProductVersion:	12.5.1
BuildVersion:	21G83

@fkorotkov
Copy link
Contributor Author

I should note that Linux support is only available on Ventura hosts. Otherwise you'll get an exception like @dan-snelson has!

@ringods
Copy link

ringods commented Aug 25, 2022

@fkorotkov out of curiosity, why do you specifically need Ventura?

@fkorotkov
Copy link
Contributor Author

Apple added Linux support to their Virtualization.Framework only in Ventura unfortunately. To be more precise usable Linux support to have a UI, folder sharing and so on. Before there was some low level support that Docker was using for their Docker machine but it didn't support UI, installation from ISO, etc.

@unikzforce
Copy link

can you please add these into official website documentations?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants