canonical / canonical/multipass
Support cross-architecture instances
- Dominant language
- C++
- Stars
- 9.2k
- Forks
- 828
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 44
Description
`installed: 0.8.0-dev.273+g2a708f8 (935) 163MB classic`
I was trying to debug an `i386` snap build failure just now, and wanted to launch a VM to fiddle around in. ~~On my `amd64` machine I can run `i386` images (and some `arm64` machines can run `armhf` similarly).~~ (Ignore that bit, it's semi-nonsense (it's relevant for containers) - any foreign arch should work if there's qemu support for it.) But multipass doesn't show me non-host-arch images:
```
laney@raleigh> multipass find
Image Aliases Version Description
snapcraft:core core16 20190629 Snapcraft builder for Core 16
snapcraft:core18 20190629 Snapcraft builder for Core 18
core core16 20190424 Ubuntu Core 16
core18 20190213 Ubuntu Core 18
16.04 xenial 20190628 Ubuntu 16.04 LTS
18.04 bionic,lts 20190627.1 Ubuntu 18.04 LTS
18.10 cosmic 20190628 Ubuntu 18.10
19.04 disco 20190628 Ubuntu 19.04
daily:19.10 devel,eoan 20190704 Ubuntu 19.10
```
and there's no `--arch` option hidden away in `multipass launch --help` either.
Taking inspiration from LXD. I'm thinking that if I could do `multipass launch bionic/i386`, that'd be sweet.
I'm going to be filing a similar request to snapcraft to allow something like `snapcraft --arch=i386` to work. I don't know how snapcraft invokes multipass (sorry), but ideally it'd be possible for snapcraft to request instances for other arches once this issue is solved too.
Contributor guide
Research direction
Start at the image selection behind `multipass find` and the option handling exposed by `multipass launch --help`; trace how architecture is selected and where qemu support is considered. Done means a foreign-architecture image such as `bionic/i386` can be requested and launched when qemu supports it, with the behavior usable by snapcraft.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- infrastructure, operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100