Project

General

Profile

Actions

Bug #2477

closed

Wrong interface for libvirt bridge

Added by Dan Ellis almost 12 years ago. Updated almost 12 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Compute resources
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

I'm trying to provision a KVM VM via the Libvirt compute resource. It fails on save, though, due to trying to add a vnet* interface to a bridge called eth0. Looking at the code, I see that in lib/foreman/model/libvirt.rb, the networks method is calling client.interfaces. Using Fog from irb, I get this:

irb(main):004:0> c.interfaces
=>   <Fog::Compute::Libvirt::Interfaces
    [
      <Fog::Compute::Libvirt::Interface
        name="eth0",
        mac="14:da:e9:06:22:20",
        active=true
      >
    ]
  >

That's also the name shown in the Network field in the Virtual Machine tab. I believe that it should instead be calling client.networks, which gives this:

irb(main):005:0> c.networks
=>   <Fog::Compute::Libvirt::Networks
    [
      <Fog::Compute::Libvirt::Network
        uuid="84bbbed3-01f2-f611-6ce1-85377c01d34e",
        name="kvm",
        bridge_name="virbr1",
        xml=nil
      >,
      <Fog::Compute::Libvirt::Network
        uuid="92048786-3763-01e0-c361-7f2d08e31c40",
        name="default",
        bridge_name="virbr0",
        xml=nil
      >
    ]
  >

virbr1 is the option I would want to choose, as that's the VM bridge.


Related issues 1 (0 open1 closed)

Is duplicate of Foreman - Feature #1951: Support libvirt named NAT networksClosedOhad Levy11/15/2012Actions
Actions #1

Updated by Dan Ellis almost 12 years ago

This is in version 1.1stable.

Actions #2

Updated by Dominic Cleal almost 12 years ago

  • Status changed from New to Duplicate

Duplicate of #1951, this affects me too.

Actions

Also available in: Atom PDF