Closed idroz closed 1 year ago
Oddly enough, seems to be working now. I'm not sure what's happening. Will keep this open in case it's reproducible.
When I ran this, it failed and deleted the ~/.macpine/lxd
directory, but the qemu-system-x86_64
process is running and listening on ports 8443
and 4022
. However, trying to SSH ssh -p 4022 root@localhost
hangs indefinitely. Definitely a bad error case. We should almost certainly kill -9 <pid>
before we os.RemoveAll(~/.macpine/<instance>)
in case the qemu
instance stayed alive despite the failure.
alpine launch --image alpine_3.16.0_lxd --name lxd --port 8443 --arch x86_64 --ssh 4022 --cpu 2 -d 4G -m 6144
alpine launch --port 8443 --arch x86_64 --ssh 4022 --cpu 2 -d 4G -m 6144
works perfectly so it's something about the lxd
image in combination with the parameters. Changing issue title to reflect
Yup - I narrowed it down to the image itself, which I've updated and can push.
Before doing that, I was thinking that since we have a very nice import/export utility, perhaps launch
should utilise that instead of simply downloading qcow2 files. It would also mean creating (and potentially exposing to the user) a way to import a macpine machine image from a URL, although will need to consider security implications.
Personally, I already have a set of use cases for a set of publically-hosted macpine machine images pre-configured with basics such as LXD, docker, etc.
What are your thoughts on this?
That sounds awesome. We'd effectively be recreating something like DockerHub but for macpine, where people could upload and share links to images with descriptions for various use cases (e.g. basic LXD configuration, base nginx+node.js webapp, local mysqld, etc).
The only concern is where the data is actually hosted- I assume we don't want to spin up hosting for arbitrary images. But it would be really nice to have a page where you could browse images and choose ones to download with macpine import --url <some url>
.
Perhaps if we could automate creating a GitHub gist on the command line, GitHub could provide the backing storage and a place for the description (gists have text accompanying them)?
We could add a confirmation to alpine import --url
, something like:
$ alpine import --url https://gist.github.com/maxzinkus/example-uuid
images imported from URLs are not checked for malicious code/configurations, continue? [y/N] y
downloading image from https://gist.github.com/maxzinkus/example-uuid ...
...
Nice -
I like this approach. Coupled with age
encryption I think this could work nicely.
I'll pick this up and work on it over the w/e
Either way, if we could have alpine publish --upload
and/or alpine upload
also post a published archive (using a gist backend or another -- pastebin?) in a way that we can index, that'd help create the DockerHub-like experience.
Moved new feature tracking to #144
Not to necro a closed issue, but I'm running into the same issue with the LXD image. Did that updated image every get published? any way to force it to pull the new image if thats the case?
I’ve got it sorted locally. Must have forgotten to push the updated image. Will be able to push it out tomorrow . Sorry about that!
@SteveMcGrath that's done. You should be able to launch the pre-baked lxd image with:
alpine launch --image alpine_3.16.0_lxd --name lxd --port 8443 --ssh 2222 --arch x86_64
and then set up LXD using instructions at https://beringresearch.github.io/macpine/lxd_macpine/
Deleted the cache and it fired up just fine. Thanks!
Describe the bug As above
To Reproduce Steps to reproduce the behavior:
alpine launch --image alpine_3.16.0_lxd --name lxd --port 8443 --arch x86_64 --ssh 23 --cpu 12 -d 20G -m 6144
Expected behaviour Able to launch and ssh into VM
May be related to #57