Multipass 1.0 – Mini-cloud on Mac or Windows workstation
multipass.run
multipass.run
https://github.com/canonical/multipass/issues/118
This means that your VMs won't be able to get IP addresses on your LAN via DHCP. Kind of a fundamental omission for this kind of product I would think. Curious that it's not a high priority issue for them.
Also, what's the IPv6 story here? I didn't see anything in the docs addressing that, unless I'm missing something.
That said I agree, it should be an option. There are certainly use cases for it.
I'm a sysadmin, so I like tools like this to test out provisioning of servers with configuration management such as Ansible or Puppet.
Running tests at the end where I actually test the endpoints of the deployed services would be really nice to have, but impossible to do through NAT.
I guess that's a niche use case for this because Vagrant had the same issue for a long time, where setting up a bridged network was not possible or required some hacks.
As one example, VirtualBox[0] only allows host -> VM via port forwards when using NAT networking.
[0] see table 6.1 here: https://www.virtualbox.org/manual/ch06.html
VMware:
> The host computer has an adapter on the NAT network (identical to the host-only adapter on the host-only network). This adapter allows the host and the virtual machines to communicate with each other for such purposes as file sharing. The NAT never forwards traffic from the host adapter.
Libvirt/KVM:
> By default, guests that are connected via a virtual network with <forward mode='nat'/> can make any outgoing network connection they like. Incoming connections are allowed from the host, and from other guests connected to the same libvirt network, but all other incoming connections are blocked by iptables rules.
Hyper-V lets you connect from host to NAT'd guests, though the documentation doesn't explicitly say this. Parallels works this way too. Xen is a weird one, because it doesn't really do the NAT itself; if you follow the Linux instructions it'll work the way I describe.
Either way, thanks for the research. I stopped after checking VMware.
This streamlines the use cases where I need a _local_ VM that I can access from my workstation; I don't need (or even want) a tool like this to generate VMs that are externally accessible.
Vagrant — as you pointed out — already does the thing you want it to do. It's more powerful, more flexible, and more complicated.
These are just two different tools.
Think about this as if you want to carry around 3-4 hosts running different services and interacting with each other... on your laptop.
You don't really want bridged networking, because you connect to a different network and screw up the entire environment with different numbering, etc.
This way you can be on a plane without network access and still get work done, or carry a complete demonstration environment to a customer site, or...
By forcing users to be intentional about how those instances are exposed inbound network traffic and the internet in general, it drastically reduces the attack surface of virtual machines on the workstation. It would be great if there was an option for it though (not familiar enough with this tool to know if it is).
docker run -d --rm -p 8080:8080 jenkins:latest
EDIT - technically above is not bridged networking but you get the idea
But the title of this HN post doesn't really explain what it is, since a "mini-cloud" implies a lot more than just Ubuntu VMs. The actual headline of the target page is: "Instant Ubuntu VMs", with a subtitle of: "A mini-cloud on your Mac or Windows workstation." And the title of the page is: "Multipass orchestrates virtual Ubuntu instances" which makes much more sense.
This really is great - after installing it's as simple as "multipass launch" to create and start a new instance, and then "multipass shell" to get a shell prompt. In the background it uses the native Hyper-V hypervisor to run the VMs.
“A mini-cloud on your Mac or Windows workstation” — much better clickbait.
A cloud is a separate set of resources you get to use. They will be there when you go back to them. They will stay there when you don't.
I've not finished reading all the docs, but it just seems like easy vms.
"multipass launch" and "multipass shell" do the same as "vagrant up" and "vagrant ssh".
Vagrant has been around since 2010 and is super mature by now. Multipass seems to be limited to LTS Ubuntu releases, for now at least. There are Vagrant boxes for all Ubuntu releases but also Debian, CentOS or whatever else you would want to run.
So it's basically `docker run -it alpine sh`?
Eg like here (sadly, I don't think this excellent series ever got an update - it'd be nice to see something similar targeting the latest lts..)
same. i think it is a superb idea for ubuntu here. hopefully there are tools like this for other OS distros as well.
Or is it 'MultiPASS, multiple platforms as a service'? Still doesn't make sense, presumably this is a personal PASS, since it isn't multiple platforms as a service, it's a single platform as a service provider, different from other PASS providers in that you can run it on your laptop.
It mentions "run linux VMs" at least once but then seems to only be about Ubuntu VMs.
* try to find a solid reliable "box" to launch
* ensure your virt provider is supported and configured
* create a vagrant file and configure it
* "vagrant up" and more vagrant-specific provisioning in the vagrantfile.
* Destroy the vm and then have to toil through provisioning again if you didn't export your "box"
multipass (same on macos/linux/windows)
multipass launch -n my-machine -c 2 -m 4G -d 20G bionic --cloud-init my-cloud-init.yaml
Also I don’t know why you mentioned “vagrant destroy” and then went on about “toil through your provisioning”.
If you want to use cloud init, there is a vagrant provisioner that supports it. If you don’t, you can use another one like shell scripts or chef or salt or puppet or Ansible or whatever.
If you destroy the machine the provisioning will need to run again - yes. But why would you destroy the machine if you don’t want it to start from scratch? But what toiling is there? Once the provisioners are defined, you just let them run - how is that different than a cloud init provisioned vm?
To add: Virtualbox is supported on Windows/Mac/Linux, is trivial to install, and is the default Vagrant provider. If I want top performance, I can choose other options. Vagrant+Parallels on Mac is nice. So is Vagrant+KVM on Linux.
A Vagrantfile is 4 lines for a basic config, and vagrant will create one for you, and your config is saved should you need to edit it. It's trivially easy. Multipass has the same needs the moment you need anything beyond the defaults. So I'd call that a wash.
How is "vagrant up" harder than "multipass launch"?
What does "vagrant-specific provisioning" means exactly? Vagrant provisions with the same toolchain you are probably using for your production servers. It supports ansible, chef, and puppet. How is that "vagrant-specific"?
When I want to launch a development vm, I want it provisioned in specific ways that match the production instances I will eventually be launching. Vagrant+Ansible gives me that in spades, and it's easy.
The Hashicorp toolchain and ecosystem also provides other advantages: Packer for easily building my own base images, and targeting them at multiple hypervisors, including EC2. Not to mention that all distros are supported. Packer also answers the GP's provisioning complaint. Provision a VM, and use it as the basis for a new box in Packer. Problem solved.
This reminds me of people who like MySQL "because it's easier than Postgres." Not easier. Just not the same.
Are you referring to this? Looks like it only works for virtualbox provider. https://github.com/jameskeane/vagrant-cloudinit
My main point is simplicity wins. No need to mess with providers and plugins and tooling/provider/plugin specific provisioning logistics.
Cloud-init is becoming the de-facto machine provisioning format, it's great to be able to hack on it locally and get the same results elsewhere. Sharing it is great as well, install multipass and point to the cloud-config. Done.
> If you destroy the machine the provisioning will need to run again - yes. But why would you destroy the machine if you don’t want it to start from scratch? But what toiling is there? Once the provisioners are defined, you just let them run - how is that different than a cloud init provisioned vm?
Fair enough! I agree which you here it was probably a bad example on my part.
> Once the provisioners are defined, you just let them run - how is that different than a cloud init provisioned vm?
Which provisioner for which provider? And what plugins does it need? cloud-init is just more simple and portable to use IMO.
Not true. The moment you need to do anything too complex for a simplistic tool, simplicity loses. Multipass doesn't do CentOS, for example. Therfore, for some of my use cases, multipass's simplicity loses.
Furthermore, with multipass, as soon as you need to do anything beyond launching a default image, it's no longer simple. It's just as complicated as Vagrant. Someone has to write your cloud-config.yaml file, just as someone has to write an Ansible playbook.
It currently does not support this for some reason on macos which really sucks! Hopefully it will eventually.
I also want to say that I enjoy using Vagrant as well. It certainly has it's advantages for certain use-cases. For my personal most common use-case, I prefer multipass. That's all! Glad to see there are multiple options continuing to evolve in this space!
Veertu used to ship Veertu Desktop (using Hypervisor.framework, and able to ship via the App Store) and claimed to be supporting vagrant at some point, but then they changed approach completely and focus purely on virtualising macOS for CI build environments now.
Personally I always use either VMware Fusion or Parallels with vagrant anyway (well unless I'm debugging some weird vagrant/vbox issue for someone else).
It'd be nice to have an actively maintained provider that's backed by the built-in framework, but the only one I'm aware of stopped development 3+ years ago.
Has anyone tried to run production(ish) workloads on WSL? Multipass?
WSL2 is still work in progress. Currently it misses many features and the provided Linux kernel does not include many kernel modules (several for networking are missing). For example, WSL2 currently does not support bridge networking.
Another limitation in WSL1 is that it cannot run docker. And so on.
It still might be an OK way to obtain *nix based software, and can «see» your windows directory tree without any mounting/configuration. And no VM is needed.
I've commented this in the past, but WSL1 is much faster than WSL2 when interoping with the Windows file system[0]
* WSL2 sees all my CPU cores (Multipass might be able to do that, but I haven't figured out how to yet)
* Home directory integration seems to be there, but require a manual mount (might be just me, I am running this on an Insiders build)
* I was able to run multipass.exe from inside WSL2 and get a shell to its instances without even thinking twice about it :)
I do use WSL1 on my main machine (and have done so for a long while without any significant issues), and might set up Multipass on it and my Macs to work with Docker containers without the slow, pokey Docker Desktop UI (all I really need is a quick way to get a VM running on any of the native hypervisors, and I'm good).
Oh, and cloud-init support is just dandy :)
However, your question is actually whether on MacOS you can have nested virtualization. Because, if MacOS (and Multipass support) it, then this is what you need.
It absolutely does on linux (which uses the qemu driver). <url> is a custom image URL that is in http://, https://, or file:// format.
As long as the image is a "cloud" image with cloud-init installed it works fine. I tested this with a fedora image on linux.
> However, your question is actually whether on MacOS you can have nested virtualization. Because, if MacOS (and Multipass support) it, then this is what you need.
This was not my question, but I don't believe nested virt is supported on macOS with multipass. Someone correct me if i'm wrong but I think nested virt is only available via VMware Fusion on macOS, multipass uses hypervisor.framework via hyperkit
Indeed, you can launch many more images than those you get when you run "multipass find".
There is a post about this at https://discourse.ubuntu.com/t/new-way-to-launch-images-othe...
qcow2/img launching indeed works fine on linux
edit: there is a pending issue https://github.com/canonical/multipass/issues/307
I just don't get what's closed source and open and why they had to write it in C++
It's basically like LXD, except for VMs instead of containers. Launching fully-functional virtual machines is a breeze.
I was expecting that the multipass project would be absorbed by LXD but it does not look like that would be the case.
That is, you get a native LXD client, and then configure the appropriate `remote:` to connect to the VM that has LXD running.
If you are running anything that requires kernel changes, containers won't really work (there are ways around it but I feel it's hacky. I could be convinced however). If you're running potentially evil software, VM is also much more the way to go.
While Multipass supports LTS versions of Ubuntu and recent development versions of Ubuntu, with LXD you get container images for many more versions and other distributions. See the list at https://us.images.linuxcontainers.org/
>A mini-cloud on your Mac or Windows workstation.
doesn't really mean anything to me.