vmware-archive / pcfdev

This is the depricated version of PCF Dev - please visit the current Github repository https://github.com/cloudfoundry-incubator/cfdev for the latest updates
Apache License 2.0
273 stars 67 forks source link

Cannot start cf dev vm, fails adding dvd drive #346

Closed alberto-riggi closed 6 years ago

alberto-riggi commented 6 years ago

Hi All,

Trying to install cf dev on windows 10. While executing cf dev start -f "pcfdev-pas.v.2.0.20.0-build.0.82.0.iso" I get

Setting up IP aliases for the BOSH Director & CF Router (requires administrator privileges) Downloading Resources... Creating the VM...=============>| 100.0% FAILED cf dev start: creating the vm: adding dvd drive C:\Users\Alberto Riggi.cfdev\cache\cfdev-efi.iso: exit status 1

I can see the vm is created in hyper v but it doesn't have. Not sure where to look for logs.

Thanks and regards

cf-gitbot commented 6 years ago

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

ssisil commented 6 years ago

hi @alberto-riggi - can you run cf dev logs and then post the last the logs here

aemengo commented 6 years ago

I'm a little worried about the filepath displayed in the terminal output. Is C:\Users\Alberto Riggi.cfdev a real path on your file-system? Did you manipulate any cf-specific environment variables before executing the cf dev start command?

alberto-riggi commented 6 years ago

@ssisil Hi, this is the output. FAILED failed to fetch cfdev logs: Post http://api/containers: dial tcp [::1]:8888: connectex: No connection could be made because the target machine actively refused it.

alberto-riggi commented 6 years ago

@aemengo Oh, I didn't notice it. The real path should contain a "\" C:\Users\Alberto Riggi.cfdev

alberto-riggi commented 6 years ago

@aemengo and no I didn't change any env var

alberto-riggi commented 6 years ago

@aemengo oh, it's this editor that's eating the back slash in the message it actually contains the right path C:\Users\Alberto Riggi\ .cfdev (just added a space here so that it can be displayed)

alberto-riggi commented 6 years ago

I tried to run manually in ps the command that's in the function addVhdDrive Add-VMDvdDrive -VMName cfdev -Path "C:\Users\Alberto Riggi.cfdev\cache\cfdev-efi.iso"

It didn't give error. Could it be related to the space in the path? (Alberto Riggi)

alberto-riggi commented 6 years ago

@ssisil @aemengo I changed the CFDEV_HOME env var and it was able to pass that point. I guess that code needs to pass the path in between quotes. I'll see if I'm able to test it locally (no experience with go) and do a pull request.

aemengo commented 6 years ago

@alberto-riggi Apologies for the late reply, we're quite busy trying to make the cfdev experience even better 😄 . Thank you so much for helping us look into it.

We'd appreciate a PR, but building the plugin is unfortunately not very intuitive. For now, we definitely should be putting all HOME references in quotes. We'll make sure to address that soon.

alberto-riggi commented 6 years ago

Hi, I got another error. Same error using both cf dev start or cf dev start -f ""

PS C:\Windows\system32> cf dev start Setting up IP aliases for the BOSH Director & CF Router (requires administrator privileges) Downloading Resources... Creating the VM...=============>| 100.0% Starting VPNKit... Starting the VM... Waiting for Garden... Deploying the BOSH Director... Deploying CF... Uploading ReleasesFAILED cf dev start: Failed to deploy services: unable to parse bosh config: yaml: line 1: mapping values are not allowed in this context PS C:\Windows\system32>

Where should I look for this config? The logs show that task 62 completed and then it started creating security roles and groups. Here an exctract of the last lines. extract.txt

Any suggestion?

Regards

aemengo commented 6 years ago

@alberto-riggi We've seen that behavior and are working an a release soon for it. But your best bet for now is to do:

cf dev stop # to clean any leftover resources
cf dev start -m 8192 # to allocate more than the default memory

Please let us know how it goes.

alberto-riggi commented 6 years ago

:( same output

PS C:\Windows\system32> cf dev stop PS C:\Windows\system32> cf dev start -m 8192 Setting up IP aliases for the BOSH Director & CF Router (requires administrator privileges) Downloading Resources... Creating the VM...=============>| 100.0% Starting VPNKit... Starting the VM... Waiting for Garden... Deploying the BOSH Director... Deploying CF... Uploading ReleasesFAILED cf dev start: Failed to deploy services: unable to parse bosh config: yaml: line 1: mapping values are not allowed in this context PS C:\Windows\system32>

aemengo commented 6 years ago

@alberto-riggi I know this is hard to hear but this is very likely due to flaky bug that will be resolved in our upcoming release. If you are willing, you could follow the following instructions a couple more times (perhaps in a new Powershell session) and it will eventually work.

cf dev stop # to clean any leftover resources
cf dev start -m 8192 # to allocate more than the default memory

But the good news is that, although provisioning did not complete 'till the very end, your local Cloud Foundry deployment should be up and available for use. Here's the interaction instructions that you would have seen.


      ██████╗███████╗██████╗ ███████╗██╗   ██╗
     ██╔════╝██╔════╝██╔══██╗██╔════╝██║   ██║
     ██║     █████╗  ██║  ██║█████╗  ██║   ██║
     ██║     ██╔══╝  ██║  ██║██╔══╝  ╚██╗ ██╔╝
     ╚██████╗██║     ██████╔╝███████╗ ╚████╔╝
      ╚═════╝╚═╝     ╚═════╝ ╚══════╝  ╚═══╝
                 is now running!

    To begin using CF Dev, please run:
        cf login -a https://api.dev.cfdev.sh --skip-ssl-validation

    Admin user => Email: admin / Password: admin
    Regular user => Email: user / Password: pass
aemengo commented 6 years ago

Thanks very much for your assistance with this. This issue has been addressed in the following commit: https://github.com/cloudfoundry-incubator/cfdev/commit/3a112b3bc1f4119f667554a57718cb15415c893c

Be on the lookout for our next release. In the future, please use the repository at https://github.com/cloudfoundry-incubator/cfdev, as this repository is no longer maintained

alberto-riggi commented 6 years ago

Thanks! And yes, the local cf is available.

Regards