Vagrantコマンド



仮想環境の起動

  • コマンドプロンプトから以下のコマンドを入力する。
  1. C:\>cd Vagrant\CentOS7.1
  2. C:\Vagrant\CentOS7.1>vagrant up
  3. Bringing machine 'default' up with 'virtualbox' provider...
  4. ==> default: Importing base box 'CentOS7.1'...
  5. ==> default: Matching MAC address for NAT networking...
  6. ==> default: Setting the name of the VM: CentOS71_default_1431791415011_58624
  7. ==> default: Clearing any previously set forwarded ports...
  8. ==> default: Clearing any previously set network interfaces...
  9. ==> default: Preparing network interfaces based on configuration...
  10. default: Adapter 1: nat
  11. ==> default: Forwarding ports...
  12. default: 22 => 2222 (adapter 1)
  13. ==> default: Booting VM...
  14. ==> default: Waiting for machine to boot. This may take a few minutes...
  15. default: SSH address: 127.0.0.1:2222
  16. default: SSH username: vagrant
  17. default: SSH auth method: private key
  18. default: Warning: Connection timeout. Retrying...
  19. default: Warning: Connection timeout. Retrying...
  20. default: Warning: Connection timeout. Retrying...
  21. default:
  22. default: Vagrant insecure key detected. Vagrant will automatically replace
  23. default: this with a newly generated keypair for better security.
  24. default:
  25. default: Inserting generated public key within guest...
  26. default: Removing insecure key from the guest if its present...
  27. default: Key inserted! Disconnecting and reconnecting using new SSH key...
  28. ==> default: Machine booted and ready!
  29. ==> default: Checking for guest additions in VM...
  30. ==> default: Mounting shared folders...
  31. default: /vagrant => C:/Vagrant/CentOS7.1
  32.  

仮想環境の終了

  • コマンドプロンプトから以下のコマンドを入力する。
  1. C:\>cd Vagrant\CentOS7.1
  2. C:\Vagrant\CentOS7.1>vagrant halt
  3. ==> default: Attempting graceful shutdown of VM...
  4.  

仮想環境における設定の反映

  • コマンドプロンプトから以下のコマンドを入力する。
  1. C:\>cd Vagrant\CentOS7.1
  2. C:\Vagrant\CentOS7.1>vagrant reload
  3. ==> default: Attempting graceful shutdown of VM...
  4. ==> default: Clearing any previously set forwarded ports...
  5. ==> default: Clearing any previously set network interfaces...
  6. ==> default: Preparing network interfaces based on configuration...
  7. default: Adapter 1: nat
  8. ==> default: Forwarding ports...
  9. default: 22 => 2222 (adapter 1)
  10. ==> default: Booting VM...
  11. ==> default: Waiting for machine to boot. This may take a few minutes...
  12. default: SSH address: 127.0.0.1:2222
  13. default: SSH username: vagrant
  14. default: SSH auth method: private key
  15. default: Warning: Connection timeout. Retrying...
  16. default: Warning: Connection timeout. Retrying...
  17. ==> default: Machine booted and ready!
  18. ==> default: Checking for guest additions in VM...
  19. ==> default: Mounting shared folders...
  20. default: /vagrant => C:/Vagrant/CentOS7.1
  21. ==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
  22. ==> default: to force provisioning. Provisioners marked to run always will still run.
  23.  

タグ:

+ タグ編集
  • タグ:

このサイトはreCAPTCHAによって保護されており、Googleの プライバシーポリシー利用規約 が適用されます。

最終更新:2015年05月17日 17:05