Bug 846326 - ovirt-node: persistent libvirt network definitions do not persist after boot
ovirt-node: persistent libvirt network definitions do not persist after boot
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ovirt-node (Show other bugs)
6.3
Unspecified Unspecified
urgent Severity urgent
: rc
: ---
Assigned To: Mike Burns
Virtualization Bugs
: ZStream
Depends On:
Blocks: 855363
  Show dependency treegraph
 
Reported: 2012-08-07 09:22 EDT by Dan Kenigsberg
Modified: 2016-04-26 11:05 EDT (History)
15 users (show)

See Also:
Fixed In Version: ovirt-node-2.5.0-5.el6
Doc Type: Bug Fix
Doc Text:
When connected to libvirtd running on an ovirt-node, modified libvirt network definitions were applied correctly to a live host but did not persist after a reboot. The network definitions are now stored in /etc/libvirt/qemu/networks and persists at each reboot of the host.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-28 11:37:50 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Dan Kenigsberg 2012-08-07 09:22:04 EDT
Description of problem:
If someone connects to libvirtd running on ovirt-node and issues a

  virsh -c <libvirt.url> net-define bla.xml

a new network definition is created and stored under /var/lib/libvirt/network. `virsh net-info bls` would list the network as persistent. However, after reboot, the network is there no more.

vdsm could theoretically become root, dig into libvirt's internals, and call ovirt_store_config(/var/lib/libvirt/network/bla.xml), but this seems like the wrong solution.

Version-Release number of selected component (if applicable):
libvirt-0.9.10-21.el6_3.3.x86_64
ovirt-node-V-R
Comment 1 Mike Burns 2012-08-07 10:00:38 EDT
http://gerrit.ovirt.org/6985
Comment 2 Laine Stump 2012-08-07 10:30:42 EDT
I'm pretty sure you're just looking in the wrong place. When you define a network with virsh net-define, its definition is stored in /etc/libvirt. When you start a network, a copy of that definition is place in /var/lib/libvirt. When you reboot the host, the network is still defined (in /etc/libvirt), but is not automatically started, so it is no longer visible in /var/libvirt. As soon as you do virsh net-start, it will once again be visible in /var/libvirt.

If you want a network to be started automatically on boot, you need to call virsh net-autostart (virNetworkSetAutostart) after you've defined it. libvirt will then restart the network automatically when the host reboots.

BTW, please don't look in / use /var/lib/libvirt or /etc/libvirt - every piece of information there should be available via the libvirt API. If there is something you need in there that isn't available in the libvirt API, then we need to enhance the API.

In particular, I don't think you want the patch that Mike has proposed in Comment 1.
Comment 14 errata-xmlrpc 2013-02-28 11:37:50 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0556.html

Note You need to log in before you can comment on or make changes to this bug.