Difference between revisions of "Multipass launch"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
 
(48 intermediate revisions by 4 users not shown)
Line 1: Line 1:
The <code>[[multipass]] launch</code><ref>https://multipass.run/docs/launch-command</ref> command without any argument will create and start a new instance based on the default image, using a random generated name, you can configure it using <code>--name</code> option. As of August 2020 not renaming option is available<ref>https://github.com/canonical/multipass/issues/255</ref>.
+
{{lowercase}}
 
+
The <code>[[multipass]] launch</code><ref>https://multipass.run/docs/launch-command</ref> command without any argument will create and start a new instance based on the default image, using a random generated name, you can configure it using <code>--name</code> option. As of August 2020 no [[renaming]] option is available<ref>https://github.com/canonical/multipass/issues/255</ref>.
 
* https://multipass.run/docs/launch-command
 
* https://multipass.run/docs/launch-command
  
multipass launch --name ubuntu-vm
+
== Commands ==
launch failed: failed to download from 'http://cloud- images.ubuntu.com/releases/server/releases/bionic/release-20200129.1/ubuntu-18.04-server-cloudimg-amd64.img': Network timeout
+
* <code>[[multipass launch --help]]</code>
 
+
* <code>[[multipass launch --name]] TEST 23.10 && [[multipass connect]] TEST</code>
* <code>multipass launch [[lts]]</code>
+
* <code>[[multipass launch lts]]</code>
* <code> multipass launch [[lts]] --name TEST</code>
+
* <code> multipass launch [[lts]] --name MYTEST</code>
* <code> multipass launch [[20.10]]</code>
+
* <code>multipass launch [[jammy]]</code> or <code>[[multipass launch 22.04]]</code>
* <code>multipass launch groovy</code>
+
* <code> multipass launch --[[cpus]] 2 --memory 8G [[--disk]] 25G --name MYNEWVM && [[multipass connect]] MY_NEW_VM</code>
* <code> multipass launch --[[cpus]] 2 --mem 8G --disk 25G --name MY_NEW_VM && [[multipass connect]] MY_NEW_VM</code>
+
* <code> multipass launch --[[cpus]] 2 --memory 8G --disk 25G --name MYNEWVM</code>
* <code> multipass launch --[[cpus]] 2 --mem 8G --disk 25G --name MY_NEW_VM</code>
+
* <code> multipass launch --[[cpus]] 2 --memory 8G --name MYNEWVM</code>
* <code> multipass launch --[[cpus]] 2 --mem 8G --name MY_NEW_VM</code>
+
* <code> multipass launch --[[cpus]] 2 --name MYNEWVM</code>
* <code> multipass launch --[[cpus]] 2 --name MY_NEW_VM</code>
+
* <code> [[multipass launch --name]] MYNEWVM 22.10</code>
* <code> multipass launch --name MY_NEW_VM 20.04</code>
 
  
 
* <code> multipass launch --name ubuntu-lts-custom --[[cloud-init]] cloud-config.yaml</code>
 
* <code> multipass launch --name ubuntu-lts-custom --[[cloud-init]] cloud-config.yaml</code>
 
   
 
   
 
+
To find available images execute: <code>[[multipass find]]</code>
* To find available images: <code>[[multipass find]]</code>
 
  
 
== Examples ==
 
== Examples ==
  [[multipass launch]] groovy
+
  [[multipass launch]] [[impish]]
  Launched: [[open-kit]]
+
  Launched: my-open-kit
  
  multipass launch [[20.10]] --name my_VM
+
  multipass launch [[21.10]] --name my_VM
 +
Retrieving [[image]]: 6%
 +
Verifying image:  \
 +
Starting /
 +
Waiting for initialization to complete -
 
  Launched: my_VM
 
  Launched: my_VM
  
It will create a 5GB Ubuntu machine with 1 CPU and 1 GB memory
+
It will create a 5GB [[Ubuntu]] machine with 1 CPU and 1 GB memory
  
== --help ==
+
* <code>[[multipass launch --help]]</code>
  
multipass launch --help
+
* <code>[[multipass launch minikube]]</code>
Usage: multipass launch [options] [[<remote:>]<image> | <url>]
 
Create and start a new instance.
 
 
Options:
 
  -h, --help          Display this help
 
  -v, --verbose        Increase logging verbosity. Repeat the 'v' in the short
 
                        option for more detail. Maximum verbosity is obtained
 
                        with 4 (or more) v's, i.e. -vvvv.
 
  -c, --cpus <cpus>    Number of CPUs to allocate.
 
                        Minimum: 1, default: 1.
 
  -d, --disk <disk>    Disk space to allocate. Positive integers, in bytes, or
 
                        with K, M, G suffix.
 
                        Minimum: 512M, default: 5G.
 
  -m, --mem <mem>      Amount of memory to allocate. Positive integers, in
 
                        bytes, or with K, M, G suffix.
 
                        Minimum: 128M, default: 1G.
 
  -n, --name <name>   Name for the instance. If it is 'primary' (the
 
                        configured primary instance name), the user's home
 
                        directory is mounted inside the newly launched instance,
 
                        in 'Home'.
 
  [[--cloud-init]] <file>  Path to a user-data cloud-init configuration, or '-' for
 
                        stdin
 
 
Arguments:
 
  image                Optional image to launch. If omitted, then the default
 
                        Ubuntu LTS will be used.
 
                      <remote> can be either ‘release’ or ‘daily‘. If <remote>
 
                      is omitted, ‘release’ will be used.
 
                      <image> can be a partial image hash or an Ubuntu release
 
                      version, codename or alias.
 
                      <url> is a custom image URL that is in http://, https://,
 
                      or file:// format.
 
  
== With errors ==
+
== Examples with errors ==
 
  multipass launch [[lts]]
 
  multipass launch [[lts]]
 
  launch failed: The following errors occurred:
 
  launch failed: The following errors occurred:
Line 73: Line 43:
 
  multipass launch
 
  multipass launch
 
  launch failed: CPU does not support [[KVM extensions]].
 
  launch failed: CPU does not support [[KVM extensions]].
 +
 +
multipass launch
 +
launch failed: [[Downloaded image hash does not match]]
 +
 +
Solution: review <code>[[/Library/Logs/Multipass/multipassd.log]]</code>
  
 
  Under macOS multipass or VMware VMs.
 
  Under macOS multipass or VMware VMs.
  
 +
multipass launch
 +
[[launch failed: cannot connect to the multipass socket]]
 +
Please ensure multipassd is running and '[[/var/snap/]]multipass/common/multipass_socket' is accessible
 +
 +
multipass launch [[21.10]]
 +
launch failed: Operation canceled
  
  multipass launch
+
  multipass launch -n myfedora https://download.fedoraproject.org/pub/fedora/linux/releases/31/Cloud/x86_64/images/Fedora-Cloud-Base-31-1.9.x86_64.raw.xz
  launch failed: cannot connect to the multipass socket
+
  launch failed: http and file based images are not supported
Please ensure multipassd is running and '/var/snap/multipass/common/multipass_socket' is accessible
 
  
 
== Related commands ==
 
== Related commands ==
Line 85: Line 65:
 
* <code>[[multipass list]]</code>
 
* <code>[[multipass list]]</code>
 
* <code>[[multipass connect]]</code>
 
* <code>[[multipass connect]]</code>
 +
* <code>[[multipass start]]</code>
 
* <code>[[multipass delete]] VM_NAME --purge</code> or <code>[[multipass purge]]</code>
 
* <code>[[multipass delete]] VM_NAME --purge</code> or <code>[[multipass purge]]</code>
 
* <code>[[virtinst]]</code>: <code>[[virt-install]]</code>
 
* <code>[[virtinst]]</code>: <code>[[virt-install]]</code>
Line 93: Line 74:
  
 
== See also ==
 
== See also ==
 +
* {{multipass launch}}
 +
* {{multipass cmd}}
 
* {{multipass}}
 
* {{multipass}}
* {{Ubuntu}}
 
 
  
 
[[Category:Virtualization]]
 
[[Category:Virtualization]]

Latest revision as of 18:17, 30 May 2024

The multipass launch[1] command without any argument will create and start a new instance based on the default image, using a random generated name, you can configure it using --name option. As of August 2020 no renaming option is available[2].

Commands[edit]

  • multipass launch --name ubuntu-lts-custom --cloud-init cloud-config.yaml

To find available images execute: multipass find

Examples[edit]

multipass launch impish
Launched: my-open-kit
multipass launch 21.10 --name my_VM
Retrieving image: 6%
Verifying image:  \
Starting /
Waiting for initialization to complete -
Launched: my_VM

It will create a 5GB Ubuntu machine with 1 CPU and 1 GB memory

Examples with errors[edit]

multipass launch lts
launch failed: The following errors occurred:
Instance stopped while starting
multipass launch
launch failed: CPU does not support KVM extensions.

multipass launch
launch failed: Downloaded image hash does not match

Solution: review /Library/Logs/Multipass/multipassd.log
Under macOS multipass or VMware VMs.
multipass launch
launch failed: cannot connect to the multipass socket
Please ensure multipassd is running and '/var/snap/multipass/common/multipass_socket' is accessible
multipass launch 21.10
launch failed: Operation canceled
multipass launch -n myfedora https://download.fedoraproject.org/pub/fedora/linux/releases/31/Cloud/x86_64/images/Fedora-Cloud-Base-31-1.9.x86_64.raw.xz
launch failed: http and file based images are not supported

Related commands[edit]

See also[edit]

  • https://multipass.run/docs/launch-command
  • https://github.com/canonical/multipass/issues/255
  • Advertising: