brandon-rhodes / fopnp

Foundations of Python Network Programming (Apress) — scripts and examples
1.37k stars 640 forks source link

Can't launch VM #3

Closed simkus9 closed 9 years ago

simkus9 commented 9 years ago

Failed to open a session for the virtual machine playground-vm.

NamedPipe#0 failed to bind to local socket /home/brandon/.boot2docker/boot2docker-vm.sock (VERR_FILE_NOT_FOUND).

Result Code: NS_ERROR_FAILURE (0x80004005) Component: Console Interface: IConsole {8ab7c520-2442-4b66-8d74-4ff1e195d2b6}

sjdaigle commented 9 years ago

Same error here, running Network Playground 1.0 (Oct. 25 release) on VirtualBox 4.3.20 r96966 on OS X 10.9.5.

brandon-rhodes commented 9 years ago

Thanks for letting me know that you are having the problem too, @sjdaigle! I have been on the road this last month, but should soon be back home and have access to a machine that is much better at spinning up virtual machines than this tiny travel laptop that I carry. (Hmm — though if things work fine, then I guess I will have to try to find a Mac to try the Playground on!)

sjdaigle commented 9 years ago

Hi Brandon,

Thanks so much for the follow up email! I am very excited about your book and about the whole concept of simulating the Internet, end users and websites with 12 VMs. I am new to Python but programmed professionally for about 3 years on small projects 20 years ago. Your approach resonated with me so I am looking forward to getting the playground up and running!

Best,

Steve

Sent from my iPhone

On Jan 14, 2015, at 9:10 PM, Brandon Rhodes notifications@github.com wrote:

Thanks for letting me know that you are having the problem too, @sjdaigle! I have been on the road this last month, but should soon be back home and have access to a machine that is much better at spinning up virtual machines than this tiny travel laptop that I carry. (Hmm — though if things work fine, then I guess I will have to try to find a Mac to try the Playground on!)

— Reply to this email directly or view it on GitHub.

jgoerzen commented 9 years ago

That error can be trivially worked around by disabling the serial port in the VM config. However, the bigger issue is that the included disk image is not actually bootable. It seems to lack a proper bootloader and kernel.

jgoerzen commented 9 years ago

It appears that the missing bit here is to download boot2docker.iso from https://github.com/boot2docker/boot2docker/releases and attach it to the VM config before booting the VM, as the VMDK does not contain an OS. That fixes it!

bayendor commented 9 years ago

Any further movement on this issue? Excited to get the playground up and running on OSX. I have boot2docker and the playground 1.0 ova, but the system does not start properly and generates the same errors.

kayji commented 9 years ago

So how do you fix this issue then?

brandon-rhodes commented 9 years ago

All right!

After months of trying to work around this problem — and after several conversations with people who have more experience with virtualization than I do — I have deprecated my original scheme of distributing a bare VirtualBox image and expecting it to run across multiple operating systems correctly, especially with network forwarding turned on.

I have just rebuilt, repackaged, and re-uploaded the Playground as a Vagrant box, because Vagrant had a reputation for doing a better job of supporting cross-platform image support than do any of the raw native back-end mechanisms for virtualization like VirtualBox.

I have amended the Playground instructions to explain starting up a Vagrant box:

https://github.com/brandon-rhodes/fopnp/tree/m/playground

Could you try out the instructions and let me know if they work on your platform and, if not, at which step they fail? Thanks so much!

bayendor commented 9 years ago

I have this working on the first try, on OS X 10.10.5, Vagrant 1.7.2, Virtualbox 4.3.30. All example commands in the README file were executed and returned the expected results.

brandon-rhodes commented 9 years ago

WONDERFUL! Sorry that this took so long, everyone — virtualization across multiple platforms is not my specialty and it was a bit of reach for me to have tried this in the first place. I am going to close this particular issue, but please open a new one if the new scheme fails for you, including the error message so that I can try tackling it — thanks!