Advertisement
Guest User

Untitled

a guest
Aug 15th, 2016
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.36 KB | None | 0 0
  1. I have a FreeBSD 10.3 virtual machine running inside a VirtualBox 5.1 box sitting on a Linux x86-64 (Ubuntu 16.04 LTS) host. I control the virtual machine via Vagrant 1.8.5. From the Linux command-line I say:
  2. ```sh
  3. $ cd ~/vagrant
  4. $ vagrant up
  5. ```
  6. ... to which the output is:
  7. ```sh
  8. Bringing machine 'default' up with 'virtualbox' provider...
  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: Authentication failure. Retrying...
  21. default: Warning: Authentication failure. Retrying...
  22. [skip approx 30 more instances of this Warning]
  23. default: Warning: Authentication failure. Retrying...
  24. Timed out while waiting for the machine to boot. This means that
  25. Vagrant was unable to communicate with the guest machine within
  26. the configured ("config.vm.boot_timeout" value) time period.
  27.  
  28. If you look above, you should be able to see the error(s) that
  29. Vagrant had when attempting to connect to the machine. These errors
  30. are usually good hints as to what may be wrong.
  31.  
  32. If you're using a custom box, make sure that networking is properly
  33. working and you're able to connect to the machine. It is a common
  34. problem that networking isn't setup properly in these boxes.
  35. Verify that authentication configurations are also setup properly,
  36. as well.
  37.  
  38. If the box appears to be booting properly, you may want to increase
  39. the timeout ("config.vm.boot_timeout") value.
  40. ```
  41. At this point, when I say:
  42. ```sh
  43. $ vagrant ssh
  44. Password for vagrant@localhost:
  45. ```
  46. ... I get a connection to the FreeBSD virtual machine. On that machine, I am initially logged in as user ```vagrant```, but then I can quickly ```login``` as myself.
  47. ```sh
  48. $ whoami
  49. vagrant
  50. $ pwd
  51. /usr/home/vagrant
  52. $ ls -al
  53. total 40
  54. drwxr-xr-x 2 vagrant vagrant 512 Aug 9 09:06 .
  55. drwxr-xr-x 4 root wheel 512 Aug 9 09:06 ..
  56. -rw-r--r-- 1 vagrant vagrant 1066 Aug 9 09:06 .cshrc
  57. -rw-r--r-- 1 vagrant vagrant 252 Aug 9 09:06 .login
  58. -rw-r--r-- 1 vagrant vagrant 163 Aug 9 09:06 .login_conf
  59. -rw------- 1 vagrant vagrant 379 Aug 9 09:06 .mail_aliases
  60. -rw-r--r-- 1 vagrant vagrant 336 Aug 9 09:06 .mailrc
  61. -rw-r--r-- 1 vagrant vagrant 817 Aug 9 09:06 .profile
  62. -rw------- 1 vagrant vagrant 281 Aug 9 09:06 .rhosts
  63. -rw-r--r-- 1 vagrant vagrant 978 Aug 9 09:06 .shrc
  64. $ login
  65. login: jkeenan
  66. Password:
  67. Last login: Mon Aug 15 22:14:28 on pts/0
  68. FreeBSD 10.3-RELEASE (GENERIC) #0 r297264: Fri Mar 25 02:10:02 UTC 2016
  69.  
  70. Welcome to FreeBSD!
  71. [# snip motd]
  72. $ pwd
  73. /usr/home/jkeenan
  74. ```
  75. And at this point I have one terminal with which I can do what I need to do on FreeBSD, viz., running smoke tests of the Perl 5 core distribution on FreeBSD 10.3.
  76.  
  77. Eventually, I want to log out of my user, out of FreeBSD, and halt vagrant.
  78. ```
  79. $ exit
  80. $ exit
  81. Connection to 127.0.0.1 closed.
  82. [vagrant] 47 $ vagrant halt
  83. ==> default: Attempting graceful shutdown of VM...
  84. default: Guest communication could not be established! This is usually because
  85. default: SSH is not running, the authentication information was changed,
  86. default: or some other networking issue. Vagrant will force halt, if
  87. default: capable.
  88. ==> default: Forcing shutdown of VM...
  89. ```
  90. Typically, I don't need to let ```vagrant up``` print that Warning out 30+ times. If I ```Ctrl-C``` after just one instance of the warning, I get this output:
  91. ```sh
  92. default: SSH auth method: private key
  93. default: Warning: Authentication failure. Retrying...
  94. ^C==> default: Waiting for cleanup before exiting...
  95. Vagrant exited after cleanup due to external interrupt.
  96. ```
  97. ... but then I can say ```vagrant ssh``` and get logged into the FreeBSD VM as before.
  98. ```sh
  99. [vagrant] 49 $ vagrant ssh
  100. Password for vagrant@localhost:
  101. ```
  102.  
  103. Needless to say, my objective is to have ```vagrant up``` work smoothly, i.e., it should make whatever connection it needs to make to the VM quickly and without 30+ warnings and timing out. It should return to successfully and enable me to say ```vagrant ssh``` more quickly.
  104.  
  105. How do I achieve that objective?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement