cloudfoundry-attic / cfdev

A fast and easy local Cloud Foundry experience on native hypervisors, powered by LinuxKit with VPNKit
Apache License 2.0
227 stars 64 forks source link

Can't run cfdev on Linux Mint 19.1 #104

Closed wjbaird closed 5 years ago

wjbaird commented 5 years ago

Hi there,

I've followed the instructions on the main cfdev page, and additionally followed the instructions to set up kvm as recommended here: https://lists.cloudfoundry.org/g/cf-dev/topic/31075762 - but when I run "cf dev start", I get the following:

$ cf dev start
Downloading Resources...
Progress: |====================>| 100.0%
Setting State...
Error: argument "virbr0" is wrong: Device does not exist

Cannot find device "virbr0"
Creating the VM...
Starting the VM...
Fetching VM Address...
FAILED
cf dev start: exit status 1

Any suggestions?

cf-gitbot commented 5 years ago

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

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

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

aemengo commented 5 years ago

virbr0 is the default network adapter installed by libvirt. Is that installed on your system as written in README?

Also please understand that our Linux configuration has only been tested on Ubuntu.

alexo134 commented 5 years ago

Try virsh net-list to see if default network is on the list:

# virsh net-list
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 default              active     yes           yes
 docker-machines      active     yes           yes
 vagrant-libvirt      active     yes           yes

when it's not active try:

virsh net-start default
virsh net-autostart default

I assume that libvirtd daemon is already running:

service libvirtd start
wjbaird commented 5 years ago

@aemengo - I did install libvirt

dpkg -l libvirt*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  libvirt-bin    4.0.0-1ubunt amd64        programs for the libvirt library
ii  libvirt-client 4.0.0-1ubunt amd64        Programs for the libvirt library
ii  libvirt-daemon 4.0.0-1ubunt amd64        Virtualization daemon
un  libvirt-daemon <none>       <none>       (no description available)
un  libvirt-daemon <none>       <none>       (no description available)
un  libvirt-daemon <none>       <none>       (no description available)
un  libvirt-daemon <none>       <none>       (no description available)
ii  libvirt-daemon 4.0.0-1ubunt amd64        Libvirt daemon configuration file
ii  libvirt-glib-1 1.0.0-1      amd64        libvirt GLib and GObject mapping 
ii  libvirt0:amd64 4.0.0-1ubunt amd64        library for interfacing with diff

Linux Mint is based on Ubuntu - 19.1 is based on Ubuntu Bionic, so I'd be a bit surprised if there were major differences. @alexo134 - libvirtd seems to be running:

service libvirtd status
● libvirtd.service - Virtualization daemon
   Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; vendor preset:
   Active: active (running) since Thu 2019-06-06 07:26:23 EDT; 1 day 7h ago
     Docs: man:libvirtd(8)
           https://libvirt.org
 Main PID: 1035 (libvirtd)
    Tasks: 17 (limit: 32768)
   CGroup: /system.slice/libvirtd.service
           └─1035 /usr/sbin/libvirtd

but virsh net-start default gives me an error:

error: Failed to start network default
error: internal error: Failed to initialize a valid firewall backend
wjbaird commented 5 years ago

Whoops - sorry, I'm a github noob - I assumed that using the 'code' mode would preserve formatting, but apparently I messed something up... I've attached a text file with the output from the previous comment in what will hopefully be a more readable form comments.txt

wjbaird commented 5 years ago

OK - the error on 'virsh net-start default' led me to this page: https://superuser.com/questions/1063240/libvirt-failed-to-initialize-a-valid-firewall-backend which suggested also installing ebtables, firewalld and dnsmasq - I did that, restarted libvirttd and now I'm at least getting further along - it's in the processes of deploying CF...

I'll leave this open in case you want to use it to track any doc updates about needing additional packages, but feel free to close if you like...

Thanks for your help!

aemengo commented 5 years ago

Thank you so much for documenting the steps you took! This is going to be a big value for anyone who encounters this in the future.

Since you were able to get passed the specific error message that the issue was about, I'll close this to keep it succinct.