Bug 1127453 - RFE: network: support net-update for <domain name=XXX/>
Summary: RFE: network: support net-update for <domain name=XXX/>
Keywords:
Status: NEW
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-06 21:32 UTC by Rich Megginson
Modified: 2018-07-18 14:29 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description Rich Megginson 2014-08-06 21:32:56 UTC
Description of problem:

Trying to use virsh net-update to add a domain name

$ sudo virsh net-update default add domain "<domain name='test'/>"
--live --config
error: this function is not supported by the connection driver: can't
update 'domain' section of network 'default'

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

libvirt-1.1.3.5-2.fc20.x86_64

How reproducible:


Steps to Reproduce:
1. sudo virsh net-update default add domain "<domain name='test'/>"
--live --config
2.
3.

Actual results:
error: this function is not supported by the connection driver: can't
update 'domain' section of network 'default'

Expected results:
New virtual machines created with network 'default' should use the specified network domain name 'test'
Existing running virtual machines will use the old name before the update

Additional info:
> is it possible to add a domain using net-update?

No, not currently. It would be fairly simple to add support for
re-starting the network's dnsmasq instance with the new domain in the
commandline arguments, but that wouldn't address the existing guests
that have already received the domain name in their DHCP responses -
they would continue appending the old domain name to any DNS queries
until their DHCP lease expires and they have to renew (assuming that the
guest's lease renewal code is intelligent enough to notice that the
domain has changed).

If the above is acceptable, and you're interesting in adding support for
that much of the functionality, the function to change is
virNetworkDefUpdateDomain() (higher level functions are already setup to
handle restarting dnsmasq). You could follow the examples of other
virNetworkDefUpdate*() functions in the same file.


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