Bug 1310802

Summary: Vagrant libvirt no longer able to create/re-start vms with custom network
Product: [Fedora] Fedora Reporter: Devan Goodwin <dgoodwin>
Component: vagrant-libvirtAssignee: Vít Ondruch <vondruch>
Status: CLOSED DEFERRED QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: dima85, madam, pvalena, strzibny, vondruch
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-10 13:46:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Custom libvirt network definition
none
Sample vagrantfile using a custom network none

Description Devan Goodwin 2016-02-22 16:59:59 UTC
Created attachment 1129409 [details]
Custom libvirt network definition

Description of problem:

Attempting to vagrant up after a recent dnf update yeilds:

Network openshift is not available. Specify available network
name, or an ip address if you want to create a new network.

Version-Release number of selected component (if applicable):

Problem surfaced after a dnf update that included:

vagrant-libvirt-0.0.30-5.fc23.noarch
vagrant-1.7.4-2.fc23.noarch
libvirt-daemon-1.2.18.2-1.fc23.x86_64

How reproducible:

Very.

Steps to Reproduce:
1. Define a custom libvirt network similar to: 

virsh net-define /etc/libvirt/qemu/networks/openshift.xml
virsh net-start openshift
virsh net-autostart openshift

My openshift.xml network definition will be attached.


2. Issue vagrant up on any vm which tries to use this custom network. Will attach sample Vagrantfile.


Actual results:

$ sudo vagrant up     
Bringing machine 'origin' up with 'libvirt' provider...
==> origin: Uploading base box image as volume into libvirt storage...
==> origin: Creating image (snapshot of base box volume).
==> origin: Creating domain with the following settings...
==> origin:  -- Name:              fedoradev_origin
==> origin:  -- Domain type:       kvm
==> origin:  -- Cpus:              1
==> origin:  -- Memory:            4096M
==> origin:  -- Management MAC:    
==> origin:  -- Loader:            
==> origin:  -- Base box:          fedora-23
==> origin:  -- Storage pool:      default
==> origin:  -- Image:             /var/lib/libvirt/images/fedoradev_origin.img (41G)
==> origin:  -- Volume Cache:      default
==> origin:  -- Kernel:            
==> origin:  -- Initrd:            
==> origin:  -- Graphics Type:     vnc
==> origin:  -- Graphics Port:     5900
==> origin:  -- Graphics IP:       127.0.0.1
==> origin:  -- Graphics Password: Not defined
==> origin:  -- Video Type:        cirrus
==> origin:  -- Video VRAM:        9216
==> origin:  -- Keymap:            en-us
==> origin:  -- Disks:         vdb(qcow2,10G)
==> origin:  -- Disk(vdb):     /var/lib/libvirt/images/fedoradev_origin-vdb.qcow2
==> origin:  -- INPUT:             type=mouse, bus=ps2
==> origin:  -- Command line : 
==> origin: Creating shared folders metadata...
Network openshift is not available. Specify available network
name, or an ip address if you want to create a new network.




Additional info:

Was working fine until this recent upgrade. The network appears to exist:

$ virsh net-list                                                                                                     
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 default              active     yes           yes
 openshift            active     yes           yes
 vagrant-libvirt      active     yes           yes


If the vagrant vm was pre-existing (before the dnf update) I can re-start it fine with regular libvirt tooling and the network is functioning properly, so the problem appears isolated to something in the vagrant toolchain.

Comment 1 Devan Goodwin 2016-02-22 17:01:07 UTC
Created attachment 1129410 [details]
Sample vagrantfile using a custom network

Comment 2 Vít Ondruch 2016-08-08 11:54:28 UTC
Is this still an issue with recent Vagrant (i.e. Vagrant 1.8.5 on F25+)? I yes, would you mind to report this upstream? I am afraid I don't have the knowledge to dig into this.

Comment 3 Devan Goodwin 2016-08-10 13:46:15 UTC
I stopped using custom network's in my setup so will close for now.