当前位置:网站首页>Multipass Chinese document - remote use of multipass

Multipass Chinese document - remote use of multipass

2022-06-26 04:41:00 But the teacher

General catalogue ( To be translated and perfected )

1. overview

2. course

3. Directions for use

   3.1 install Multipass

     3.1.1 be based on Linux

     3.1.2 be based on macOS

     3.1.3 be based on Windows

   3.2 Manage instances

     3.2.1 Create examples

     3.2.2 Modify instance

     3.2.3 Using examples

     3.2.4 Use the instance command alias

     3.2.5 Share data with instances

     3.2.6 Remove instance

   3.3 management Multipass

     3.3.1 Set the drive

     3.3.2 Authorize the client to use Multipass service

     3.3.3 Remote use Multipass

     3.3.4 Improve mount performance

     3.3.5 Use Packer pack Multipass Mirror image

     3.3.6 Set image interface

     3.3.7 Use different macOS terminal

   3.4 Troubleshoot problems

     3.4.1 Connection log

     3.4.2 Network troubleshooting


How to use... Remotely Multipass

This document teaches how to use... Remotely Multipass. This could be useful , for example , If you want to put your VM Running on more powerful machines .

Content :


take Multipass Exposure to the Internet

When starting the process , Pass on --address go in , take Multipass Exposure to your network :

$ multipass --help
#...
 --address <server_name:port>  	specifies which address to
								use for the multipassd
								service; a socket can be
								specified using
								unix:<socket_file> 

The client can receive MULTIPASS_SERVER_ADDRESS environment variable , To override the default :

https://github.com/canonical/multipass/blob/a1ea65fb63184fc778e277d3c9e2920ef2a9fb3d/src/client/common/client_common.cpp#L171-L173
$ MULTIPASS_SERVER_ADDRESS=<hostname>:51001 multipass find
Image 	Aliases 	Version 	Description
...
21.10 	impish 		20220118 	Ubuntu 21.10

️ Warning :

  • Because it is run by authorized users , It is recommended to use Multipass 1.9.0, use client authentication( Client Authorization ), So you need to explicitly allow clients to connect using shared passphrases . Another alternative is , adopt multipass set local.privileged-mounts=false Unmount features together .
  • Some orders (shell, exec, mount) Today, it depends on the direct network connection between the client and the instance , To make these available , You need to make sure that the routing between them is available .

Modify process settings

Linux

You can execute systemctl edit snap.multipass.multipassd.service, Replace the contents in the following lines ( take <hostname> Replace with the one you need to monitor hostname< Host name > or IP):

[Service]
ExecStart=
ExecStart=/usr/bin/snap run multipass.multipassd --address <hostname>:51005

Then restart the service :

$ snap stop multipass
$ snap start multipass

macOS

stay macOS You need to add it to the service name (service definition)( alike , Replace <hostname>) And restart :

$ sudo /usr/libexec/PlistBuddy  \
  -c "Add :ProgramArguments: string --address" \
  -c "Add :ProgramArguments: string <hostname>:51001" \
  /Library/LaunchDaemons/com.canonical.multipassd.plist
$ sudo launchctl unload /Library/LaunchDaemons/com.canonical.multipassd.plist
$ sudo launchctl load /Library/LaunchDaemons/com.canonical.multipassd.plist

Particular attention : reinstall / Upgrading will overwrite these changes


Windows

stay Windows On , You need to / Recreate the service name (service definition), And it's not just a try ( If you want to do , Remember to pass /svc As the first parameter to multipassd.exe Binary , We used The local service <LocalService> Account )…

As a one-off event , After stopping the service , You can use... In the service window Start parameters (Start parameters) Field :
 Insert picture description here


Tell us how this works for you , What do you want to see in the back


Link to the original text

How to use Multipass remotely

原网站

版权声明
本文为[But the teacher]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/177/202206260435159517.html