vagrant upしようとした際に、error

コマンドラインで、vagrant upしようとしたら、error while executing `VBoxManage`と表示

>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'bento/centos-6.8'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'bento/centos-6.8' is up to date...
==> default: A newer version of the box 'bento/centos-6.8' is available! You currently
==> default: have version '2.3.0'. The latest is version '2.3.4'. Run
==> default: `vagrant box update` to update.
==> default: Setting the name of the VM: FirstCentOs_default_1504414856800_6279
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "6663a9a1-034a-4794-b88f-xxxxxxxxxxxx", "--type", "headless"]

困りますよね。別の仮想マシンを立ち上げましたが、同じように、error while executing `VBoxManage`と表示されたので、windowsのアプリから、Oracle VM VirtualBox 5.1.22をアンインストールして、Oracle VM VirtualBox 5.1.26を再度インストール。

今度は上手くいきました。

>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'bento/centos-6.8' is up to date...
==> default: A newer version of the box 'bento/centos-6.8' is available! You currently
==> default: have version '2.3.0'. The latest is version '2.3.4'. Run
==> default: `vagrant box update` to update.
==> 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: Adapter 2: hostonly
==> 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: Warning: Connection aborted. 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!

sudoers


vagrant@vagrant-ubuntu-trusty-64:~$ sudo cat /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults        env_reset
Defaults        mail_badpass
Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d

無題

Change permission

vagrant@vagrant-ubuntu-trusty-64:~$ sudo cp /etc/sudoers.d/vagrant /etc/sudoers.    d/student
vagrant@vagrant-ubuntu-trusty-64:~$ sudo nano /etc/sudoers.d/student
student@vagrant-ubuntu-trusty-64:~$ sudo ufw status
Status: inactive

play command line

vagrant@vagrant-ubuntu-trusty-64:/$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

All packages list below

vagrant@vagrant-ubuntu-trusty-64:/$ cat /etc/apt/sources.list

Update software

vagrant@vagrant-ubuntu-trusty-64:~$ sudo apt-get update

install

vagrant@vagrant-ubuntu-trusty-64:~$ sudo apt-get install finger

Apache HTTP Server apache2
PostgreSQL postgresql
Memcache memcached

type finger

vagrant@vagrant-ubuntu-trusty-64:~$ finger
Login     Name       Tty      Idle  Login Time   Office     Office Phone
vagrant              pts/0          Jan 18 12:14 (192.168.53.1)
vagrant@vagrant-ubuntu-trusty-64:~$ cat /etc/passwd

add user

vagrant@vagrant-ubuntu-trusty-64:~$ sudo adduser student
Adding user `student' ...
Adding new group `student' (1002) ...
Adding new user `student' (1002) with group `student' ...
Creating home directory `/home/student' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
Sorry, passwords do not match
passwd: Authentication token manipulation error
passwd: password unchanged
Try again? [y/N] y
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for student
Enter the new value, or press ENTER for the default
        Full Name []:
        Room Number []:
        Work Phone []:
        Home Phone []:
        Other []:
Is the information correct? [Y/n]

sudo file

student@vagrant-ubuntu-trusty-64:~$ sudo cat /etc/passwd
[sudo] password for student:
student is not in the sudoers file.  This incident will be reported.

command line

vagrant@vagrant-ubuntu-trusty-64:~$ pwd
/home/vagrant

show hidden file

vagrant@vagrant-ubuntu-trusty-64:~$ ls -a
.  ..  .bash_logout  .bashrc  .cache  .profile  .ssh

ls -al long command

vagrant@vagrant-ubuntu-trusty-64:~$ ls -al
total 28
drwxr-xr-x 4 vagrant vagrant 4096 Jan 18 12:09 .
drwxr-xr-x 4 root    root    4096 Jan 18 12:08 ..
-rw-r--r-- 1 vagrant vagrant  220 Apr  9  2014 .bash_logout
-rw-r--r-- 1 vagrant vagrant 3637 Apr  9  2014 .bashrc
drwx------ 2 vagrant vagrant 4096 Jan 18 12:09 .cache
-rw-r--r-- 1 vagrant vagrant  675 Apr  9  2014 .profile
drwx------ 2 vagrant vagrant 4096 Jan 18 12:09 .ssh

All file in root directory

Linux

Ubuntu:Ease of use on servers, desktops, laptops
https://www.ubuntu.com/

CentOS
https://www.centos.org/

RedHat:Large enterprise / corporate customers
https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux

CoreOS
https://coreos.com/

getting started ubuntu
>vagrant init ubuntu/trusty64

then, start vagrant up command.
here comes


Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-105-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Wed Jan 18 12:13:23 UTC 2017

  System load:  0.09              Processes:           75
  Usage of /:   3.5% of 39.34GB   Users logged in:     0
  Memory usage: 26%               IP address for eth0: 10.0.2.15
  Swap usage:   0%                IP address for eth1: 192.168.53.10

  Graph this data and manage this system at:
    https://landscape.canonical.com/

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

New release '16.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

crontab

crontab:設定した時間になったら定期的にコマンドを実行

crontab -e //クロン編集

MAILTO=”” //結果をメールで送信
0 9 * * * /home/dir/taisho.sh //時間指定と起動するシェルの指定

時間の設定例
分 時 日 月 曜日 説明
0 * * * * 毎時0分にソース実行
0,45 * * * * 毎時0分と45分にソースが実行
0 3 15 * * 毎月15日の3時にソースが実行

linux
ファイル名.sh
#! /bin/sh
command1
command2
command3

1. cronが起動しているかの確認

[vagrant@localhost rss6]$ /etc/rc.d/init.d/crond status
crond (pid  2624) を実行中...

2.cronに既にバッチ処理が設定されているか確認

[vagrant@localhost rss6]$ crontab -l
no crontab for vagrant

3. cronの設定ファイルを確認

[vagrant@localhost rss6]$ less /etc/crontab

4.バッチの設定

crontab -e
 0 0 * * * /bin/bash /home/xxx/cron_all.sh > /dev/null 2>&1