- 10 12月, 2009 1 次提交
-
-
由 Mark McLoughlin 提交于
Currently, when we add iptables rules, we keep them on a list so that we can easily reload them on e.g. 'service libvirtd reload'. However, we don't save this list to disk, so if libvirtd is restarted we lose the ability to reload the rules. The fix is simple - just re-add the damn things on reload. Note, we delete the rules before re-adding them, just like the current behaviour of iptRulesReload(). * src/network/bridge_driver.c: re-add the iptables rules on reload.
-
- 16 11月, 2009 1 次提交
-
-
- 11 11月, 2009 2 次提交
-
-
由 Daniel P. Berrange 提交于
This implements the virConnectIsSecure, virConnectIsEncrypted, virDomainIsPersistent, virDomainIsActive, virNetworkIsActive, virNetworkIsPersistent, virStoragePoolIsActive, virStoragePoolIsPersistent, virInterfaceIsActive APIs in (nearly) all drivers. Exceptions are: phyp: missing domainIsActive/Persistent esx: missing domainIsPersistent opennebula: missing domainIsActive/Persistent * src/remote/remote_protocol.x: Define remote wire ABI for newly added APIs. * daemon/remote_dispatch*.h: Re-generated from remote_protocol.x * src/esx/esx_driver.c, src/lxc/lxc_driver.c, src/network/bridge_driver.c, src/opennebula/one_driver.c, src/openvz/openvz_conf.c, src/openvz/openvz_driver.c, src/phyp/phyp_driver.c, src/remote/remote_driver.c, src/storage/storage_driver.c, src/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c, src/xen/xen_driver.c, src/xen/xen_driver.h, src/xen/xen_inotify.c, src/xen/xen_inotify.h: Implement all the new APIs where possible
-
由 Daniel P. Berrange 提交于
Introduce a number of new APIs to expose some boolean properties of objects, which cannot otherwise reliably determined, nor are aspects of the XML configuration. * virDomainIsActive: Checking virDomainGetID is not reliable since it is not possible to distinguish between error condition and inactive domain for ID of -1. * virDomainIsPersistent: Check whether a persistent config exists for the domain * virNetworkIsActive: Check whether the network is active * virNetworkIsPersistent: Check whether a persistent config exists for the network * virStoragePoolIsActive: Check whether the storage pool is active * virStoragePoolIsPersistent: Check whether a persistent config exists for the storage pool * virInterfaceIsActive: Check whether the host interface is active * virConnectIsSecure: whether the communication channel to the hypervisor is secure * virConnectIsEncrypted: whether any network based commnunication channels are encrypted NB, a channel can be secure, even if not encrypted, eg if it does not involve the network, like a UNIX socket, or pipe. * include/libvirt/libvirt.h.in: Define public API * src/driver.h: Define internal driver API * src/libvirt.c: Implement public API entry point * src/libvirt_public.syms: Export API symbols * src/esx/esx_driver.c, src/lxc/lxc_driver.c, src/interface/netcf_driver.c, src/network/bridge_driver.c, src/opennebula/one_driver.c, src/openvz/openvz_driver.c, src/phyp/phyp_driver.c, src/qemu/qemu_driver.c, src/remote/remote_driver.c, src/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c, src/xen/xen_driver.c: Stub out driver tables
-
- 07 11月, 2009 1 次提交
-
-
由 Daniel Veillard 提交于
* src/network/bridge_driver.c: when exec'ing dnsmaq, if there are DHCP ranges defined, then compute and pass the --dhcp-lease-max deriving the maximum number of leases
-
- 03 11月, 2009 3 次提交
-
-
由 Daniel P. Berrange 提交于
The LXC driver was mistakenly returning -1 for lxcStartup() in scenarios that are not an error. This caused the libvirtd to quit for unprivileged users. This fixes the return code of LXC driver, and also adds a "name" field to the virStateDriver struct and logging to make it easier to find these problems in the future * src/driver.h: Add a 'name' field to state driver to allow easy identification during failures * src/libvirt.c: Log name of failed driver for virStateInit failures * src/lxc/lxc_driver.c: Don't return a failure code for lxcStartup() if LXC is not available on this host, simply disable the driver. * src/network/bridge_driver.c, src/node_device/node_device_devkit.c, src/node_device/node_device_hal.c, src/opennebula/one_driver.c, src/qemu/qemu_driver.c, src/remote/remote_driver.c, src/secret/secret_driver.c, src/storage/storage_driver.c, src/uml/uml_driver.c, src/xen/xen_driver.c: Fill in name field in virStateDriver struct
-
由 Daniel P. Berrange 提交于
Rename virDomainIsActive to virDomainObjIsActive, and virInterfaceIsActive to virInterfaceObjIsActive and finally virNetworkIsActive to virNetworkObjIsActive. * src/conf/domain_conf.c, src/conf/domain_conf.h, src/conf/interface_conf.h, src/conf/network_conf.c, src/conf/network_conf.h, src/lxc/lxc_driver.c, src/network/bridge_driver.c, src/opennebula/one_driver.c, src/openvz/openvz_driver.c, src/qemu/qemu_driver.c, src/test/test_driver.c, src/uml/uml_driver.c: Update for renamed APIs.
-
由 Daniel P. Berrange 提交于
Nearly all of the methods in src/util/util.h have error codes that must be checked by the caller to correct detect & report failure. Add ATTRIBUTE_RETURN_CHECK to ensure compile time validation of this * daemon/libvirtd.c: Add explicit check on return value of virAsprintf * src/conf/domain_conf.c: Add missing check on virParseMacAddr return value status & report error * src/network/bridge_driver.c: Add missing OOM check on virAsprintf and report error * src/qemu/qemu_conf.c: Add missing check on virParseMacAddr return value status & report error * src/security/security_selinux.c: Remove call to virRandomInitialize that's done in libvirt.c already * src/storage/storage_backend_logical.c: Add check & log on virRun return status * src/util/util.c: Add missing checks on virAsprintf/Run status * src/util/util.h: Annotate all methods with ATTRIBUTE_RETURN_CHECK if they return an error status code * src/vbox/vbox_tmpl.c: Add missing check on virParseMacAddr * src/xen/xm_internal.c: Add missing checks on virAsprintf * tests/qemuargv2xmltest.c: Remove bogus call to virRandomInitialize()
-
- 28 10月, 2009 1 次提交
-
-
由 Paolo Bonzini 提交于
This patch adds an optional attribute to the <bootp> tag, that allows to specify a TFTP server address other than the address of the DHCP server itself. This can be used to forward the BOOTP settings of the host down to the guest. This is something that configurations such as Xen's default network achieve naturally, but must be done manually for NAT. * docs/formatnetwork.html.in: Document new attribute. * docs/schemas/network.rng: Add it to schema. * src/conf/network_conf.h: Add it to struct. * src/conf/network_conf.c: Add it to parser and pretty printer. * src/network/bridge_driver.c: Put it in the dnsmasq command line. * tests/networkxml2xmlin/netboot-proxy-network.xml tests/networkxml2xmlout/netboot-proxy-network.xml tests/networkxml2xmltest.c: add new tests
-
- 23 9月, 2009 1 次提交
-
-
由 Paolo Bonzini 提交于
Currently, libvirtd will start a dnsmasq process for the virtual network, but (aside from killing the dnsmasq process and replacing it), there's no way to define tftp boot options. This change introduces the appropriate tags to the dhcp configuration: <network> <name>default</name> <bridge name="virbr%d" /> <forward/> <ip address="192.168.122.1" netmask="255.255.255.0"> <tftp root="/var/lib/tftproot" /> <dhcp> <range start="192.168.122.2" end="192.168.122.254" /> <bootp file="pxeboot.img"/> </dhcp> </ip> </network> When the attributes are present, these are passed to the arguments to dnsmasq: dnsmasq [...] --enable-tftp --tftp-root /srv/tftp --dhcp-boot pxeboot.img ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ from <tftp /> from <bootp /> At present, only local tftp servers are supported (ie, dnsmasq runs as the tftp server), but we could improve this in future by adding a server= attribute. Signed-off-by: NJeremy Kerr <jk@ozlabs.org> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> 2009-09-21 Paolo Bonzini <pbonzini@redhat.com> Jeremy Kerr <jk@ozlabs.org> * docs/formatnetwork.html.in: Document new tags. * docs/formatnetwork.html: Regenerate. * docs/schemas/network.rng: Update. * src/network_conf.c (virNetworkDefFree): Free new fields. (virNetworkDHCPRangeDefParseXML): Parse <bootp>. (virNetworkIPParseXML): New, parsing <dhcp> and <tftp>. (virNetworkDefParseXML): Use virNetworkIPParseXML instead of virNetworkDHCPRangeDefParseXML. (virNetworkDefFormat): Pretty print new fields. * src/network_conf.h (struct _virNetworkDef): Add netboot fields. * src/network_driver.c (networkBuildDnsmasqArgv): Add TFTP and BOOTP arguments. * tests/Makefile.am (EXTRA_DIST): Add networkschemadata. * tests/networkschematest: Look in networkschemadata. * tests/networkschemadata/netboot-network.xml: New.
-
- 21 9月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
* daemon/qemud.c, src/Makefile.am: Adapt for changed paths * src/network_driver.c: Rename to src/network/bridge_driver.c * src/network_driver.h: Rename to src/network/bridge_driver.h
-
- 08 9月, 2009 1 次提交
-
-
由 Jim Meyering 提交于
* src/network_driver.c (networkSetAutostart): ...and its decl.
-
- 10 8月, 2009 1 次提交
-
-
由 Mark McLoughlin 提交于
If the ipv6 kernel module is not loaded, then we get this when starting a virtual network: libvir: Network Config error : cannot enable /proc/sys/net/ipv6/conf/virbr0/disable_ipv6: No such file or directory If disable_ipv6 is not present, we should just merrily continue on our way. * src/network_driver.c: make networkDisableIPV6() not fail if the kernel has no ipv6 support
-
- 31 7月, 2009 2 次提交
-
-
由 Daniel P. Berrange 提交于
If the bridge device is configured to have IPv6 address and accept router advertisments, then a malicious guest can send out bogus advertisments and hijack/DOS host IPv6 connectivity * src/network_driver.c: Set accept_ra=0, disable_ipv6=1, autoconf=0 for IPv6 sysctl on virual network bridge devices
-
由 Daniel P. Berrange 提交于
* src/network_driver.c: Always start dnsmasq to allow it to provide DNS, even if no DHCP ranges are enabled
-
- 08 7月, 2009 1 次提交
-
-
由 Daniel Veillard 提交于
* src/network_driver.c src/node_device.c src/storage_driver.c: many places in the code reported 'No xxx with matching name" after a Lookup error without reporting the name used by the failed lookup
-
- 12 6月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 03 6月, 2009 1 次提交
-
-
由 Daniel Veillard 提交于
daniel
-
- 29 5月, 2009 2 次提交
-
-
由 Cole Robinson 提交于
If two virtual networks have the same hardcoded bridge device (which prevents them from being active simultaneously) we still want to define them at daemon startup, so the user has a fighting chance of correcting the XML error. Add an extra flag to SetBridge to avoid reporting an error if there is a bridge collision, and use this when loading network configs at startup. This regressed via commit 4c3f3b4d.
-
由 Cole Robinson 提交于
This follows the same convention as domain drivers.
-
- 20 5月, 2009 1 次提交
-
-
由 Daniel Veillard 提交于
* qemud/qemud.c src/console.c src/network_driver.c src/node_device_conf.c src/node_device_hal.c src/storage_conf.c src/util.c: cleanup of some direct stderr logging daniel
-
- 19 5月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 12 5月, 2009 1 次提交
-
-
由 Daniel Veillard 提交于
without an IP address, patch by Ludwig Nussel Daniel
-
- 03 3月, 2009 2 次提交
-
-
由 Cole Robinson 提交于
-
由 Cole Robinson 提交于
-
- 22 2月, 2009 1 次提交
-
-
由 Mark McLoughlin 提交于
-
- 14 2月, 2009 1 次提交
-
-
由 Mark McLoughlin 提交于
Re-factor the code from networkEnableIpForwarding() into a utility function in preparation for code which writes to sysfs files.
-
- 06 2月, 2009 1 次提交
-
-
由 Jim Meyering 提交于
* qemud/qemud.c (GET_CONF_STR): Use virStrerror, not strerror. * qemud/remote.c (remoteDispatchDomainBlockPeek): Likewise. (remoteDispatchDomainMemoryPeek, remoteDispatchAuthSaslInit): Likewise. (remoteDispatchAuthPolkit): Likewise. * src/lxc_container.c (lxcContainerAvailable): Likewise. * src/network_driver.c (networkStartNetworkDaemon): Likewise. (networkShutdownNetworkDaemon): Likewise. * src/qemu_conf.c (qemudExtractVersion, qemudNetworkIfaceConnect): * src/storage_conf.c (virStoragePoolLoadAllConfigs): Likewise. * src/storage_driver.c (storagePoolUndefine): Likewise. * src/uml_driver.c (umlStartup, umlStartVMDaemon): Likewise. * src/util.c (virFileReadAll): Likewise. * src/uuid.c (virUUIDGenerate): Likewise. * src/xen_internal.c (get_cpu_flags): Likewise.
-
- 29 1月, 2009 1 次提交
-
-
由 Jim Meyering 提交于
* src/uml_conf.c (VIR_FROM_THIS): Define to VIR_FROM_UML. * src/xs_internal.c (VIR_FROM_THIS): Define to VIR_FROM_XEN. * src/xml.c (VIR_FROM_THIS): Define to VIR_FROM_XML. * src/stats_linux.c (VIR_FROM_THIS): Define to VIR_FROM_STATS_LINUX. * src/datatypes.c (VIR_FROM_THIS): Define to VIR_FROM_NONE. * src/lxc_conf.c (VIR_FROM_THIS): Define to VIR_FROM_LXC. * src/libvirt.c (VIR_FROM_THIS): Define to VIR_FROM_NONE. * src/node_device_conf.c (VIR_FROM_THIS): Define to VIR_FROM_NODEDEV. * src/openvz_conf.c (VIR_FROM_THIS): Define to VIR_FROM_OPENVZ. * src/openvz_driver.c (VIR_FROM_THIS): Define to VIR_FROM_OPENVZ. * src/conf.c (VIR_FROM_THIS): Define to VIR_FROM_CONF. Note: this loses config_filename:config_lineno diagnostics, but that's ok. * src/node_device.c (VIR_FROM_THIS): Define to VIR_FROM_NODEDEV. * src/sexpr.c (VIR_FROM_THIS): Define to VIR_FROM_SEXPR. * po/POTFILES.in: remove src/sexpr.c and src/lxc_conf.c
-
- 23 1月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 21 1月, 2009 3 次提交
-
-
由 Daniel P. Berrange 提交于
-
由 Jim Meyering 提交于
* src/network_driver.c (networkEnableIpForwarding): This function would always return 1 (success). Now it returns 0 upon write or close failure, being careful to preserve any errno from a write failure. Add comments.
-
由 Daniel P. Berrange 提交于
-
- 16 1月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 23 12月, 2008 1 次提交
-
-
由 Guido Günther 提交于
-
- 11 12月, 2008 1 次提交
-
-
由 Cole Robinson 提交于
-
- 05 12月, 2008 2 次提交
-
-
由 Daniel P. Berrange 提交于
-
由 Daniel P. Berrange 提交于
-
- 17 11月, 2008 1 次提交
-
-
由 Daniel P. Berrange 提交于
-
- 05 11月, 2008 1 次提交
-
-
由 Daniel P. Berrange 提交于
-