第四章 这两个环境是怎么起来的?vagrant up ? 我node 2 没起来?
来源:4-1 本章概述和实验环境介绍
siralop
2020-12-06
Windows PowerShell
版权所有 © Microsoft Corporation。保留所有权利。
尝试新的跨平台 PowerShell https://aka.ms/pscore6
PS C:\Users\tr-bu> cd E:\LearnAndWork\Learn\Docker_And_Kubernetes\Mooc_maiDouGaoIT_Docker_DevOps\ActualCombat\chapter4
PS E:\LearnAndWork\Learn\Docker_And_Kubernetes\Mooc_maiDouGaoIT_Docker_DevOps\ActualCombat\chapter4> vagrant plugin install vagrant-vbguest
Installing the ‘vagrant-vbguest’ plugin. This can take a few minutes…
Installed the plugin ‘vagrant-vbguest (0.28.0)’!
PS E:\LearnAndWork\Learn\Docker_And_Kubernetes\Mooc_maiDouGaoIT_Docker_DevOps\ActualCombat\chapter4> vagrant destroy && vagrant up
所在位置 行:1 字符: 17
- vagrant destroy && vagrant up
-
~~
标记“&&”不是此版本中的有效语句分隔符。
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : InvalidEndOfLine
PS E:\LearnAndWork\Learn\Docker_And_Kubernetes\Mooc_maiDouGaoIT_Docker_DevOps\ActualCombat\chapter4> vagrant destroy
==> docker-node2: VM not created. Moving on…
docker-node1: Are you sure you want to destroy the ‘docker-node1’ VM? [y/N] y
==> docker-node1: Destroying VM and associated drives…
PS E:\LearnAndWork\Learn\Docker_And_Kubernetes\Mooc_maiDouGaoIT_Docker_DevOps\ActualCombat\chapter4> vagrant up
Bringing machine ‘docker-node1’ up with ‘virtualbox’ provider…
Bringing machine ‘docker-node2’ up with ‘virtualbox’ provider…
==> docker-node1: Importing base box ‘centos/7’…
==> docker-node1: Matching MAC address for NAT networking…
==> docker-node1: Checking if box ‘centos/7’ version ‘2004.01’ is up to date…
==> docker-node1: Setting the name of the VM: chapter4_docker-node1_1607249248128_14262
==> docker-node1: Clearing any previously set network interfaces…
==> docker-node1: Preparing network interfaces based on configuration…
docker-node1: Adapter 1: nat
docker-node1: Adapter 2: hostonly
==> docker-node1: Forwarding ports…
docker-node1: 22 (guest) => 2222 (host) (adapter 1)
==> docker-node1: Running ‘pre-boot’ VM customizations…
==> docker-node1: Booting VM…
==> docker-node1: Waiting for machine to boot. This may take a few minutes…
docker-node1: SSH address: 127.0.0.1:2222
docker-node1: SSH username: vagrant
docker-node1: SSH auth method: private key
docker-node1:
docker-node1: Vagrant insecure key detected. Vagrant will automatically replace
docker-node1: this with a newly generated keypair for better security.
docker-node1:
docker-node1: Inserting generated public key within guest…
docker-node1: Removing insecure key from the guest if it’s present…
docker-node1: Key inserted! Disconnecting and reconnecting using new SSH key…
==> docker-node1: Machine booted and ready!
[docker-node1] No Virtualbox Guest Additions installation found.
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
- base: mirrors.163.com
- extras: mirrors.163.com
- updates: mirrors.163.com
Resolving Dependencies
–> Running transaction check
—> Package centos-release.x86_64 0:7-8.2003.0.el7.centos will be updated
—> Package centos-release.x86_64 0:7-9.2009.1.el7.centos will be an update
–> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
Updating:
centos-release x86_64 7-9.2009.1.el7.centos updates 27 k
Transaction Summary
Upgrade 1 Package
Total download size: 27 k
Downloading packages:
No Presto metadata available for updates
Public key for centos-release-7-9.2009.1.el7.centos.x86_64.rpm is not installed
warning: /var/cache/yum/x86_64/7/updates/packages/centos-release-7-9.2009.1.el7.centos.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Importing GPG key 0xF4A80EB5:
Userid : "CentOS-7 Key (CentOS 7 Official Signing Key) security@centos.org"
Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
Package : centos-release-7-8.2003.0.el7.centos.x86_64 (@anaconda)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : centos-release-7-9.2009.1.el7.centos.x86_64 1/2
Cleanup : centos-release-7-8.2003.0.el7.centos.x86_64 2/2
Verifying : centos-release-7-9.2009.1.el7.centos.x86_64 1/2
Verifying : centos-release-7-8.2003.0.el7.centos.x86_64 2/2
Updated:
centos-release.x86_64 0:7-9.2009.1.el7.centos
Complete!
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
- base: mirrors.163.com
- extras: mirrors.163.com
- updates: mirrors.163.com
No package kernel-devel-3.10.0-1127.el7.x86_64 available.
Error: Nothing to do
Unmounting Virtualbox Guest Additions ISO from: /mnt
umount: /mnt: not mounted
==> docker-node1: Checking for guest additions in VM…
docker-node1: No guest additions were detected on the base box for this VM! Guest
docker-node1: additions are required for forwarded ports, shared folders, host only
docker-node1: networking, and more. If SSH fails on this machine, please install
docker-node1: the guest additions and repackage the box to continue.
docker-node1:
docker-node1: This is not an error message; everything may continue to work properly,
docker-node1: in which case you may ignore this message.
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
umount /mnt
Stdout from the command:
Stderr from the command:
umount: /mnt: not mounted
PS E:\LearnAndWork\Learn\Docker_And_Kubernetes\Mooc_maiDouGaoIT_Docker_DevOps\ActualCombat\chapter4>
3回答
-
qq_慕丝0528892
2021-04-12
首先如果安装了vagrant-vbguest插件请卸载
vagrant plugin uninstall vagrant-vbguest
其次Vagrantfile文件删除这句话
config.vm.synced_folder "./labs", "/home/vagrant/labs"
就可以了
022021-04-12 -
麦兜搞IT
2020-12-08
实在不行可以先不用这个vagrantfile,自己快速使用vagrant初始化两台centos,然后使用我们这章lab文件夹里的setup.sh文件可以快速安装所需软件和docker。
vagrant只是个快速创建虚拟机的工具而已。
00 -
麦兜搞IT
2020-12-06
您好,在Vagrantfile里,把我下面标红的这一行删掉试试?
022020-12-08
相似问题