当前位置:网站首页>Multipass Chinese document - share data with instances

Multipass Chinese document - share data with instances

2022-06-26 04:40: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 Use Multipass Service authorization agent

     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 share data with instances

See also : Instance

This document shows how to share data between your hosts and instances . There are two ways to achieve , One is mount command , The other is transfer command .

Content :


Use mount command

See also :mount, umount

Between host and Multipass Sharing data between instances , Recommended mount command :

$ multipass mount $HOME keen-yak
$ multipass info keen-yak
...
Mounts:   /home/michal => /home/michal

From the start ,/home/michal Will be available within the instance .

You can also visualize the path in the instance to mount the local path :

$ multipass mount $HOME keen-yak:/some/path

Mounting can also be done in launch As one of the options in the command :

multipass launch --mount /some/local/path:/some/instance/path

Use umount Unhook the mounted path . You can use a specific path to unmount , You can also cancel all mounts at once without using the path :

$ multipass umount keen-yak
$ multipass info keen-yak
...
Mounts:   -- 

Use transfer command

You can also use transfer The command only copies files . If the file is in the instance , Add before path Instance name Prefix :

$ multipass transfer keen-yak:/etc/crontab keen-yak:/etc/fstab /home/michal
$ ls -l /home/michal/crontab /home/michal/fstab
-rw-r--r-- 1 michal michal 722 Oct 18 12:13 /home/michal/crontab
-rw-r--r-- 1 michal michal  82 Oct 18 12:13 /home/michal/fstab
$ multipass transfer /home/michal/crontab /home/michal/fstab keen-yak
$ multipass exec keen-yak -- ls -l crontab fstab
-rw-rw-r-- 1 ubuntu ubuntu 722 Oct 18 12:14 crontab
-rw-rw-r-- 1 ubuntu ubuntu  82 Oct 18 12:14 fstab

Link to the original text

How to share data with an instance

原网站

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