Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

firstboot_pkgs_list will not work if behind a proxy #17

Closed
tardyp opened this issue Sep 7, 2016 · 8 comments
Closed

firstboot_pkgs_list will not work if behind a proxy #17

tardyp opened this issue Sep 7, 2016 · 8 comments

Comments

@tardyp
Copy link

tardyp commented Sep 7, 2016

Trying to make this work behind a corporate proxy, I finally figured out that the box can't work because sudo will never be installed.

I can boot by CTR-C in the console, but will never be able to sudo in this box.

Note that I could work around that by using the root password "vagrant"

@tardyp
Copy link
Author

tardyp commented Sep 7, 2016

because of issue with ansible, I cannot automate installation of sudo :-(

ansible/ansible#12537

@brd
Copy link
Owner

brd commented Sep 7, 2016

You could set the proxy in the environment so that it will be used.

@tardyp
Copy link
Author

tardyp commented Sep 8, 2016

Yes, I can set the proxy in the environment, and this works.
But I cannot fully automate the vagrant provisioning with this. I need to make some manual setup after vagrant up.

You can see how I am using this vagrant image: buildbot/buildbot-infra#148

and the note about proxies:
+Development with proxies
+------------------------
+Because of #17 the boostrap will not work.
+upon VM creation by vagrant, vagrant will indefinitly try to connect via ssh.
+- You need to run virtualbox manually, and go to the freebsd console.
+- Hit CTRL-C will stop the firstboot script and give you login prompt
+- use root:vagrant
+- setenv http_proxy http://xxx
+- pkg install -y sudo
+- then you can run 'vagrant provision' again
+

@brd
Copy link
Owner

brd commented Sep 8, 2016

I am suggesting you modify the packer recipe to add the proxy to the environment as part of the install. That way when it boots for the first time, the proxy is already set.

@tardyp
Copy link
Author

tardyp commented Sep 8, 2016

well having to build my own version of the VM defeast the purpose of using your cool prebuilt ones :)

wouldn't it be possible to do the first boot as part of the packer recipe, so that the VM is already initialized?

@brd
Copy link
Owner

brd commented Sep 8, 2016

I am confused. If you are using this packer recipe you are building your own VM.

@tardyp
Copy link
Author

tardyp commented Sep 8, 2016

I am using https://atlas.hashicorp.com/freebsd/boxes/FreeBSD-10.3-STABLE which I understand is generated using this reciepe

@brd
Copy link
Owner

brd commented Sep 8, 2016

No. That is generated by the FreeBSD make release process, which does not use packer at all.

@brd brd closed this as completed Sep 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants