LoginSignup
20
24

More than 5 years have passed since last update.

VagrantでWindows Guestを試してみた

Last updated at Posted at 2014-05-09

Vagrant 1.6でWindows Guestがサポートされたので試してみました。

環境

  • OSX 10.9
  • VirtualBox 4.3.10 r93012
  • Vagrant 1.6.1

手順

ブログにデモがありますので、こちらをみれば大体わかります。
http://www.vagrantup.com/blog/feature-preview-vagrant-1-6-windows.html

デモではWindowsのboxがすでに追加されている状態から始まってます。
Vagrant Cloudで適当にWindowsのBoxを探してダウンロードしておきましょう。

opentableさんが評価版のWindows Boxをたくさんあげているので、それをもとにVagrantfileを作成すると簡単に起動することができます。opentableさんのBoxはOpenSSH,Git,Curl,Wgetなどがすでに入ってます。packer.ioさんが提供しているようです。
例えば、Windows Server 2012 R2であれば次のコマンドで起動できます。

$ vagrant init opentable/win-2012r2-standard-amd64-nocm
$ vagrant up

Boxがかなり大きいので、コーヒーでも飲みながらしばらく待ってください。

しばらく待つと起動するのでvagrant sshでつないでみます。
pwdコマンドをたたくとvagrantユーザーのホームにいることがわかりますね。

$ vagrant ssh
WARNING: Could not load IOV methods. Check your GSSAPI C library for an update
WARNING: Could not load AEAD methods. Check your GSSAPI C library for an update
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.9.1
Last login: Thu May  8 20:02:53 2014 from 10.0.2.2

vagrant@vagrant-2012-r2 ~
$ pwd
/cygdrive/c/Users/vagrant

VirtualBoxのマネージャーを見るとWindowsが立ち上がってるのがわかります。

スクリーンショット 2014-05-09 12.35.58.png

新しく追加されたvagrant rdpコマンドでつないでみます。するとこんなエラーが。

$ vagrant rdp
WARNING: Could not load IOV methods. Check your GSSAPI C library for an update
WARNING: Could not load AEAD methods. Check your GSSAPI C library for an update
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.9.1
==> default: Detecting RDP info...
RDP connection information for this machine could not be
detected. This is typically caused when we can't find the IP
or port to connect to for RDP. Please verify you're forwarding
an RDP port and that your machine is accessible.

vagrant sshでもう一度入ってみると3369番のポートがListenされていないのでリモートデスクトップが起動されていないようです。
というわけで今日はここまで。
続きはこちら

20
24
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
20
24