Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Vagrant - początki nauki
Forum PHP.pl > Forum > Kontrola i zarządzanie projektami
trzczy
Muszę uruchomić vagranta (nie dockera). Mam błąd:



  1. m@my:~/Desktop/MV$ vagrant up
  2. Bringing machine 'default' up with 'virtualbox' provider...
  3. ==> default: Checking if box 'peterrehm/xenial-php71' is up to date...
  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 (guest) => 2222 (host) (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. Timed out while waiting for the machine to boot. This means that
  16. Vagrant was unable to communicate with the guest machine within
  17. the configured ("config.vm.boot_timeout" value) time period.
  18.  
  19. If you look above, you should be able to see the error(s) that
  20. Vagrant had when attempting to connect to the machine. These errors
  21. are usually good hints as to what may be wrong.
  22.  
  23. If you're using a custom box, make sure that networking is properly
  24. working and you're able to connect to the machine. It is a common
  25. problem that networking isn't setup properly in these boxes.
  26. Verify that authentication configurations are also setup properly,
  27. as well.
  28.  
  29. If the box appears to be booting properly, you may want to increase
  30. the timeout ("config.vm.boot_timeout") value.
  31. m@my:~/Desktop/MV$ vagrant init peterrehm/xenial-php71


Nie wiem jak zmienić limit:
Vagrantfile:
  1. (...) # documentation for more information about their specific syntax and use.
  2. # config.vm.provision "shell", inline: <<-SHELL
  3. # apt-get update
  4. # apt-get install -y apache2
  5. # SHELL
  6.  
  7.  
  8. config.vm.boot_timeout 1000
  9.  


  1. m@my:~/Desktop/MV$ vagrant up
  2. There was an error loading a Vagrantfile. The file being loaded
  3. and the error message are shown below. This is usually caused by
  4. a syntax error.
  5.  
  6. Path: /home/m/Desktop/MV/Vagrantfile
  7. Line number: 73
  8. Message: NameError: undefined local variable or method `config' for main:Object
  9. m@my:~/Desktop/MV$


Co radzicie?
Z góry dziękuję
Pyton_000
wstaw przed `end`
trzczy
Cytat(Pyton_000 @ 7.04.2018, 08:38:21 ) *
wstaw przed `end`

Na to już wpadłem, ale nie mogłem edytować postu, bo się robiła kaszana z postu. Jakiś bug foralny.

Udało mi się uruchomić. Wcześniej zrobiłem to:
  1. m@my:~/Desktop/VM$ sudo apt install virtualbox virtualbox-ext-pack


No i potem tak:


  1. m@my:~/Desktop/VM$ cat Vagrantfile; vagrant up
  2. Vagrant.configure("2") do |config|
  3. config.vm.box = "peterrehm/xenial-php71"
  4. config.vm.boot_timeout = 1000
  5. config.vm.provider "virtualbox" do |vb|
  6. vb.gui = true
  7. Bringing machine 'default' up with 'virtualbox' provider...
  8. ==> default: Checking if box 'peterrehm/xenial-php71' is up to date...
  9. ==> default: Clearing any previously set forwarded ports...
  10. ==> default: Clearing any previously set network interfaces...
  11. ==> default: Preparing network interfaces based on configuration...
  12. default: Adapter 1: nat
  13. ==> default: Forwarding ports...
  14. default: 22 (guest) => 2222 (host) (adapter 1)
  15. ==> default: Booting VM...
  16. ==> default: Waiting for machine to boot. This may take a few minutes...
  17. default: SSH address: 127.0.0.1:2222
  18. default: SSH username: vagrant
  19. default: SSH auth method: private key
  20. default: Warning: Connection reset. Retrying...
  21. default: Warning: Remote connection disconnect. Retrying...
  22. default: Warning: Connection reset. Retrying...
  23. default: Warning: Remote connection disconnect. Retrying...
  24. ==> default: Machine booted and ready!
  25. ==> default: Checking for guest additions in VM...
  26. ==> default: Mounting shared folders...
  27. default: /vagrant => /home/m/Desktop/VM
  28. ==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
  29. ==> default: flag to force provisioning. Provisioners marked to run always will still run.
  30. m@my:~/Desktop/VM$
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2018 Invision Power Services, Inc.