Skip to content

Instantly share code, notes, and snippets.

@fffx
Created March 18, 2022 13:35
Show Gist options
  • Select an option

  • Save fffx/670bf74ca863c31bed072c19534a498c to your computer and use it in GitHub Desktop.

Select an option

Save fffx/670bf74ca863c31bed072c19534a498c to your computer and use it in GitHub Desktop.

Revisions

  1. fffx created this gist Mar 18, 2022.
    3 changes: 3 additions & 0 deletions .cloud-init.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    ssh_authorized_keys:
    - < your public key here>

    8 changes: 8 additions & 0 deletions cmd.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    # Lanuch vm with authorized_keys

    multipass launch --cloud-init ~/.cloud-init.yml --disk 10G



    # stop all
    multipass list | awk 'NR > 1 { print $1}' | xargs -I {} multipass stop {}