Skip to content

Instantly share code, notes, and snippets.

@vicyap
Last active December 28, 2023 22:19
Show Gist options
  • Save vicyap/56682bf591e86643272982e9a850140b to your computer and use it in GitHub Desktop.
Save vicyap/56682bf591e86643272982e9a850140b to your computer and use it in GitHub Desktop.
Setup lxd/lxc on MacOS with multipass
~ 17:47:44
❯ alias mp=multipass
~ 17:47:47
❯ mp launch -n lxd -c 2 -m 4G -d 40G
Launched: lxd
~ 21s 17:48:15
❯ mp shell lxd
Welcome to Ubuntu 20.04.4 LTS (GNU/Linux 5.4.0-120-generic aarch64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Sun Jul 3 17:48:21 CDT 2022
System load: 0.15
Usage of /: 3.3% of 38.60GB
Memory usage: 5%
Swap usage: 0%
Processes: 122
Users logged in: 0
IPv4 address for enp0s1: 192.168.64.7
IPv6 address for enp0s1: fd10:7b94:6d13:904f:5054:ff:fe70:74bf
0 updates can be applied immediately.
The list of available updates is more than a week old.
To check for new updates run: sudo apt update
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
ubuntu@lxd:~$ sudo lxd init --auto --trust-password password --network-address '[::]'
ubuntu@lxd:~$ exit
logout
~ 17:48:54
❯ lxc remote add default $(mp info lxd | grep IPv4 | awk '{print $2}') --password password --accept-certificate
Client certificate now trusted by server: default
~ 17:49:05
❯ lxc remote switch default
~ 17:49:11
❯ lxc launch ubuntu:focal my-test
Creating my-test
Starting my-test
@Clintonnkweke
Copy link

it worked

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