「.NET 開発基盤部会 Wiki」は、「Open棟梁Project」,「OSSコンソーシアム .NET開発基盤部会」によって運営されています。
私はWin 10 proを用意しました。
An error occurred while downloading the remote file. The error message, if any, is reproduced below. Please fix this error and try again.
※ SHIRASAGI開発環境として、動作確認のとれた vagrant バージョンをインストールする。
Tera Term などの SSH クライアントが必要。
Vagrantによる環境設定
Vagrantfile は Ruby の簡単な変数代入で書かれている。
公式にも「Rubyの知識は必要ない」と書いてある。
c:\shirasagi-dev\Vagrantfile
Vagrant.configure(2) do |config| config.vm.box = "ss-vagrant-v1.6.0-rc" config.vm.box_url = "https://github.com/shirasagi/ss-vagrant/releases/download/v1.6.0-rc/ss-vagrant-virtualbox-x86_64.box" config.vm.network :forwarded_port, guest: 3000, host: 3000 config.vm.network "private_network", ip: "192.168.33.10" config.vm.network "private_network", ip: "192.168.33.11" config.vm.network "private_network", ip: "192.168.33.12" config.vm.provider :virtualbox do |vb| # see: http://blog.shibayu36.org/entry/2013/08/12/090545 # IPv6 と DNS でのネットワーク遅延対策で追記 vb.customize ["modifyvm", :id, "--natdnsproxy1", "off"] vb.customize ["modifyvm", :id, "--natdnshostresolver1", "off"] end end
>vagrant up
Bringing machine 'default' up with 'virtualbox' provider... ==> default: Box 'ss-vagrant-v1.6.0-rc' could not be found. Attempting to find and install... default: Box Provider: virtualbox default: Box Version: >= 0 ==> default: Box file was not detected as metadata. Adding it directly... ==> default: Adding box 'ss-vagrant-v1.6.0-rc' (v0) for provider: virtualbox default: Downloading: https://github.com/shirasagi/ss-vagrant/releases/download/v1.6.0-rc/ss-vagrant-virtualbox-x86_64.box default: Progress: nn% (Rate: nnnnk/s, Estimated time remaining: n:nn:nn)
==> default: Successfully added box 'ss-vagrant-v1.6.0-rc' (v0) for 'virtualbox'! ==> default: Importing base box 'ss-vagrant-v1.6.0-rc'... ==> default: Matching MAC address for NAT networking... ==> default: Setting the name of the VM: shirasagi-dev_default_1506394717167_57655 ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat default: Adapter 2: hostonly default: Adapter 3: hostonly default: Adapter 4: hostonly ==> default: Forwarding ports... default: 3000 (guest) => 3000 (host) (adapter 1) default: 22 (guest) => 2222 (host) (adapter 1) ==> default: Running 'pre-boot' VM customizations... ==> 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
Timed out while waiting for the machine to boot. This means that Vagrant was unable to communicate with the guest machine within the configured ("config.vm.boot_timeout" value) time period. If you look above, you should be able to see the error(s) that Vagrant had when attempting to connect to the machine. These errors are usually good hints as to what may be wrong. If you're using a custom box, make sure that networking is properly working and you're able to connect to the machine. It is a common problem that networking isn't setup properly in these boxes. Verify that authentication configurations are also setup properly, as well. If the box appears to be booting properly, you may want to increase the timeout ("config.vm.boot_timeout") value.
vb.gui = true
仮想マシンを起動した際に仮想ウィンドウを表示する場合、GUI モードで起動する。
>vagrant up
[ディスプレイ] ---> [リモートディスプレイ] ---> [サーバーを有効化]のチェックをオフ
Notebook PC シリーズ - BIOS で [Virtualization Technology] を有効にするには
https://h20628.www2.hp.com/km-ext/content-webapp/document?docId=emr_na-c03836690
VirtualBox?でゲストOSを起動すると「This kernel requires an x86-64 CPU, but only detected an i686 CPU.
Unable to boot - please use a kernel appropriate for your CPU.」エラー - 日々精進
http://anton0825.hatenablog.com/entry/20140510/1407818313
default: SSH auth method: private key default: Warning: Remote connection disconnect. Retrying... default: Warning: Remote connection disconnect. Retrying... default: Warning: Remote connection disconnect. 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: Configuring and enabling network interfaces... ==> default: Mounting shared folders... default: /vagrant => C:/shirasagi-dev ==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision` ==> default: flag to force provisioning. Provisioners marked to run always will still run.
GUIモードが有効な場合、仮想ウィンドウを使用できる。
以下からTera Termで接続する。
host: 192.168.33.10 port: 22
user: vagrant password: vagrant
$ cd $HOME/shirasagi $ bundle exec rake unicorn:start bundle exec unicorn_rails -c /var/www/shirasagi/config/unicorn.rb -E production -D
ポートフォワーディングでホスト:3000からゲスト:3000(Web Server)に接続している。
ググると色々出てくる。