質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
SSH

SSH(Secure Shell)は、セキュアチャネルを通してデータを交換するためのネットワークプロトコルです。リモートサーバーへのコマンド実行やファイル転送を行う時に一般的に使用されます。

VirtualBox

VirtualBoxは、現在米オラクル社が開発している、 x86仮想化ソフトウェア・パッケージの一つです。

Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

Q&A

解決済

1回答

3015閲覧

VirtualBoxとvagrantとputtyで仮想環境を構築しようとしてましたが、puttyでログインできない

000909-0

総合スコア18

SSH

SSH(Secure Shell)は、セキュアチャネルを通してデータを交換するためのネットワークプロトコルです。リモートサーバーへのコマンド実行やファイル転送を行う時に一般的に使用されます。

VirtualBox

VirtualBoxは、現在米オラクル社が開発している、 x86仮想化ソフトウェア・パッケージの一つです。

Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

0グッド

0クリップ

投稿2017/06/09 04:15

putty network error connection refused network error software caused connerction abort

上二つエラーが出てきて解決方法がわからない状況です。

ずーーーーーーっと答えを探し悩んでいましたが、もう限界なので質問させてください。おしえてください。ご教授ください。

VirtualBoxとvagrantとputtyで仮想環境を構築しようとしてましたが、つまずきまくってます。

ドットインストールのhttp://dotinstall.com/lessons/basic_localdev_win_v2[を見て学習してました

以前https://teratail.com/questions/72844で質問して自分なりに解決したつもりでしたが、根本の解決はできてませんでした。

●環境
windowos7

VirtualBox
バージョン 5.1.22 r115126 (Qt5.6.2)

Vagrant
Installed Version: 1.8.6
Latest Version: 1.9.5

To upgrade to the latest version, visit the downloads page and
download and install the latest version of Vagrant from the URL
below:

https://www.vagrantup.com/downloads.html

If you're curious what changed in the latest release, view the
CHANGELOG below:

●状況について

  1. vagrant fileは以下です。多分間違ってないと思います。
# -*- mode: ruby -*- # vi: set ft=ruby : # All Vagrant configuration is done below. The "2" in Vagrant.configure # configures the configuration version (we support older styles for # backwards compatibility). Please don't change it unless you know what # you're doing. Vagrant.configure("2") do |config| # The most common configuration options are documented and commented below. # For a complete reference, please see the online documentation at # https://docs.vagrantup.com. # Every Vagrant development environment requires a box. You can search for # boxes at https://atlas.hashicorp.com/search. config.vm.box = "bento/centos-6.8" # Disable automatic box update checking. If you disable this, then # boxes will only be checked for updates when the user runs # `vagrant box outdated`. This is not recommended. # config.vm.box_check_update = false # Create a forwarded port mapping which allows access to a specific port # within the machine from a port on the host machine. In the example below, # accessing "localhost:8080" will access port 80 on the guest machine. # config.vm.network "forwarded_port", guest: 80, host: 8080 config.vm.network "forwarded_port", guest: 22, host: 2200 # Create a private network, which allows host-only access to the machine # using a specific IP. config.vm.network "private_network", ip: "192.168.33.10" # config.vm.network "private_network", ip: "127.0.0.1" # Create a public network, which generally matched to bridged network. # Bridged networks make the machine appear as another physical device on # your network. # config.vm.network "public_network" # Share an additional folder to the guest VM. The first argument is # the path on the host to the actual folder. The second argument is # the path on the guest to mount the folder. And the optional third # argument is a set of non-required options. # config.vm.synced_folder "../data", "/vagrant_data" # Provider-specific configuration so you can fine-tune various # backing providers for Vagrant. These expose provider-specific options. # Example for VirtualBox: # # config.vm.provider "virtualbox" do |vb| # # Display the VirtualBox GUI when booting the machine # vb.gui = true # # # Customize the amount of memory on the VM: # vb.memory = "1024" # end # # View the documentation for the provider you are using for more # information on available options. # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies # such as FTP and Heroku are also available. See the documentation at # https://docs.vagrantup.com/v2/push/atlas.html for more information. # config.push.define "atlas" do |push| # push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME" # end # Enable provisioning with a shell script. Additional provisioners such as # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the # documentation for more information about their specific syntax and use. # config.vm.provision "shell", inline: <<-SHELL # apt-get update # apt-get install -y apache2 # SHELL end

vagrantに関しては、vagrant upはできているようです。

PS

1Bringing machine 'default' up with 'virtualbox' provider... 2==> default: Checking if box 'bento/centos-6.8' is up to date... 3==> default: Clearing any previously set forwarded ports... 4==> default: Clearing any previously set network interfaces... 5==> default: Preparing network interfaces based on configuration... 6 default: Adapter 1: nat 7 default: Adapter 2: hostonly 8==> default: Forwarding ports... 9 default: 22 (guest) => 2200 (host) (adapter 1) 10 default: 22 (guest) => 2222 (host) (adapter 1) 11==> default: Booting VM... 12==> default: Waiting for machine to boot. This may take a few minutes... 13 default: SSH address: 127.0.0.1:2222 14 default: SSH username: vagrant 15 default: SSH auth method: private key 16The guest machine entered an invalid state while waiting for it 17to boot. Valid states are 'starting, running'. The machine is in the 18'unknown' state. Please verify everything is configured 19properly and try again. 20 21If the provider you're using has a GUI that comes with it, 22it is often helpful to open that and watch the machine, since the 23GUI often has more helpful error messages than Vagrant can retrieve. 24For example, if you're using VirtualBox, run `vagrant up` while the 25VirtualBox GUI is open. 26 27The primary issue for this error is that the provider you're using 28is not properly configured. This is very rarely a Vagrant issue. 29PS C:\Users\user\MyVagrant\MyCentOS> vagrant status 30Current machine states: 31 32default running (virtualbox) 33 34The VM is running. To stop this VM, you can run `vagrant halt` to 35shut it down forcefully, or you can run `vagrant suspend` to simply 36suspend the virtual machine. In either case, to restart it again, 37simply run `vagrant up`. 38コード

●解決したいこと

最初はputtyでログインしようとすると、タイアウトエラーになりましたが、https://teratail.com/questions/72844こちらで質問したあとタイムアウトエラーはなくなったのですが、

次にputtyでsshで入ろうとすると、

ip 192.168.33.10 port 22は以下のエラーができます。

putty network error connection refused

ip 127.0.0.1 port 2200は以下のエラーがでてきます。

network error software caused connerction abort

vagrantのバージョンが悪いのか?とドットインストールと同じ1.8.6にしたのですがかわりません。

しかし、vagrant upができているのだから、vagrantの問題ではないのか? windowsのファイヤーウォールが問題なのか?と思っていろいろ試しましたが、私のpcにはxamppが入っていてそれは普通に立ち上がり

同じようにな仮想環境を作るのなら、xamppもVirtualBoxもほとんど変わらないはずですよね?汗

また、puttyでも、connectionのSecondes between keepalivesの部分もデフォルトの0から5や300や20に変更しながらやっても結果は同じでした。

さらに、windowsのセキュリティソフト(AVG)を無効にしても変わらず

また、何度も削除して、インストールを繰り返いしているで、前に入れていたVirtualBoxとvagrantとputtyがどこかに残ってるのかもしてませんが、しっかり削除したつもりです。

関係ないと思いますが、不思議に思ったの事を
xamppはC:\xamppに全てのファイルは入ってますが

ドットインストールのやり方はそれぞれバラバラのフォルダに入ってしまいました。
PuTTY
C:\Program Files\PuTTY
Vagrant file
C:\Users\user\MyVagrant\MyCentOS
VirtualBox
C:\Program Files\Oracle\VirtualBox
もしかししたら、すべて一つにフォルダにまとめるのが正解なのでしょうか?

このような状況の場合、考えられる解決法はなにかありますでしょうか?

どうか、何卒ご教授ください。本気で困ってます。

PS:

数か月ここから身動きできない状況です。こんなに仮想環境を作るのは難しいのもなのですか?仮想環境はwindowsではなくmacで構築した方が安定するのでしょうか?

これが原因でノイローゼになりそうです。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

自己解決

質問してすぐに自己回答で申しわけないのですが、

結局BIOSが仮想化非対応だったようです。BIOSのアップデートも考えたのですが、マザーボードも変えないといけないらしく、リスクが結構高いと聞いたので、MACで仮想化することにしました。

お騒がせしました。

追記:
すみません 自己回答間違ってました。

http://amaotolog.com/amalog/38にあった

Intel VT (Intel Virtualization Technology)を有効にすると、すんなりputtyでログインできました。
イメージ説明

投稿2017/06/09 06:10

編集2017/06/09 06:28
000909-0

総合スコア18

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問