2017-12-31 45 views
0

안녕하세요.이 문제에 대해 조사해 주셔서 감사합니다. 최근에 새 워크 스테이션으로 전환 한 후 Vagrantfile이 작동하지 않는 것을 발견했습니다. 중요하다면 워크 스테이션은 새로운 것이지만 운영 체제 (RHEL 7.4)는 동일하게 유지됩니다. vagrant up을 실행할 때 방랑 (2.0.1)과 버추얼의 동일한 버전 (5.2)변소 : 다음 설정이 없어야합니다. ssh

오류가 나는 수신 오전 : 아래

There are errors in the configuration of this machine. Please fix 
the following errors and try again: 

vm: 
* The following settings shouldn't exist: ssh 

Vagrantfile, 그것은 (내가 처음 장치를 얻을 수 있다는 것을 언급 할 가치가있다 aggregation01) 문자열을 aggregation01.vm.ssh.insert_key = false으로 주석 처리하면 성공적으로 부팅됩니다. 그러나이 해결 방법은 다른 상자에 적용 할 때 일관성이 없습니다.

만 때문에 간결에 Vagrantfile의 첫 번째 ~ 80 라인을 보여, 전체 파일이 Vagrantfile

# -*- mode: ruby -*- 
# vi: set ft=ruby : 

# Spine-Leaf Architecture in a Multi-vendor Campus Access layer 
# 
# 
#       +---------------+   +---------------+ 
#       | aggregation01 |   | aggregation02 | 
#       +---------------+   +---------------+ 
#        |    \ /   | 
#        |    \/   | 
#        |    /\    | 
#        |   / \   | 
#       +---------------+   +---------------+ 
#       | spine01 |   | spine02 | 
#       +---------------+   +---------------+ 
#       /|  \  \ / /| \ 
#      / |   \ /\  / |  \ 
#     /  |  /\   /\   |  \ 
#    /   | /  \/  \ |   \ 
#   /    |/   / \   \|    \ 
#  /    / |  /   \   | \    \ 
# /    /  | /     \  |   \   \ 
# +--------------+  +---------------+   +---------------+  +--------------+ 
# | leaf01 |  | leaf02  |   | leaf03  |  | leaf04 | 
# +--------------+  +---------------+   +---------------+  +--------------+ 

arista = 'arista_vEOS_4_20' 
junos_pfe = 'juniper/vqfx10k-pfe' 
junos = 'juniper/vqfx10k-re' 
cumulus = 'CumulusCommunity/cumulus-vx' 

Vagrant.configure(2) do |config| 

    # ###################################### 
    # ### Define namespace for boxes ### 
    # ###################################### 
    # sp1 = "spine01" 
    # sp2 = "spine02" 
    # agg1 = "aggregation01" 
    # agg2 = "aggregation02" 
    # leaf01 = "leaf01" 
    # leaf01_pfe = "leaf01_pfe" 
    # leaf02 = "leaf02" 
    # leaf02_pfe = "leaf02_pfe" 
    # leaf03 = "leaf03" 
    # leaf03_pfe = "leaf03_pfe" 
    # leaf04 = "leaf04" 
    # leaf04_pfe = "leaf04_pfe" 
    wbid = ENV['USER'] 
    offset = 0 

    # ###################################### 
    # ### aggregation01 - build vm ### 
    # ###################################### 
    config.vm.define "aggregation01" do |aggregation01| 
    aggregation01.vm.ssh.insert_key = false 
    aggregation01.vm.hostname = "aggregation01" 
    aggregation01.vm.box = cumulus 
    aggregation01.vm.box_version = "3.5.0" 
    aggregation01.vm.provider "virtualbox" do |v| 
     v.name = "#{wbid}_aggregation01" 
     v.customize ["modifyvm", :id, '--audiocontroller', 'AC97', '--audio', 'Null'] 
     v.memory = 768 
    end 
    # see note here: https://github.com/pradels/vagrant-libvirt#synced-folders 
    aggregation01.vm.synced_folder ".", "/vagrant", disabled: true 
    # NETWORK INTERFACES 
    # link for swp1 --> spine01 
    aggregation01.vm.network "private_network", virtualbox__intnet: "aggregation01_spine01", auto_config: false , :mac => "a00000000161" 
    # link for swp2 --> spine02 
aggregation01.vm.network "private_network", virtualbox__intnet: "aggregation01_spine02", auto_config: false , :mac => "443839000143" 
    # link for swp3 --> tbd 
aggregation01.vm.network "private_network", virtualbox__intnet: "aggregation01_aggregation02", auto_config: false , :mac => "44383900014c" 
    aggregation01.vm.provider "virtualbox" do |vbox| 
     vbox.customize ['modifyvm', :id, '--nicpromisc2', 'allow-all'] 
     vbox.customize ['modifyvm', :id, '--nicpromisc3', 'allow-all'] 
     vbox.customize ['modifyvm', :id, '--nicpromisc4', 'allow-all'] 
     vbox.customize ["modifyvm", :id, "--nictype1", "virtio"] 
    end 
    # Fixes "stdin: is not a tty" and "mesg: ttyname failed : Inappropriate ioctl for device" messages --> https://github.com/mitchellh/vagrant/issues/1673 
    aggregation01.vm.provision :shell , inline: "(sudo grep -q 'mesg n' /root/.profile 2>/dev/null && sudo sed -i '/mesg n/d' /root/.profile 2>/dev/null) || true;", privileged: false 
     end 

답변

0

단순히 오류를 제거 할 수있는 줄에서 .vm을 떨어 뜨리고 생각에서 볼 될 수 있도록

aggregation01.vm.ssh.insert_key = false 

해야

aggregation01.ssh.insert_key = false 

다른 VM에도 마찬가지로 적용됩니다. 하지만 ssh 라인이 다르기 때문에 이미 git 저장소에서이 문제를 해결했을 것 같습니다.

리포지토리에있는 vagrantfile을 기반으로 처음 두 VM을 다시 만들려고했지만 오류없이 처리 할 수있었습니다. 그러나 .vm을 다시 입력하면 얻는 것과 같은 오류가 발생합니다.

관련 문제