mitchellh / boot2docker-vagrant-box

Packer scripts to build a Vagrant-compatible boot2docker box.
425 stars 183 forks source link

upgrade to boot2docker 0.5.4 #17

Closed drewcrawford closed 10 years ago

drewcrawford commented 10 years ago

Please cut a release after reviewing the patch as there is a downstream project affected.

ernoaapa commented 10 years ago

Hi @drewcrawford I tested your PR and the Vagrant box what it creates didn't work. Vagrant hangs to the point where it tries to take ssh connection. I find out that the final box didn't contain Vagrant public key in /var/lib/boot2docker/ssh/docker_authorized_keys and sshd_config even Packer says it runs provision script.

I debugged the build process and Packer creates those files to the VM, but when Packer creates Vagrant box from it, it doesn't take those changes in to the box.

Have you tested it? Any ideas what could cause this?

What versions you have? I have:

drewcrawford commented 10 years ago

@eaapa You're right. I just upgraded the ISO image and didn't test very thoroughly on the theory that the change was small, but that turns out to be possibly false.

Data wasn't being persisted. It's sort of a mystery to me why things apparently worked in earlier versions. It's possible something changed upstream between 0.4 and 0.5.4 to cause a break, but from a cursory perusal of upstream it's not immediately whether that can satisfactorily explain the breakage.

Anyway I have added a new patch that more closely follows upstream's documentation about persisting data and this time ssh actually works. You can build the normal way or poke at my prebuilt box.

ernoaapa commented 10 years ago

Thanks tested your prebuilt box and it worked.

The root cause is mystery though. Maybe @mitchellh or @steeve from boot2docker have idea for this?

ghost commented 10 years ago

Hi @drewcrawford @eaapa

https://github.com/mitchellh/boot2docker-vagrant-box/pull/18 I re-created persistent.vmdk in the same way as boot2docker. It worked.

steeve commented 10 years ago

Yes indeed, we completely re-wrote persistence in 0.5. You can check out this script: https://github.com/steeve/boot2docker/blob/master/rootfs/rootfs/etc/rc.d/automount

mitchellh commented 10 years ago

Thanks! I merged #18 since that includes the updated fix. And thanks @steeve for chiming in.