ユーザ用ツール

サイト用ツール


temporary:vagrant

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

次のリビジョン
前のリビジョン
temporary:vagrant [2014/01/20 09:01] – 外部編集 127.0.0.1temporary:vagrant [2025/02/16 13:53] (現在) – 外部編集 127.0.0.1
行 1: 行 1:
-====== Contents  ====== 
- 
 ====== vagrant  ====== ====== vagrant  ======
  
行 265: 行 263:
 </code> </code>
  
-===== プラグイン「sahara」  =====+===== 追加ディスク =====
  
 +「db01-disk001.vdi」という5GBのファイルを作成して、アタッチする。
 +
 +<code>
 +Vagrant.configure(2) do |config|
 +  config.vm.define :db01 do |node|
 +    node.vm.box = "chef/centos-6.6"
 +    node.vm.hostname = "db01.dev"
 +    node.vm.network "private_network", ip: "192.168.56.211"
 +    
 +    node.vm.provider "virtualbox" do |vm|
 +      ext_disk = 'db01-disk001.vdi'
 +      unless File.exists?(ext_disk)
 +        vm.customize ['createhd', '--filename', ext_disk, '--size', 5 * 1024]
 +      end
 +      vm.customize ['storageattach', :id,
 +                    '--storagectl', 'IDE Controller',
 +                    '--port',       1, 
 +                    '--device',     0, 
 +                    '--type',       'hdd', 
 +                    '--medium',     ext_disk]
 +    end
 +  end
 +end
 +</code>
 +
 +===== プラグイン「sahara」  =====
 ==== インストール  ==== ==== インストール  ====
 <code> <code>
行 383: 行 407:
 VM, run `vagrant status NAME`. VM, run `vagrant status NAME`.
  
 +===== Tips  =====
 +==== Failed to mount folders  ====
 +
 +<code>
 +==> cen: Mounting shared folders...
 +    cen: /vagrant => C:/centos/web/
 +Failed to mount folders in Linux guest. This is usually because
 +the "vboxsf" file system is not available. Please verify that
 +the guest additions are properly installed in the guest and
 +can work properly. The command attempted was:
 +
 +mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3`
 +vagrant /vagrant
 +mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` vagrant /vagrant
 +
 +The error output from the last command was:
 +
 +/sbin/mount.vboxsf: mounting failed with the error: No such device
 +</code>
 +
 +<code>
 +# /etc/init.d/vboxadd setup
 +Removing existing VirtualBox non-DKMS kernel modules        OK  ]
 +Building the VirtualBox Guest Additions kernel modules
 +The headers for the current running kernel were not found. If the following
 +module compilation fails then this could be the reason.
 +The missing package can be probably installed with
 +yum install kernel-devel-2.6.32-504.23.4.el6.x86_64
 +
 +Building the main Guest Additions module                   [FAILED]
 +(Look at /var/log/vboxadd-install.log to find out what went wrong)
 +Doing non-kernel setup of the Guest Additions              [  OK  ]
 +</code>
 +
 +<code>
 +# yum -y install gcc perl kernel-devel-2.6.32-504.23.4.el6.x86_64
 +# /etc/init.d/vboxadd setup
 +</code>
temporary/vagrant.1390208500.txt.gz · 最終更新: 2025/02/16 13:50 (外部編集)