DEV Community

Anderson Gama
Anderson Gama

Posted on

1

Multipass + Cloud-Init

Multipass

Multipass is a mini-cloud on your workstation using native hypervisors of all the supported plaforms (Windows, macOS and Linux). Multipass can launch and run virtual machines and configure them with cloud-init like a public cloud.

Install Multipass

sudo snap install multipass --classic
Enter fullscreen mode Exit fullscreen mode

Debian in Multipass

echo '#cloud-config
write_files:
  - path: /etc/bash.bashrc
    content: |
      #powerline
      if [ -f /usr/bin/powerline-daemon ]; then
        powerline-daemon --quiet
        POWERLINE_BASH_CONTINUATION=1
        POWERLINE_BASH_SELECT=1
        . /usr/share/powerline/bindings/bash/powerline.sh
      fi
    append: true
runcmd:
 - apt install -y powerline' > cloud-config-debian.yaml
Enter fullscreen mode Exit fullscreen mode
mkdir -p $HOME/Multipass/Debian
wget -c https://cloud.debian.org/images/cloud/bullseye/daily/latest/debian-11-genericcloud-amd64-daily.qcow2 -O $HOME/Multipass/Debian/debian.qcow2
multipass launch --name debian file://$HOME/Multipass/Debian/debian.qcow2 --cloud-init cloud-config-debian.yaml
multipass list
multipass sh debian
Enter fullscreen mode Exit fullscreen mode

Rocky in Multipass

echo '#cloud-config
write_files:
  - path: /etc/dnf/dnf.conf
    content: |
      #fastest
      max_parallel_downloads=10
      fastestmirror=True
    append: true
write_files:
  - path: /etc/bashrc
    content: |
      #ohmyposh
      eval "$(oh-my-posh init bash --config /opt/themes/paradox.omp.json)"
    append: true
runcmd:
 - dnf config-manager --set-enabled crb
 - dnf install -y curl git wget zip
 - curl -s https://ohmyposh.dev/install.sh | bash -s -- -d /bin
 - mkdir -p /opt/themes
 - wget -c https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/paradox.omp.json -O /opt/themes/paradox.omp.json' > cloud-config-rocky.yaml
Enter fullscreen mode Exit fullscreen mode
mkdir -p $HOME/Multipass/Rocky
wget -c http://dl.rockylinux.org/pub/rocky/9/images/x86_64/Rocky-9-GenericCloud.latest.x86_64.qcow2 -O $HOME/Multipass/Rocky/rocky.qcow2
multipass launch --name rocky file://$HOME/Multipass/Rocky/rocky.qcow2 --cloud-init cloud-config-rocky.yaml
multipass list
multipass sh rocky
Enter fullscreen mode Exit fullscreen mode

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay