###前提・実現したいこと
Vagrantでboxをつくり仮想環境のOSを入れて、仮想環境にIPアドレスを設定するためvagrantfileの内容を編集しようとすると文字の入力(一部の文字はできる)、削除ができなくなり、「$ vagrant halt」で閉じることもできなくなったのでターミナルごと閉じてまたvagrantfileの編集を試みたのですが上手くいかずそうしているうちにvagrantfileの一部を書き換えてしまいました。
###発生している問題・エラーメッセージ
・vagrantfileの編集ができない
・vagrantfileが正式な方法で閉じられない
・vagrantfileの内容を一部変更してしまった。
###該当のソースコード
mac1-no-iMac:~ mac$ vagrant global-status id name provider state directory ------------------------------------------------------------------------ e52e08d default virtualbox running /Users/mac/Desktop/centOS70_64 f47e1c0 default virtualbox running /Users/mac The above shows information about all known Vagrant environments on this machine. This data is cached and may not be completely up-to-date. To interact with any of the machines, you can go to that directory and run Vagrant, or you can use the ID directly with Vagrant commands from any directory. For example: "vagrant destroy 1a2b3c4d" mac1-no-iMac:~ mac$ mac1-no-iMac:~ mac$ vi vagrantfile # The most common configuration options are documented and commented below. # For a complete reference, please see the online documentation at # https://docs.vagrantup.com. # Every Vagrant development environment requires a box. You can search for # boxes at https://atlas.hashicorp.com/search. config.vm.box = "CentOS7_box" # Disable automatic box update checking. If you disable this, then # boxes will only be checked for updates when the user runs # `vagrant box outdated`. This is not recommended. # config.vm.box_check_update = false # Create a forwarded port mapping which allows access to a specific port # within the machine from a port on the host machine. In the example below, # accessing "localhost:8080" will access port 80 on the guest machine. # config.vm.network "forwarded_port", guest: 80, host: 8080 # Create a private network, which allows host-only access # config.vm.synced_folder "../data", "/vagrant_data" # Provider-specific configuration so you can fine-tune various # backing providers for Vagrant. These expose provider-specific options. # Example for VirtualBox: # # config.vm.provider "virtualbox" do |vb| # # Display the VirtualBox GUI when booting the machine # vb.gui = true # # # Customize the amount of memory on the VM: # vb.memory = "1024" # end # # View the documentation for the provider you are using for more # information on available options. # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies # such as FTP and Heroku are also available. See the documentation at # https://docs.vagrantup.com/v2/push/atlas.html for more information. # config.push.define "atlas" do |push| # push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME" # end # Enable provisioning with a shell script. Additional provisioners such as # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the # documentation for more information about their specific syntax and use. # config.vm.provision "shell", inline: <<-SHELL # sudo apt-get update # sudo apt-get install -y apache2 # SHELL end $ vagrant halt -- INSERT --``` ###試したこと ・$ vi vagrantfileを開いた状態でダブルクリックやドラッグしてみたらたまに文字が入力できたり削除できたりしたがなぜそうなったか不明 ・vagrantfileのendのあとにコピペで「$ vagrant halt」を入力したが反応なし。 ###補足情報(言語/FW/ツール等のバージョンなど) MacOS : 10.10.5 vagrant : 1.8.0 virtualboxバージョン 5.0.18 r106667 仮想環境のOS : CentOS7
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/04/27 08:26