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

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

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

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

Vagrant

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

Q&A

解決済

2回答

36477閲覧

Vagrant up 後「Couldn't open file…」とエラーメッセージが出る

kapimako

総合スコア39

VirtualBox

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

Vagrant

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

1グッド

0クリップ

投稿2015/01/17 22:04

お世話になります。html以外は初心者です。
Windows7で仮想サーバの構築をしようとVirtualBoxとVagrantを初めてインストールしました。
コマンドプロンプトでvagrant up を実行すると以下「ファイルが開けない」とエラーメッセージが出ます。何が原因でしょうか?もしかしたらフォルダの構造やダウンロードしたファイルの場所が合ってないのでは?と疑念をだいています(一番下に記載)。どなたかご教示いただけないでしょうか。よろしくお願いいたします。

C:\localdev>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'centos' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Adding box 'centos' (v0) for provider: virtualbox
default: Downloading: centos
default:
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

Couldn't open file /localdev/centos

■vagrant upの前に以下を実行して成功しているように見えます。

C:\localdev>vagrant box add centos https://github.com/2creatives/vagrant-centos/
releases/download/v6.5.3/centos65-x86_64-20140116.box
==> box: Adding box 'centos' (v0) for provider:
box: Downloading: https://github.com/2creatives/vagrant-centos/releases/down
load/v6.5.3/centos65-x86_64-20140116.box
box: Progress: 100% (Rate: 192k/s, Estimated time remaining: --:--:--)
==> box: Successfully added box 'centos' (v0) for 'virtualbox'!

C:\localdev>vagrant box list
centos65-x86_64-20140116 (virtualbox, 0)

C:\localdev>vagrant init centos
A Vagrantfile has been placed in this directory. You are now
ready to vagrant up your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
vagrantup.com for more information on using Vagrant.

C:\localdev\Vagrantfile ファイルの以下15行目
config.vm.box = "centos"
29行目コメントアウトはずして保存。
config.vm.network "private_network", ip: "192.168.33.10"

■ファイルの構造
C:\Users\ユーザ名.vagrant.d
C:\Users\ユーザ名.vagrant.d\boxes\centos65-x86_64-20140116
C:\Users\ユーザ名.VirtualBox
C:\localdev.vagrant\machines\default\virtualbox(このフォルダは空です)
C:\HashiCorp
C:\Program Files\Oracle\VirtualBox

長文ですみません。ご教示の程よろしくお願いいたします。

yharu👍を押しています

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

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

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

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

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

guest

回答2

0

ごめんなさい。成功していませんでした(泣)。この後、ssh接続ができず色々調べていたら、try again(最後から2段目の段落)が出ているので、色々調べてバージョンを4.1.20から4.1.12の安定板に再インストールしたのですが、まだカーネルがどうのとかGUIにエラーが出ているので調べている所です。この為、上記コマンドプロンプトのコピーしたメッセージ?は成功してない例になります。申し訳ありません。よく読まないとダメですね。。。MACはSSHまで割とすんなり成功したのですが、WINDOWSでの設定は当方のような初心者には難しいな…と思いました。一応、やれるとこまで頑張ってみますね。笑。また進捗を報告させていただきます。

投稿2015/01/24 05:28

kapimako

総合スコア39

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

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

0

ベストアンサー

BOXがインストールされていないかもしれないので、http://www.vagrantbox.es/からBOXを選択して

lang

1$ vagrant box add centos https://github.com/2creatives/vagrant-centos/releases/download/v6.4.2/centos64-x86_64-20140116.box

のような形でBOXインストールしてからvagrant upをしてみてください。

投稿2015/01/18 01:38

pikonori

総合スコア82

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

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

kapimako

2015/01/18 03:44

できました!!!!(泣)これが出来なくて、1週間色んなサイトを見たり徹夜して体調悪くなったりでやっと昨日復活して質問して早速回答いただけてかなり嬉しいです。ありがとうございました!!!!(すみません、ちょっと興奮ぎみです。汗) 今まで失敗してた原因は、コマンドプロンプトを使うのが初めてだったので、Cドライブに作るのかその配下に作るのか、色々エラーを繰り返すうちに、順序が逆になり先に作ってしまったフォルダの中にBOX?をインストールするような(以下)入力をしていました。 (誤)先に作っていたフォルダ「localdev」に入れていた。 C:\localdev>vagrant box add centos https://github.com...(省略) (正)Cドライブ直下でよかったんですね。 C:\>vagrant box add centos https://github.com...(省略) その後の手順で、vagrant init centos(Box名)のフォルダ名も、同じ名前でよかったんですね。 成功したので、記念にコマンドプロンプトの画面を貼らせていただきます。^^ 本当に助かりました。これでやっと次に進めます。また、機会がありましたらご教示くださいますようお願い申し上げます。ありがとうございました。m(_ _)m C:\centos>vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Importing base box 'centos'... ==> default: Matching MAC address for NAT networking... ==> default: Setting the name of the VM: centos_default_1421551145946_88083 ==> 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 => 2222 (adapter 1) ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... The guest machine entered an invalid state while waiting for it to boot. Valid states are 'starting, running'. The machine is in the 'poweroff' state. Please verify everything is configured properly and try again. If the provider you're using has a GUI that comes with it, it is often helpful to open that and watch the machine, since the GUI often has more helpful error messages than Vagrant can retrieve. For example, if you're using VirtualBox, run `vagrant up` while the VirtualBox GUI is open.
pikonori

2015/01/18 03:55

それは良かったです:)
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問