当前位置:网站首页>Multipass Chinese document - setup driver
Multipass Chinese document - setup driver
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 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 set the driver
See also : Driver
This document teaches how to select , Set up and manage Multipass Background driver . Multipass There are already flexible default settings , So this is just an optional step .
Content :
Linux: Use libvirt
Multipass stay Linux The default is qemu drive . If in VM After starting , You want more control , You can also use the pilot phase libvirt drive . This section will teach you how to use .
install libvirt
Execute the following command to install libvirt:
# You need to use the same command according to your distribution
$ sudo apt install libvirt-daemon-system
Switch Multipass Drive to libvirt
See also : stop, local.driver
First , allow Multipass Use local libvirt:
# Connect to libvirt Interface / plug-in unit
$ snap connect multipass:libvirt
then , Switch Multipass Drive to libvirt, function :
# First you have to stop all instances
$ multipass stop --all
# And then let Multipass Use libvirt
$ sudo multipass set local.driver=libvirt
All your instances will be migrated and can be used directly .
️ You can still use
multipassAgent and tray chart (tray icon), And whatever you are libvirt All configuration changes made are permanent . Although they are not Multipass command ( for examplemultipas info) It shows that
Use libvirt see Multipass example
You can go through 2 Used in two ways libvirt Check out the examples , Use virshCLI Or is it virt-manager GUI
Use virshCLI, The instance needs to be started , And then execute virsh list( For command reference, see man virsh):
$ virsh list
ID Name State
-------------------------------
1 unaffected-gyrfalcon running
Another alternative , Use virt manager GUI,…
Switch back to the default drive
See also : stop, local.driver
Execute the following command to switch back to the default qemu drive :
# Stop all instances again
$ multipass stop --all
# Cut back qemu drive
$ sudo multipass set local.driver=qemu
This is also true. , Existing instances will be migrated .
️ This will make you lose your libvirt Any custom changes made on .
macOS: Use VirtualBox
Multipass stay Intel macOS The default is hyperkit drive , M1 macOS By default qemu drive . However , One option is to use VirtualBox.
Switch Multipass Drive to VirtualBox (macOS)
See also : stop, local.driver
Execute the following command to switch Multipass Drive to VirtualBox:
$ sudo multipass set local.driver=virtualbox
thereafter , All use multipass launch All instances started will be used in the background VirtualBox.
Use VirtualBox see Multipass example
Multipass Will root Identity running , So if you need to view VirtualBox Examples in , Or by VBoxManage command , You also need to get them to root Identity running . Run the following command to see VirtualBox Examples in :
$ sudo VirtualBox

also , If you need to list instances in the command line , perform :
$ sudo VBoxManage list vms
"primary" {
395d5300-557d-4640-a43a-48100b10e098}
️ You can still use
multipassAgent and system menu diagram (system menu icon), And whatever you are VirtualBox All configuration changes made are permanent . Although they are not Multipass command ( for examplemultipas info) It shows that
Use VirtualBox Set up Multipass Instance port forwarding
In order to expose the services running in the instance on your host , You can use VirtualBox Port forwarding rules , for example :
$ sudo VBoxManage controlvm "primary" natpf1 "myservice,tcp,,8080,,8081"
Then you can turn on , for example , [http://localhost:8081]/(http://localhost:8081), In the instance, the port 8080 The running service will be exposed .
Use VirtualBox Set up Multipass Instance network bridging
A subject of constant concern Multipass Point is network bridging . You can add a second network interface to the instance , And expose it to your physical network .
First , Stop instance :
$ multipass stop primary
Now find the network interface you want to bridge ( Find the character you want after the second colon ):
$ VBoxManage list bridgedifs | grep ^Name
Name: en0: Ethernet
Name: en1: Wi-Fi (AirPort)
Name: en2: Thunderbolt 1
Name: en3: Thunderbolt 2
...
Last , Give Way VirtualBox Use the second interface as " Parent " Use ( For more information on bridging, see VirtualBox Subject documents :
# Don't touch. --nic1, because Multipass Using it
$ sudo VBoxManage modifyvm primary --nic2 bridged --bridgeadapter2 en0
You can restart the instance again , Find the name of the new interface :
$ multipass start primary
$ multipass exec primary ip link | grep DOWN
3: enp0s8: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
And configure the new interface – Ubuntu Use netplan Handle :
$ multipass exec -- primary sudo bash -c "cat > /etc/netplan/60-bridge-yaml" <<EOF network: ehernets: enp0s8: # This is the interface name above dhcp4: true dhcp4-overrides: # It's a must route-metric: 200 # The default gateway is reserved for the first interface version: 2 EOF
$ multipass exec primary sudo netplan apply
Last , Find the example given to you by deer IP:
$ multipas exec primary ip address show dev enp0s8 up
3: enp0s8: mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 08:00:27:2a:5f:55 brd ff:ff:ff:ff:ff:ff
inet 10.2.0.39/24 brd 10.2.0.255 scope global dynamic enp0s8
valid_lft 86119sec preferred_lft 86119sec
inet6 fe80::a00:27ff:fe2a:5f55/64 scope link
valid_lft forever preferred_lft forever
Tasks in all instances should now be available through physical network paths http://<ip>/ Use
Switch back to the default drive
See also : stop, local.driver
If you want to switch back to the default driver , function :
$ sudo multipass set local.driver=hyperkit
Use VirtualBox The created instance cannot be transferred , But you can always come back and find them .
Windows: use VirtualBox
Multipass stay Windows The default is hyperv drive . However , If you want to ( Or must ), You can take Multipass Virtual machine monitor used (hypervisor) Replace with VirtualBox.
Install VirtualBox
If you haven't installed , Just install VirtualBox. You'll find that You need to run as an administrator VirtualBox Installation package .
Switch Multipass Drive to VirtualBox
See also : stop, local.driver
You can let Multipass Use it ( Administrator privileges are also required ):
PS> multipass set local.driver=virtualbox
thereafter , all multipass launch The started instance will be used in the background VirtualBox.
Use VirtualBox see Multipass example
Multipass Will System Identity running , So if you need to view VirtualBox Examples in , Or by VBoxManage command , You have to pass PsExec -s function . Download and unzip the download folder PSTools.zip, Then, in the administrator permission PowerShell, function :
PS> & $env:USERPROFILE\Downloads\PSTools\PsExec.exe -s -i $env:VBOX_MSI_INSTALL_PATH\VirtualBox.exe

List instances in the command line :
PS> & $env:USERPROFILE\Downloads\PSTools\PsExec.exe -s $env:VBOX_MSI_INSTALL_PATH\VBoxManage.exe list vms
"primary" {
05a04fa0-8caf-4c35-9d21-ceddfe031e6f}
️ You can still use
multipassAgent and system menu diagram (system menu icon), And whatever you are VirtualBox All configuration changes made are permanent . Although they are not Multipass command ( for examplemultipas info) It shows that
Use VirtualBox Set up Multipass Instance port forwarding
In order to expose the services running in the instance on your host , You can use VirtualBox Port forwarding rules , for example :
PS> & $env:USERPROFILE\Downloads\PSTools\PsExec.exe -s $env:VBOX_MSI_INSTALL_PATH\VBoxManage.exe controlvm "primary" natpf1 "myservice,tcp,,8080,,8081"
Then you can turn on , for example , [http://localhost:8081]/(http://localhost:8081), In the instance, the port 8080 The running service will be exposed .
Switch back to the default drive
See also : stop, local.driver
See also : stop, local.driver
If you want to switch back to the default driver :
PS> multipass set local.driver=hyperkit
Use VirtualBox The created instance cannot be transferred , But you can always come back and find them .
Link to the original text
边栏推荐
- 排序查询
- LeetCode 94. Middle order traversal of binary tree
- 08_ Spingboot integrated redis
- 修改Oracle连接数
- Composer version rollback version switching
- 基础查询
- Navicat connects the pit of shardingsphere sub table and sub library plug-ins
- 08_SpingBoot 集成Redis
- Laravel framework Alipay payment fails to receive asynchronous callback request [original]
- Oracle 数据泵导表
猜你喜欢

A new paradigm for large model application: unified feature representation optimization (UFO)
![PHP design function getmaxstr to find the longest symmetric string in a string - [original]](/img/45/d8dae9e605a2f411683db7a2d40d0b.jpg)
PHP design function getmaxstr to find the longest symmetric string in a string - [original]

Your requirements could not be resolved

1.11 learning summary

A method of quickly transplanting library function code to register code by single chip microcomputer
![Alipay failed to verify the signature (sandbox test indicates fishing risk?) [original]](/img/64/c3bb27a3711a6f0cc7b281d1a961af.jpg)
Alipay failed to verify the signature (sandbox test indicates fishing risk?) [original]

文件上传与安全狗

Database design (I)

2022.2.11

2.9 learning summary
随机推荐
JWT token authentication verification
Your requirements could not be resolved
Compiling and installing phpredis extension on MAC
Multipass中文文档-移除实例
CTF PHP audit bypasses filtering learning from topics
Dameng database backup and restore
Nabicat连接:本地Mysql&&云服务Mysql以及报错
1.13 learning summary
Nabicat connection: local MySQL & cloud service MySQL and error reporting
Install cenos in the virtual machine
Hash problem
Simple application of KMP
条件查询
Composer version rollback version switching
Oracle 数据泵导表
A method of quickly transplanting library function code to register code by single chip microcomputer
Mobile terminal pull-down loading pull-down loading data
Large numbers (C language)
Oracle 數據泵導錶
Basic query