vagrant-vbguest安装后vagrant 启动失败

来源:6-5 部署一个复杂的投票应用

qq_罗_1

2020-11-26

老师。您好,有一个问题麻烦你,我安装了vagrant-vbguest,启动后报错,是因为 共享盘的问题,但是我依旧解决不了,请老师帮忙,我的环境是windows10
Bringing machine ‘default’ up with ‘virtualbox’ provider…
==> default: Importing base box ‘centos7’…
==> default: Matching MAC address for NAT networking…
==> default: Setting the name of the VM: vmx_default_1606354252356_9984
==> default: Clearing any previously set network interfaces…
==> default: Preparing network interfaces based on configuration…
default: Adapter 1: nat
==> default: Forwarding ports…
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM…
==> default: Waiting for machine to boot. This may take a few minutes…
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection reset. Retrying…
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest…
default: Removing insecure key from the guest if it’s present…
default: Key inserted! Disconnecting and reconnecting using new SSH key…
==> default: Machine booted and ready!
[default] No Virtualbox Guest Additions installation found.
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: mirrors.cn99.com
  • extras: ftp.sjtu.edu.cn
  • updates: mirrors.cn99.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.0.el7.centos will be an update
    –> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size

Updating:
centos-release x86_64 7-9.2009.0.el7.centos base 27 k

Transaction Summary

Upgrade 1 Package

Total download size: 27 k
Downloading packages:
No Presto metadata available for base
Public key for centos-release-7-9.2009.0.el7.centos.x86_64.rpm is not installed
warning: /var/cache/yum/x86_64/7/base/packages/centos-release-7-9.2009.0.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.0.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.0.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.0.el7.centos

Complete!
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: mirrors.cn99.com
  • extras: ftp.sjtu.edu.cn
  • updates: mirrors.cn99.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
    ==> default: Checking for guest additions in VM…
    default: No guest additions were detected on the base box for this VM! Guest
    default: additions are required for forwarded ports, shared folders, host only
    default: networking, and more. If SSH fails on this machine, please install
    default: the guest additions and repackage the box to continue.
    default:
    default: This is not an error message; everything may continue to work properly,
    default: 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

E:\vmx>vagrant plugin list
vagrant-scp (0.5.7, global)
vagrant-vbguest (0.28.0, global)

E:\vmx>vagrant plugin install vagrant-vbguest
Installing the ‘vagrant-vbguest’ plugin. This can take a few minutes…
Installed the plugin ‘vagrant-vbguest (0.28.0)’!

E:\vmx>

启动后是这个报错
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

写回答

3回答

麦兜搞IT

2020-11-26

您好,建议你别用共享盘了,这个很容易出问题。您可以试试vagrant-scp,这个往vagrant里面复制文件非常方便

 $ vagrant plugin list
vagrant-scp (0.5.7, global)
  - Version Constraint: > 0
vagrant-vbguest (0.24.0, global)


2
1
qq_罗_1
非常感谢!
2020-11-26
共1条回复

qq_罗_1

提问者

2020-11-27

老师你好解决了,是版本问题

0
1
mmm拇
你好,请问你是更新了什么版本解决的问题呢?
2020-12-10
共1条回复

麦兜搞IT

2020-11-26

https://github.com/invernizzi/vagrant-scp

0
0

系统学习Docker 践行DevOps理念

无论你是开发、测试还是运维,Docker都是你的必备技能。

3297 学习 · 1895 问题

查看课程