{"id":16018,"date":"2021-03-25T16:47:31","date_gmt":"2021-03-25T15:47:31","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/working-with-multipass-a-vm-manager\/"},"modified":"2021-03-25T16:47:31","modified_gmt":"2021-03-25T15:47:31","slug":"working-with-multipass-a-vm-manager","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/working-with-multipass-a-vm-manager\/","title":{"rendered":"Working with multipass, a VM manager"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>What if you need quickly to launch virtual machine instances running Ubuntu for development and testing purposes.<br \/>\nMultipass from Canonical can be the right tool for this. You can even customize the instances during launch by using Cloud-init in order to simulate a small cloud deployment from your laptop or desktop.<br \/>\nSo, in this short blog post, I will talk about this tool and demonstrate how easy it is to use it.<br \/>\n<!--more--><\/p>\n<h2>Introduction<\/h2>\n<p>Multipass is a lightweight Virtual Machines Manager (VMs) and can be the ideal way for launching VM&#8217;s for developers.<br \/>\nIt can be installed either on Linux, MacOs or Windows.<br \/>\nMultipass use KVM on linux, Hyperkit on MacOs and Hyper-V on Windows and supports metadata for cloud-init.<br \/>\nIt allows you to launch a fresh Ubuntu environment with a single command and it is also possible to simulate a small cloud deployment.<\/p>\n<h2>Installation<\/h2>\n<p>I&#8217;m going now to show you how to install multipass locally on my MacBook but you can also install the tool on Windows or on Linux.<br \/>\nYou have 2 options to achieve this. brew (https:\/\/brew.sh\/), the package manager or the mac installer.<br \/>\nAs brew is already installed, let&#8217;s do it with brew.<br \/>\n<code>(\u2388 |docker-desktop:default)sme@Said-MacBook-Pro-3 K8S % <span style=\"color: orange\">brew install --cask multipass<\/span><br \/>\nUpdating Homebrew...<br \/>\n==&gt; Auto-updated Homebrew!<br \/>\nUpdated 1 tap (homebrew\/core).<br \/>\n==&gt; Updated Formulae<br \/>\nUpdated 1 formula.<br \/>\n==&gt; Downloading https:\/\/github.com\/CanonicalLtd\/multipass\/releases\/download\/v1.6.2\/multipass-1.6.2+mac-Darwin.pkg<br \/>\nAlready downloaded: \/Users\/sme\/Library\/Caches\/Homebrew\/downloads\/64f65f71508526f4215f89bec1a12bbc130d408d2bd22f9460fc792fe5aa09f6--multipass-1.6.2+mac-Darwin.pkg<br \/>\n==&gt; Installing Cask multipass<br \/>\n==&gt; Running installer for multipass; your password may be necessary.<br \/>\nPackage installers may write to any location; options such as `--appdir` are ignored.<br \/>\nPassword:<br \/>\ninstaller: Package name is multipass<br \/>\ninstaller: Installing at base path \/<br \/>\ninstaller: The install was successful.<br \/>\n&#x1f37a; multipass was successfully installed!<\/code><br \/>\nLet&#8217;s check the Version<br \/>\n<code>(\u2388 |docker-desktop:default)sme@Said-MacBook-Pro-3 ~ %<span style=\"color: orange\"> multipass version<\/span><br \/>\nmultipass  1.6.2+mac<\/code><\/p>\n<h2>Environment setup<\/h2>\n<p>To provision and customize the virtual machines to simulate a small cloud deployment, I will use &#8220;cloud-init&#8221; from Canonical<br \/>\nLet&#8217;s create the 3 VMs.<br \/>\n<code>((\u2388 |docker-desktop:default)sme@Said-MacBook-Pro-3 K8S % <span style=\"color: orange\">curl https:\/\/raw.githubusercontent.com\/tigera\/ccol1\/main\/control-init.yaml | multipass launch -n control -m 2048M 20.04 --cloud-init -<\/span><br \/>\n% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current<br \/>\nDload  Upload   Total   Spent    Left  Speed<br \/>\n100  6325  100  6325    0     0  11115      0 --:--:-- --:--:-- --:--:-- 11115<br \/>\nLaunched: control<br \/>\n(\u2388 |docker-desktop:default)sme@Said-MacBook-Pro-3 K8S % <span style=\"color: orange\">curl https:\/\/raw.githubusercontent.com\/tigera\/ccol1\/main\/node1-init.yaml | multipass launch -n node1 20.04 --cloud-init -<\/span><br \/>\n% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current<br \/>\nDload  Upload   Total   Spent    Left  Speed<br \/>\n100  6481  100  6481    0     0  13789      0 --:--:-- --:--:-- --:--:-- 13760<br \/>\nLaunched: node1<br \/>\n(\u2388 |docker-desktop:default)sme@Said-MacBook-Pro-3 K8S % <span style=\"color: orange\">curl https:\/\/raw.githubusercontent.com\/tigera\/ccol1\/main\/node2-init.yaml | multipass launch -n node2 20.04 --cloud-init -<\/span><br \/>\n% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current<br \/>\nDload  Upload   Total   Spent    Left  Speed<br \/>\n100  6481  100  6481    0     0  12487      0 --:--:-- --:--:-- --:--:-- 12463<br \/>\nLaunched: node2<\/code><br \/>\nDepending on which platform you are, you may need to start the VMs after they have been launched.<br \/>\nOn my desktop, they were all running.<br \/>\n<code>(\u2388 |docker-desktop:default)sme@Said-MacBook-Pro-3 K8S % <span style=\"color: orange\">multipass list<\/span><br \/>\nName                    State             IPv4             Image<br \/>\ncontrol                 Running           198.19.0.1       Ubuntu 20.04 LTS<br \/>\nnode1                   Running           198.19.0.2       Ubuntu 20.04 LTS<br \/>\nnode2                   Running           198.19.0.3       Ubuntu 20.04 LTS<\/code><br \/>\notherwise start them as following:<br \/>\n<code>(\u2388 |docker-desktop:default)sme@Said-MacBook-Pro-3 K8S % <span style=\"color: orange\">multipass start --all<\/span><\/code><code><\/code><br \/>\nTo check and validate if the deployment was successful, log on the first VM and run<br \/>\n<code>ubuntu@control:~$ <span style=\"color: orange\">kubectl get nodes<\/span><br \/>\nNAME STATUS ROLES AGE VERSION<br \/>\nnode1 NotReady 5m12s v1.19.3<br \/>\nnode2 NotReady 6m33s v1.19.3<br \/>\ncontrol NotReady master 3m12s v1.19.3<\/code><br \/>\nAs you can notice above, the status is &#8220;NotReady&#8221; and this is because the CNI (Container Nerwork Interface) plugin is not installed.<\/p>\n<h2>Conclusion<\/h2>\n<p>That&#8217;s all you have to do to install Multipass VM manager and deploy Virtual Machines.<br \/>\nWith this tool you can rapidly test your latest developments, so give this tool a chance. In a next blog, I will use this environment and show how to install &#8220;Calico&#8221;, one of the most famous CNI.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction What if you need quickly to launch virtual machine instances running Ubuntu for development and testing purposes. Multipass from Canonical can be the right tool for this. You can even customize the instances during launch by using Cloud-init in order to simulate a small cloud deployment from your laptop or desktop. So, in this [&hellip;]<\/p>\n","protected":false},"author":28,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[955,368],"tags":[2307],"type_dbi":[],"class_list":["post-16018","post","type-post","status-publish","format-standard","hentry","category-cloud","category-development-performance","tag-multipass-vm-ubuntu-virtual-machine"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Working with multipass, a VM manager - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/working-with-multipass-a-vm-manager\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Working with multipass, a VM manager\" \/>\n<meta property=\"og:description\" content=\"Introduction What if you need quickly to launch virtual machine instances running Ubuntu for development and testing purposes. Multipass from Canonical can be the right tool for this. You can even customize the instances during launch by using Cloud-init in order to simulate a small cloud deployment from your laptop or desktop. So, in this [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/working-with-multipass-a-vm-manager\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-25T15:47:31+00:00\" \/>\n<meta name=\"author\" content=\"Open source Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Open source Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/working-with-multipass-a-vm-manager\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/working-with-multipass-a-vm-manager\/\"},\"author\":{\"name\":\"Open source Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/59554f0d99383431eb6ed427e338952b\"},\"headline\":\"Working with multipass, a VM manager\",\"datePublished\":\"2021-03-25T15:47:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/working-with-multipass-a-vm-manager\/\"},\"wordCount\":360,\"commentCount\":0,\"keywords\":[\"multipass VM ubuntu virtual machine\"],\"articleSection\":[\"Cloud\",\"Development &amp; Performance\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/working-with-multipass-a-vm-manager\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/working-with-multipass-a-vm-manager\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/working-with-multipass-a-vm-manager\/\",\"name\":\"Working with multipass, a VM manager - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2021-03-25T15:47:31+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/59554f0d99383431eb6ed427e338952b\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/working-with-multipass-a-vm-manager\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/working-with-multipass-a-vm-manager\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/working-with-multipass-a-vm-manager\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Working with multipass, a VM manager\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/59554f0d99383431eb6ed427e338952b\",\"name\":\"Open source Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g\",\"caption\":\"Open source Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/open-source-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Working with multipass, a VM manager - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/working-with-multipass-a-vm-manager\/","og_locale":"en_US","og_type":"article","og_title":"Working with multipass, a VM manager","og_description":"Introduction What if you need quickly to launch virtual machine instances running Ubuntu for development and testing purposes. Multipass from Canonical can be the right tool for this. You can even customize the instances during launch by using Cloud-init in order to simulate a small cloud deployment from your laptop or desktop. So, in this [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/working-with-multipass-a-vm-manager\/","og_site_name":"dbi Blog","article_published_time":"2021-03-25T15:47:31+00:00","author":"Open source Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Open source Team","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/working-with-multipass-a-vm-manager\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/working-with-multipass-a-vm-manager\/"},"author":{"name":"Open source Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/59554f0d99383431eb6ed427e338952b"},"headline":"Working with multipass, a VM manager","datePublished":"2021-03-25T15:47:31+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/working-with-multipass-a-vm-manager\/"},"wordCount":360,"commentCount":0,"keywords":["multipass VM ubuntu virtual machine"],"articleSection":["Cloud","Development &amp; Performance"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/working-with-multipass-a-vm-manager\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/working-with-multipass-a-vm-manager\/","url":"https:\/\/www.dbi-services.com\/blog\/working-with-multipass-a-vm-manager\/","name":"Working with multipass, a VM manager - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2021-03-25T15:47:31+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/59554f0d99383431eb6ed427e338952b"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/working-with-multipass-a-vm-manager\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/working-with-multipass-a-vm-manager\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/working-with-multipass-a-vm-manager\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Working with multipass, a VM manager"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/59554f0d99383431eb6ed427e338952b","name":"Open source Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g","caption":"Open source Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/open-source-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/16018","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=16018"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/16018\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=16018"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=16018"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=16018"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=16018"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}