LoginSignup
9
7

More than 5 years have passed since last update.

Vagrant | Vagrant VMware Workstation Provider の購入からVMの起動まで

Posted at

Vagrant | Vagrant VMware Workstation Provider の購入からVMの起動まで

概要

Vagrant VMware Workstation Provider の購入からVMの起動までの手順を説明します

前提

  • VMware Workstation10
  • Vagrant 1.5.3
  • Windows7

手順

  • Vagrant公式サイトの下記URLにてライセンスを購入する。1ライセンス $79 (2014/06/26現在)

    https://www.vagrantup.com/vmware

  • 購入完了のメールが届きます

  • メールにライセンスファイル( license.lic )のダウンロードURLがあるので、ダウンロードします

    http://license.hashicorp.com/licenses/<任意のURL>/download

  • vagrant-vmware-workstation plugin をインストールします

$ vagrant plugin install vagrant-vmware-workstation
Installing the 'vagrant-vmware-workstation' plugin. This can take a few minutes...
Installed the plugin 'vagrant-vmware-workstation (2.4.1)'!
  • ライセンスを有効化します
$ cd %ライセンスをダウンロードしたディレクトリ%
$ vagrant plugin license vagrant-vmware-workstation license.lic
Installing license for 'vagrant-vmware-workstation'...
The license for 'vagrant-vmware-workstation' was successfully installed!
  • VMWare用の Ubuntu 12.04 LTS のBOXを追加
$ vagrant box add vmware_precise64 http://files.vagrantup.com/precise64_vmware.box
==> box: Adding box 'vmware_precise64' (v0) for provider:
    box: Downloading: http://files.vagrantup.com/precise64_vmware.box

==> box: Successfully added box 'vmware_precise64' (v0) for 'vmware_fusion'!

$ vagrant box list | grep vmware
vmware_precise64 (vmware_fusion, 0)

公式の説明によると、 vmware_fusion になっていますが、 Workstation の場合でも問題ないとのこと。

  • Vagranfileを以下の内容で作成します
# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "vmware_precise64"
  config.vm.provider "vmware_workstation" do |v|
    v.gui = true
  end
end
  • VMを起動します。
vagrant up --provider=vmware_workstation

無事起動しました。

vagrant_vmware_workstation.png

※この際、cmdでもcygwinの端末でも構いませんが、ターミナルを管理者権限で起動しないと以下のエラーが発生します。

Bringing machine 'default' up with 'vmware_workstation' provider...
When using Vagrant with VMware Workstation on Windows, Vagrant must
run with administrative privileges. I realize this is not ideal,
but this is the only way to make network modifications with VMware.
Please run Vagrant in a console with Windows administrative privileges.
  • sshで接続してみます
$ vagrant ssh
Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-29-virtual x86_64)

 * Documentation:  https://help.ubuntu.com/
Last login: Wed Jun 26 23:23:42 2014

参照

VMWare Provider購入ページ

VMWare Providerドキュメント

9
7
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
9
7