cloudfoundry-attic / cfdev

A fast and easy local Cloud Foundry experience on native hypervisors, powered by LinuxKit with VPNKit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`cf dev start` failed on centos 7

goodtiding5 opened this issue · comments

I think this is identical to issue #109. Issue #109 was closed without any comments or suggestions, so I am filing it again.

I tried to install cfdev on a centos 7 virtual machine under vmware. Intel vt-x is enabled. RAM is 8G and HD is 100G.

$ modprobe msr
$ rdmsr 0x3a
5

CF is installed according to the instruction for centos.

$ cf version
cf version 6.47.0+fc6aad7f8.2019-10-15

Now when I try to start cfdev, it always fails at the same location:

cf dev start -f pcfdev*.tgz
Downloading Resources...
Progress: |====================>| 100.0%
Setting State...
WARNING: PCF Dev requires 8192 MB of RAM to run. This machine may not have enough free RAM.
Creating the VM...
Starting the VM...
Fetching VM Address...
FAILED
cf dev start: unexpected end of JSON input

The log file shows:

$ cat $HOME/.cfdev/log/linuxkit.log
UEFI Interactive Shell v2.2
EDK II
UEFI v2.70 (EDK II, 0x00010000)
Mapping table
     BLK0: Alias(s):
          PciRoot(0x0)/Pci(0x1F,0x0)/Floppy(0x0)
     BLK1: Alias(s):
          PciRoot(0x0)/Pci(0x1F,0x0)/Floppy(0x1)
Press ESC in 1 seconds to skip startup.nsh or any other key to continue.
Shell> [root@localhost log]

This is a fresh centos 7 installation with all the qemu packages installed.

For reference, cfdev version is:

$ cf dev version
CLI: 0.0.17
BUILD: 14 (b36c82e)

pas: 2.4.4
p.mysql: 2.5.3-build.7
p.redis: 2.0.1
p.rabbitmq: 1.15.5
p.spring-cloud-services: 2.0.7

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/169213913

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

hi
I have exactly the same issue, already spent 2 days trying to make it working but still fails.
My VM is on vbox current version with 12G of ram and 4vcpu attached (50G storage).
All necessary (and also not mentioned like epel repo must be added for qemu-system-x86_64 to be in PATH) steps done.
many other suggestions from net tested - but no use
maybe it has something to do with this entry in messages:

Mar 15 07:06:26 localhost sudo:    root : TTY=pts/2 ; PWD=/root ; USER=root ; COMMAND=/bin/cat /var/lib/libvirt/dnsmasq/virbr0.status
file is empty

if you need more details I should check then let me know here

root@localhost log]# cf version
cf version 6.50.0+4f0c3a2ce.2020-03-03

root@localhost log]# cf dev version
CLI: 0.0.17
BUILD: 14 (b36c82e)

cf: v11.2.0
cf-mysql: 36.19.0
[root@localhost log]# 
Mar 15 07:04:26 localhost systemd: Started Network Manager Script Dispatcher Service.
Mar 15 07:04:26 localhost nm-dispatcher: req:1 'up' [cfdevtap0]: new request (4 scripts)
Mar 15 07:04:26 localhost nm-dispatcher: req:1 'up' [cfdevtap0]: start running ordered scripts...
Mar 15 07:04:26 localhost systemd: Reloading.
Mar 15 07:04:26 localhost systemd: Reloading.
Mar 15 07:04:26 localhost systemd: Unit iscsi.service cannot be reloaded because it is inactive.
Mar 15 07:04:26 localhost systemd: Started CF Dev managed service for 'org.cloudfoundry.cfdev.linuxkit'.
Mar 15 07:04:27 localhost kernel: IPv6: ADDRCONF(NETDEV_CHANGE): cfdevtap0: link becomes ready
Mar 15 07:04:27 localhost kernel: virbr0: port 2(cfdevtap0) entered blocking state
Mar 15 07:04:27 localhost kernel: virbr0: port 2(cfdevtap0) entered listening state
Mar 15 07:04:29 localhost kernel: virbr0: port 2(cfdevtap0) entered learning state
Mar 15 07:04:31 localhost kernel: virbr0: port 2(cfdevtap0) entered forwarding state
Mar 15 07:04:31 localhost kernel: virbr0: topology change detected, propagating
Mar 15 07:04:31 localhost NetworkManager[1254]: <info>  [1584270271.1023] device (virbr0): carrier: link connected
Package dnsmasq-2.76-10.el7_7.1.x86_64 already installed and latest version
Package 2:qemu-2.0.0-1.el7.6.x86_64 already installed and latest version
Package 10:qemu-kvm-1.5.3-167.el7_7.4.x86_64 already installed and latest version
Package libvirt-4.5.0-23.el7_7.5.x86_64 already installed and latest version

Package dnsmasq-2.76-10.el7_7.1.x86_64 already installed and latest version
Package 2:qemu-2.0.0-1.el7.6.x86_64 already installed and latest version
Package 10:qemu-kvm-1.5.3-167.el7_7.4.x86_64 already installed and latest version
Package libvirt-4.5.0-23.el7_7.5.x86_64 already installed and latest version

linuxkit.log:

UEFI Interactive Shell v2.2
EDK II
UEFI v2.70 (EDK II, 0x00010000)
Mapping table
     BLK0: Alias(s):
          PciRoot(0x0)/Pci(0x1F,0x0)/Floppy(0x0)
     BLK1: Alias(s):
          PciRoot(0x0)/Pci(0x1F,0x0)/Floppy(0x1)
Press ESC in 1 seconds to skip startup.nsh or any other key to continue.
Shell> 

I tried with ubuntu 18.04.
extended memory to 16G on VM cause it was almost reaching 12G during startup (and failed).

After all it fails later when trying to deploy BOSH:

root@ubuntu:~# cf dev start
Downloading Resources...
Progress: |====================>| 100.0%
Setting State...
Creating the VM...
Starting the VM...
Fetching VM Address...
Waiting for the VM...
Deploying the BOSH Director...
FAILED
cf dev start: Failed to deploy the BOSH Director: Process exited with status 1

output files:
deploy-bosh.log
linuxkit.log


  Compiling package 'health_monitor/c5a852ce964ec9a288577ec50f2092c42efe880f'... Skipped [Package already compiled] (00:00:03)
   Compiling package 'nginx/5a68865452a3bdcc233867edbbb59c1e18658f6b'... Skipped [Package already compiled] (00:00:01)
   Compiling package 's3cli/3097f27cb9356172c9ae52de945821c4e338c87a'... Skipped [Package already compiled] (00:00:01)
   Updating instance 'bosh/0'... Finished (00:01:46)
   Waiting for instance 'bosh/0' to be running... Failed (00:07:39)
 Failed deploying (00:13:42)
 
 Stopping registry... Finished (00:00:00)
 Cleaning up rendered CPI jobs... Finished (00:00:00)
 
 
 Deploying:
   Received non-running job state: 'failing'
 Exit code 1
 root@ubuntu:~/.cfdev/log# 

I apologize if this was not made clear earlier, but the only Linux distro that CF Dev is currently supported for is Ubuntu.


From the looks of your latest logs @ryzior, it looks like there were resource constraints during the provisioning process.

extended memory to 16G on VM cause it was almost reaching 12G during startup (and failed).

Are you trying to run cf dev start from within a VM? If so, that's also not supported. CF Dev spins up its own VM using native hypervisors. This is an intensive process and performance will greatly suffer when not running on native hardware.

hi
I started with ubuntu on VM (vmware player and vbox from oracle) after realized no hypervisor available on my Home version of win10 (laptop). I tried centos 6 then 8 finally 7, then moved to my other pc cause my laptop 16G ram was unable to carry this load(12G vm is too much). there I started to work with centos 7 12G VM and then 16G then moved to ubuntu with same specs (16G ram and 4 cores). the speed was poor however I cannot blame my host which was utilized 25% cpu and 16 Gigs of RAM (out of 64). result you can see.
Anyway - I had no idea I cannot use VM at all (despite the system installed)
Fortunately my pc is 10 Pro - hypervisor available , installed , CF DEV installed but I have issues to connect to it. I can ping but cannot connect to 443 port. Switching off Norton firewall - no help.
Since it is now running on win 10 pro - I can investigate this , thanks for your clarifications about the limitations but as you can see this was the only way I could try to install DEV on lowend windows version :)
regards

If you're unable to resolve your connection issues, please make a separate issue.