Difference between revisions of "Multipass launch"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
Tags: Mobile web edit, Mobile edit
Line 31: Line 31:
  
 
== --help ==
 
== --help ==
<pre>
 
multipass launch --help
 
Usage: multipass launch [options] [[<remote:>]<image> | <url>]
 
Create and start a new instance.
 
  
Options:
+
multipass launch --help
  -h, --help          Display this help
+
Usage: multipass launch [options] [[<remote:>]<image> | <url>]
  -v, --verbose        Increase logging verbosity. Repeat the 'v' in the short
+
Create and start a new instance.
                      option for more detail. Maximum verbosity is obtained
+
                      with 4 (or more) v's, i.e. -vvvv.
+
Options:
  -c, --cpus <cpus>    Number of CPUs to allocate.
+
  -h, --help          Display this help
                      Minimum: 1, default: 1.
+
  -v, --verbose        Increase logging verbosity. Repeat the 'v' in the short
  -d, --disk <disk>    Disk space to allocate. Positive integers, in bytes, or
+
                        option for more detail. Maximum verbosity is obtained
                      with K, M, G suffix.
+
                        with 4 (or more) v's, i.e. -vvvv.
                      Minimum: 512M, default: 5G.
+
  -c, --cpus <cpus>    Number of CPUs to allocate.
  -m, --mem <mem>      Amount of memory to allocate. Positive integers, in
+
                        Minimum: 1, default: 1.
                      bytes, or with K, M, G suffix.
+
  -d, --disk <disk>    Disk space to allocate. Positive integers, in bytes, or
                      Minimum: 128M, default: 1G.
+
                        with K, M, G suffix.
  -n, --name <name>    Name for the instance. If it is 'primary' (the
+
                        Minimum: 512M, default: 5G.
                      configured primary instance name), the user's home
+
  -m, --mem <mem>      Amount of memory to allocate. Positive integers, in
                      directory is mounted inside the newly launched instance,
+
                        bytes, or with K, M, G suffix.
                      in 'Home'.
+
                        Minimum: 128M, default: 1G.
  --cloud-init <file>  Path to a user-data cloud-init configuration, or '-' for
+
  -n, --name <name>    Name for the instance. If it is 'primary' (the
                      stdin
+
                        configured primary instance name), the user's home
 
+
                        directory is mounted inside the newly launched instance,
Arguments:
+
                        in 'Home'.
  image                Optional image to launch. If omitted, then the default
+
  --cloud-init <file>  Path to a user-data cloud-init configuration, or '-' for
                      Ubuntu LTS will be used.
+
                        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>
 
                       <remote> can be either ‘release’ or ‘daily‘. If <remote>
 
                       is omitted, ‘release’ will be used.
 
                       is omitted, ‘release’ will be used.
Line 65: Line 65:
 
                       <url> is a custom image URL that is in http://, https://,
 
                       <url> is a custom image URL that is in http://, https://,
 
                       or file:// format.
 
                       or file:// format.
</pre>
 
  
 
== With errors ==
 
== With errors ==

Revision as of 07:06, 10 April 2021

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 not renaming option is available[2].

multipass launch --name ubuntu-vm
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
  • multipass launch lts
  • multipass launch lts --name TEST
  • multipass launch 20.10
  • multipass launch groovy
  • multipass launch --cpus 2 --mem 8G --disk 25G --name MY_NEW_VM && multipass connect MY_NEW_VM
  • multipass launch --cpus 2 --mem 8G --disk 25G --name MY_NEW_VM
  • multipass launch --cpus 2 --mem 8G --name MY_NEW_VM
  • multipass launch --cpus 2 --name MY_NEW_VM
  • multipass launch --name MY_NEW_VM 20.04
  • multipass launch --name ubuntu-lts-custom --cloud-init cloud-config.yaml


Examples

multipass launch groovy
Launched: open-kit
multipass launch 20.10 --name my_VM
Launched: my_VM

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

--help

multipass launch --help
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

multipass launch lts
launch failed: The following errors occurred:
Instance stopped while starting
multipass launch
launch failed: CPU does not support KVM extensions.
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

Related commands

See also

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