[root@localhost ~]# rpm -ivh https://releases.hashicorp.com/vagrant/2.2.5/vagrant_2.2.5_x86_64.rpm
Retrieving https://releases.hashicorp.com/vagrant/2.2.5/vagrant_2.2.5_x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:vagrant-1:2.2.5-1 ################################# [100%]
[root@localhost ~]# vagrant --version
Vagrant 2.2.5
[root@localhost ~]# vagrant box add centos/7 --provider=virtualbox
==> box: Loading metadata for box 'centos/7'
box: URL: https://vagrantcloud.com/centos/7
==> box: Adding box 'centos/7' (v1905.1) for provider: virtualbox
box: Downloading: https://vagrantcloud.com/centos/boxes/7/versions/1905.1/providers/virtualbox.box
==> box: Box download is resuming from prior download progress
box: Download redirected to host: cloud.centos.org
==> box: Successfully added box 'centos/7' (v1905.1) for 'virtualbox'!
[root@localhost ~]# yum install -y kernel-devel kernel-headers gcc make perl
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* epel: nrt.edge.kernel.org
* extras: centos.excellmedia.net
* updates: centos.excellmedia.net
Package 1:make-3.82-23.el7.x86_64 already installed and latest version
Package 4:perl-5.16.3-294.el7_6.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.8.5-36.el7_6.2 will be installed
--> Processing Dependency: cpp = 4.8.5-36.el7_6.2 for package: gcc-4.8.5-36.el7_6.2.x86_64
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-36.el7_6.2.x86_64
---> Package kernel-devel.x86_64 0:3.10.0-957.27.2.el7 will be installed
---> Package kernel-headers.x86_64 0:3.10.0-957.27.2.el7 will be installed
--> Running transaction check
---> Package cpp.x86_64 0:4.8.5-36.el7_6.2 will be installed
---> Package glibc-devel.x86_64 0:2.17-260.el7_6.6 will be installed
--> Processing Dependency: glibc-headers = 2.17-260.el7_6.6 for package: glibc-devel-2.17-260.el7_6.6.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-260.el7_6.6.x86_64
--> Running transaction check
---> Package glibc-headers.x86_64 0:2.17-260.el7_6.6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================
Package Arch Version Repository Size
=======================================================================================
Installing:
gcc x86_64 4.8.5-36.el7_6.2 updates 16 M
kernel-devel x86_64 3.10.0-957.27.2.el7 updates 17 M
kernel-headers x86_64 3.10.0-957.27.2.el7 updates 8.0 M
Installing for dependencies:
cpp x86_64 4.8.5-36.el7_6.2 updates 5.9 M
glibc-devel x86_64 2.17-260.el7_6.6 updates 1.1 M
glibc-headers x86_64 2.17-260.el7_6.6 updates 684 k
Transaction Summary
=======================================================================================
Install 3 Packages (+3 Dependent packages)
Total download size: 49 M
Installed size: 97 M
Downloading packages:
(1/6): glibc-devel-2.17-260.el7_6.6.x86_64.rpm | 1.1 MB 00:00:03
(2/6): cpp-4.8.5-36.el7_6.2.x86_64.rpm | 5.9 MB 00:00:03
(3/6): glibc-headers-2.17-260.el7_6.6.x86_64.rpm | 684 kB 00:00:06
(4/6): gcc-4.8.5-36.el7_6.2.x86_64.rpm | 16 MB 00:00:10
(5/6): kernel-headers-3.10.0-957.27.2.el7.x86_64.rpm | 8.0 MB 00:00:10
(6/6): kernel-devel-3.10.0-957.27.2.el7.x86_64.rpm | 17 MB 00:08:22
---------------------------------------------------------------------------------------
Total 99 kB/s | 49 MB 08:22
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : cpp-4.8.5-36.el7_6.2.x86_64 1/6
Installing : kernel-headers-3.10.0-957.27.2.el7.x86_64 2/6
Installing : glibc-headers-2.17-260.el7_6.6.x86_64 3/6
Installing : glibc-devel-2.17-260.el7_6.6.x86_64 4/6
Installing : gcc-4.8.5-36.el7_6.2.x86_64 5/6
Installing : kernel-devel-3.10.0-957.27.2.el7.x86_64 6/6
Verifying : glibc-devel-2.17-260.el7_6.6.x86_64 1/6
Verifying : kernel-headers-3.10.0-957.27.2.el7.x86_64 2/6
Verifying : cpp-4.8.5-36.el7_6.2.x86_64 3/6
Verifying : gcc-4.8.5-36.el7_6.2.x86_64 4/6
Verifying : glibc-headers-2.17-260.el7_6.6.x86_64 5/6
Verifying : kernel-devel-3.10.0-957.27.2.el7.x86_64 6/6
Installed:
gcc.x86_64 0:4.8.5-36.el7_6.2
kernel-devel.x86_64 0:3.10.0-957.27.2.el7
kernel-headers.x86_64 0:3.10.0-957.27.2.el7
Dependency Installed:
cpp.x86_64 0:4.8.5-36.el7_6.2 glibc-devel.x86_64 0:2.17-260.el7_6.6
glibc-headers.x86_64 0:2.17-260.el7_6.6
Complete!
[root@localhost ~]# yum install dkms kernel-devel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* epel: mirrors.aliyun.com
* extras: centos.excellmedia.net
* updates: centos.excellmedia.net
Package kernel-devel-3.10.0-957.27.2.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package dkms.noarch 0:2.7.1-1.el7 will be installed
--> Processing Dependency: elfutils-libelf-devel for package: dkms-2.7.1-1.el7.noarch
--> Running transaction check
---> Package elfutils-libelf-devel.x86_64 0:0.172-2.el7 will be installed
--> Processing Dependency: pkgconfig(zlib) for package: elfutils-libelf-devel-0.172-2.el7.x86_64
--> Running transaction check
---> Package zlib-devel.x86_64 0:1.2.7-18.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================
Package Arch Version Repository Size
=======================================================================================
Installing:
dkms noarch 2.7.1-1.el7 epel 75 k
Installing for dependencies:
elfutils-libelf-devel x86_64 0.172-2.el7 base 39 k
zlib-devel x86_64 1.2.7-18.el7 base 50 k
Transaction Summary
=======================================================================================
Install 1 Package (+2 Dependent packages)
Total download size: 164 k
Installed size: 383 k
Is this ok [y/d/N]: y
Downloading packages:
(1/3): elfutils-libelf-devel-0.172-2.el7.x86_64.rpm | 39 kB 00:00:00
(2/3): zlib-devel-1.2.7-18.el7.x86_64.rpm | 50 kB 00:00:00
(3/3): dkms-2.7.1-1.el7.noarch.rpm | 75 kB 00:00:01
---------------------------------------------------------------------------------------
Total 86 kB/s | 164 kB 00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : zlib-devel-1.2.7-18.el7.x86_64 1/3
Installing : elfutils-libelf-devel-0.172-2.el7.x86_64 2/3
Installing : dkms-2.7.1-1.el7.noarch 3/3
Verifying : elfutils-libelf-devel-0.172-2.el7.x86_64 1/3
Verifying : zlib-devel-1.2.7-18.el7.x86_64 2/3
Verifying : dkms-2.7.1-1.el7.noarch 3/3
Installed:
dkms.noarch 0:2.7.1-1.el7
Dependency Installed:
elfutils-libelf-devel.x86_64 0:0.172-2.el7 zlib-devel.x86_64 0:1.2.7-18.el7
Complete!
[root@localhost ~]# yum update
[root@localhost ~]#reboot
root@localhost ~]# service vboxdrv status
Redirecting to /bin/systemctl status vboxdrv.service
● vboxdrv.service - VirtualBox Linux kernel module
Loaded: loaded (/usr/lib/virtualbox/vboxdrv.sh; enabled; vendor preset: disabled)
Active: active (exited) since Fri 2019-08-30 09:49:08 IST; 19min ago
Process: 785 ExecStart=/usr/lib/virtualbox/vboxdrv.sh start (code=exited, status=0/SUCCESS)
Tasks: 0
Aug 30 09:48:57 localhost.localdomain systemd[1]: Starting VirtualBox Linux kernel ....
Aug 30 09:49:03 localhost.localdomain vboxdrv.sh[785]: vboxdrv.sh: Starting Virtual....
Aug 30 09:49:03 localhost.localdomain vboxdrv.sh[805]: Starting VirtualBox services.
Aug 30 09:49:05 localhost.localdomain vboxdrv.sh[824]: VirtualBox services started.
Aug 30 09:49:08 localhost.localdomain systemd[1]: Started VirtualBox Linux kernel m....
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost ~]#
[root@localhost ~]# vagrant ssh
ssh_exchange_identification: read: Connection reset by peer
root@localhost ~]# ssh 127.0.0.1
The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.
ECDSA key fingerprint is SHA256:m8YpYiq0v1ChLkZk74cRLvjYcNwbQaMMjGnVvdox/7U.
ECDSA key fingerprint is MD5:7a:50:34:05:30:55:60:58:77:33:80:ff:76:e9:f1:f3.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '127.0.0.1' (ECDSA) to the list of known hosts.
Last login: Fri Aug 30 12:30:38 2019
[root@localhost ~]# vagrant ssh
[vagrant@localhost ~]$
[root@localhost ~]# vagrant halt
==> default: Attempting graceful shutdown of VM...
default: Guest communication could not be established! This is usually because
default: SSH is not running, the authentication information was changed,
default: or some other networking issue. Vagrant will force halt, if
default: capable.
==> default: Forcing shutdown of VM...
[root@localhost ~]# vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'centos/7' version '1905.1' is up to date...
==> default: Clearing any previously set forwarded ports...
==> 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: 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.
==> default: Rsyncing folder: /root/ => /vagrant
Retrieving https://releases.hashicorp.com/vagrant/2.2.5/vagrant_2.2.5_x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:vagrant-1:2.2.5-1 ################################# [100%]
[root@localhost ~]# vagrant --version
Vagrant 2.2.5
[root@localhost ~]# vagrant box add centos/7 --provider=virtualbox
==> box: Loading metadata for box 'centos/7'
box: URL: https://vagrantcloud.com/centos/7
==> box: Adding box 'centos/7' (v1905.1) for provider: virtualbox
box: Downloading: https://vagrantcloud.com/centos/boxes/7/versions/1905.1/providers/virtualbox.box
==> box: Box download is resuming from prior download progress
box: Download redirected to host: cloud.centos.org
==> box: Successfully added box 'centos/7' (v1905.1) for 'virtualbox'!
[root@localhost ~]# yum install -y kernel-devel kernel-headers gcc make perl
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* epel: nrt.edge.kernel.org
* extras: centos.excellmedia.net
* updates: centos.excellmedia.net
Package 1:make-3.82-23.el7.x86_64 already installed and latest version
Package 4:perl-5.16.3-294.el7_6.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.8.5-36.el7_6.2 will be installed
--> Processing Dependency: cpp = 4.8.5-36.el7_6.2 for package: gcc-4.8.5-36.el7_6.2.x86_64
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.8.5-36.el7_6.2.x86_64
---> Package kernel-devel.x86_64 0:3.10.0-957.27.2.el7 will be installed
---> Package kernel-headers.x86_64 0:3.10.0-957.27.2.el7 will be installed
--> Running transaction check
---> Package cpp.x86_64 0:4.8.5-36.el7_6.2 will be installed
---> Package glibc-devel.x86_64 0:2.17-260.el7_6.6 will be installed
--> Processing Dependency: glibc-headers = 2.17-260.el7_6.6 for package: glibc-devel-2.17-260.el7_6.6.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-260.el7_6.6.x86_64
--> Running transaction check
---> Package glibc-headers.x86_64 0:2.17-260.el7_6.6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================
Package Arch Version Repository Size
=======================================================================================
Installing:
gcc x86_64 4.8.5-36.el7_6.2 updates 16 M
kernel-devel x86_64 3.10.0-957.27.2.el7 updates 17 M
kernel-headers x86_64 3.10.0-957.27.2.el7 updates 8.0 M
Installing for dependencies:
cpp x86_64 4.8.5-36.el7_6.2 updates 5.9 M
glibc-devel x86_64 2.17-260.el7_6.6 updates 1.1 M
glibc-headers x86_64 2.17-260.el7_6.6 updates 684 k
Transaction Summary
=======================================================================================
Install 3 Packages (+3 Dependent packages)
Total download size: 49 M
Installed size: 97 M
Downloading packages:
(1/6): glibc-devel-2.17-260.el7_6.6.x86_64.rpm | 1.1 MB 00:00:03
(2/6): cpp-4.8.5-36.el7_6.2.x86_64.rpm | 5.9 MB 00:00:03
(3/6): glibc-headers-2.17-260.el7_6.6.x86_64.rpm | 684 kB 00:00:06
(4/6): gcc-4.8.5-36.el7_6.2.x86_64.rpm | 16 MB 00:00:10
(5/6): kernel-headers-3.10.0-957.27.2.el7.x86_64.rpm | 8.0 MB 00:00:10
(6/6): kernel-devel-3.10.0-957.27.2.el7.x86_64.rpm | 17 MB 00:08:22
---------------------------------------------------------------------------------------
Total 99 kB/s | 49 MB 08:22
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : cpp-4.8.5-36.el7_6.2.x86_64 1/6
Installing : kernel-headers-3.10.0-957.27.2.el7.x86_64 2/6
Installing : glibc-headers-2.17-260.el7_6.6.x86_64 3/6
Installing : glibc-devel-2.17-260.el7_6.6.x86_64 4/6
Installing : gcc-4.8.5-36.el7_6.2.x86_64 5/6
Installing : kernel-devel-3.10.0-957.27.2.el7.x86_64 6/6
Verifying : glibc-devel-2.17-260.el7_6.6.x86_64 1/6
Verifying : kernel-headers-3.10.0-957.27.2.el7.x86_64 2/6
Verifying : cpp-4.8.5-36.el7_6.2.x86_64 3/6
Verifying : gcc-4.8.5-36.el7_6.2.x86_64 4/6
Verifying : glibc-headers-2.17-260.el7_6.6.x86_64 5/6
Verifying : kernel-devel-3.10.0-957.27.2.el7.x86_64 6/6
Installed:
gcc.x86_64 0:4.8.5-36.el7_6.2
kernel-devel.x86_64 0:3.10.0-957.27.2.el7
kernel-headers.x86_64 0:3.10.0-957.27.2.el7
Dependency Installed:
cpp.x86_64 0:4.8.5-36.el7_6.2 glibc-devel.x86_64 0:2.17-260.el7_6.6
glibc-headers.x86_64 0:2.17-260.el7_6.6
Complete!
[root@localhost ~]# yum install dkms kernel-devel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* epel: mirrors.aliyun.com
* extras: centos.excellmedia.net
* updates: centos.excellmedia.net
Package kernel-devel-3.10.0-957.27.2.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package dkms.noarch 0:2.7.1-1.el7 will be installed
--> Processing Dependency: elfutils-libelf-devel for package: dkms-2.7.1-1.el7.noarch
--> Running transaction check
---> Package elfutils-libelf-devel.x86_64 0:0.172-2.el7 will be installed
--> Processing Dependency: pkgconfig(zlib) for package: elfutils-libelf-devel-0.172-2.el7.x86_64
--> Running transaction check
---> Package zlib-devel.x86_64 0:1.2.7-18.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================
Package Arch Version Repository Size
=======================================================================================
Installing:
dkms noarch 2.7.1-1.el7 epel 75 k
Installing for dependencies:
elfutils-libelf-devel x86_64 0.172-2.el7 base 39 k
zlib-devel x86_64 1.2.7-18.el7 base 50 k
Transaction Summary
=======================================================================================
Install 1 Package (+2 Dependent packages)
Total download size: 164 k
Installed size: 383 k
Is this ok [y/d/N]: y
Downloading packages:
(1/3): elfutils-libelf-devel-0.172-2.el7.x86_64.rpm | 39 kB 00:00:00
(2/3): zlib-devel-1.2.7-18.el7.x86_64.rpm | 50 kB 00:00:00
(3/3): dkms-2.7.1-1.el7.noarch.rpm | 75 kB 00:00:01
---------------------------------------------------------------------------------------
Total 86 kB/s | 164 kB 00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : zlib-devel-1.2.7-18.el7.x86_64 1/3
Installing : elfutils-libelf-devel-0.172-2.el7.x86_64 2/3
Installing : dkms-2.7.1-1.el7.noarch 3/3
Verifying : elfutils-libelf-devel-0.172-2.el7.x86_64 1/3
Verifying : zlib-devel-1.2.7-18.el7.x86_64 2/3
Verifying : dkms-2.7.1-1.el7.noarch 3/3
Installed:
dkms.noarch 0:2.7.1-1.el7
Dependency Installed:
elfutils-libelf-devel.x86_64 0:0.172-2.el7 zlib-devel.x86_64 0:1.2.7-18.el7
Complete!
[root@localhost ~]# yum update
[root@localhost ~]#reboot
root@localhost ~]# service vboxdrv status
Redirecting to /bin/systemctl status vboxdrv.service
● vboxdrv.service - VirtualBox Linux kernel module
Loaded: loaded (/usr/lib/virtualbox/vboxdrv.sh; enabled; vendor preset: disabled)
Active: active (exited) since Fri 2019-08-30 09:49:08 IST; 19min ago
Process: 785 ExecStart=/usr/lib/virtualbox/vboxdrv.sh start (code=exited, status=0/SUCCESS)
Tasks: 0
Aug 30 09:48:57 localhost.localdomain systemd[1]: Starting VirtualBox Linux kernel ....
Aug 30 09:49:03 localhost.localdomain vboxdrv.sh[785]: vboxdrv.sh: Starting Virtual....
Aug 30 09:49:03 localhost.localdomain vboxdrv.sh[805]: Starting VirtualBox services.
Aug 30 09:49:05 localhost.localdomain vboxdrv.sh[824]: VirtualBox services started.
Aug 30 09:49:08 localhost.localdomain systemd[1]: Started VirtualBox Linux kernel m....
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost ~]#
[root@localhost ~]# vagrant ssh
ssh_exchange_identification: read: Connection reset by peer
root@localhost ~]# ssh 127.0.0.1
The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.
ECDSA key fingerprint is SHA256:m8YpYiq0v1ChLkZk74cRLvjYcNwbQaMMjGnVvdox/7U.
ECDSA key fingerprint is MD5:7a:50:34:05:30:55:60:58:77:33:80:ff:76:e9:f1:f3.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '127.0.0.1' (ECDSA) to the list of known hosts.
Last login: Fri Aug 30 12:30:38 2019
[root@localhost ~]# vagrant ssh
[vagrant@localhost ~]$
==> default: Attempting graceful shutdown of VM...
default: Guest communication could not be established! This is usually because
default: SSH is not running, the authentication information was changed,
default: or some other networking issue. Vagrant will force halt, if
default: capable.
==> default: Forcing shutdown of VM...
[root@localhost ~]# vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'centos/7' version '1905.1' is up to date...
==> default: Clearing any previously set forwarded ports...
==> 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: 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.
==> default: Rsyncing folder: /root/ => /vagrant
Comments
Post a Comment