1. 06 11月, 2009 5 次提交
  2. 05 11月, 2009 8 次提交
    • M
      Ensure guestfwd address is IPv4 and various cleanups · 3023ec5e
      Matthew Booth 提交于
      * include/libvirt/virterror.h src/util/virterror.c: add a new error
        VIR_ERR_CONFIG_UNSUPPORTED for valid but unsupported configuration options
      * src/conf/domain_conf.c: Throw an error if guestfwd address isn't IPv4
        and cleanup a number of parsing return error values.
      3023ec5e
    • M
      Support for <channel> in domain and QEmu backend · af249ea4
      Matthew Booth 提交于
      allows the following to be specified in a domain:
      <channel type='pipe'>
        <source path='/tmp/guestfwd'/>
        <target type='guestfwd' address='10.0.2.1' port='4600'/>
      </channel>
      
      * proxy/Makefile.am: add network.c as dep of domain_conf.c
      * docs/schemas/domain.rng src/conf/domain_conf.[ch]: extend the domain
        schemas and the parsing/serialization side for the new construct
      
      QEmu support will add the following on the qemu command line:
       -chardev pipe,id=channel0,path=/tmp/guestfwd
       -net user,guestfwd=tcp:10.0.2.1:4600-chardev:channel0
      
      * src/qemu/qemu_conf.c: Add argument output for channel
      * tests/qemuxml2(argv|xml)test.c: Add test for <channel> domain syntax
      af249ea4
    • M
      Detect availability of QEMU -chardev CLI option · 74003968
      Matthew Booth 提交于
      * src/qemu/qemu_conf.h: defines a new QEMUD_CMD_FLAG_CHARDEV flag
      * src/qemu/qemu_conf.c: parse the output for -chardev and set flag
        appropriately
      74003968
    • M
      Allow character devices to have different target types · 89d549c3
      Matthew Booth 提交于
      A character device's target (it's interface in the guest) had only a
      single property: port. This patch is in preparation for adding targets
      which require other properties.
      Since this changes the conf type for character devices this affects
      a number of drivers:
      
      * src/conf/domain_conf.[ch] src/esx/esx_vmx.c src/qemu/qemu_conf.c
        src/qemu/qemu_driver.c src/uml/uml_conf.c src/uml/uml_driver.c
        src/vbox/vbox_tmpl.c src/xen/xend_internal.c src/xen/xm_internal.c:
        target properties are moved into a union in virDomainChrDef, and a
        targetType field is added to identify which union member should be
        used. All current code which touches a virDomainChrDef is updated both
        to use the new union field, and to populate targetType if necessary.
      89d549c3
    • R
      LXC allow container to have ethN interfaces · 8db32571
      Ryota Ozaki 提交于
      Current implementation of lxc driver creates vethN named
      interface(s) in the host and passes as it is to a container.
      The reason why it doesn't use ethN is due to the limitation
      that one namespace cannot have multiple iterfaces that have
      an identical name so that we give up creating ethN named
      interface in the host for the container.
      
      However, we should be able to allow the container to have
      ethN by changing the name after clone(CLONE_NEWNET).
      
      * src/lxc/lxc_container.c src/lxc/veth.c src/lxc/veth.h: do the clone
        and then renames interfaces eth0 ... ethN to keep the interface names
        familiar in the domain
      8db32571
    • R
      LXC cleanup deep indentation in lxcDomainSetAutostart · a9cb3548
      Ryota Ozaki 提交于
      * src/lxc/lxc_driver.c: refactor lxcDomainSetAutostart() to avoid deep
        indentation of the code
      a9cb3548
    • R
      LXC messages cleanup and fix lxcError · 24e3b35c
      Ryota Ozaki 提交于
      * src/lxc/lxc_container.c src/lxc/lxc_controller.c src/lxc/lxc_driver.c
        src/lxc/veth.c: most of cleanups are just capitalizing their messages
        though, some fixes wrong error messages and awkward indentations, and
        improves error messages.
      24e3b35c
    • R
      LXC fix wrong or out-of-date function descriptions · 15941b2b
      Ryota Ozaki 提交于
      * src/lxc/lxc_container.c src/lxc/lxc_controller.c src/lxc/lxc_driver.c
        src/lxc/veth.c: fix broken function comments
      15941b2b
  3. 04 11月, 2009 18 次提交
  4. 03 11月, 2009 9 次提交
    • L
      Allow NULL mac address in virGetInterface · 4728bad4
      Laine Stump 提交于
      There are places where an interface will not have a mac address, and netcf
      returns this as a NULL pointer rather than a pointer to an empty string.
      Rather than checking for this all over the place in libvirt, just save it
      in the virInterface object as an empty string.
      
      * src/datatypes.c: allow NULL mac in virGetInterface()
      4728bad4
    • D
      Fix compilation problems · 112ed8f5
      Daniel Veillard 提交于
      introduced on commit 9231aa7d
      * src/qemu/qemu_driver.c: in qemudRemoveDomainStatus fix a reference
        to an undefined variable buf and free up an allocated string
      112ed8f5
    • C
      Fix up NLS warnings. · 991be604
      Chris Lalancette 提交于
      When building with --disable-nls, I got a few messages like this:
      
      storage/storage_backend.c: In function 'virStorageBackendCreateQemuImg':
      storage/storage_backend.c:571: warning: format not a string literal and no format arguments
      
      Fix these up.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      991be604
    • C
      Remove redundant virFileDeletePID() call · 9231aa7d
      Chris Lalancette 提交于
      qemudShutdownVMDaemon() calls qemudRemoveDomainStatus(), which
      then calls virFileDeletePID().  qemudShutdownVMDaemon() then
      unnecessarily calls virFileDeletePID() again.  Remove this second
      usage of it, and also slightly refactor qemudRemoveDomainStatus()
      to VIR_WARN appropriate error messages.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      9231aa7d
    • D
      Fix return value in virStateInitialize impl for LXC · 979218cd
      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
      979218cd
    • M
      ESX: Fix memory leak in list handling functions. · 680c92ae
      Matthias Bolte 提交于
      If an error occurs between the allocation of an item and appending it
      to the list, the item leaks. Free such orphaned items in error cases.
      
      * src/esx/esx_vi.c: free orphaned items in error cases
      680c92ae
    • M
      ESX: Don't automatically follow redirects. · b79aaf91
      Matthias Bolte 提交于
      The default transport for the VI API is HTTPS. If the server redirects
      from HTTPS to HTTP the driver would silently follow that redirection.
      The user assumes to communicate with the server over a secure transport
      but isn't.
      
      This patch disables automatical redirection following. The driver reports
      an error if the server tries to redirect.
      
      * src/esx/esx_vi.c: refactor the call to curl_easy_perform() into a
        function and do error handling there, disable automatical redirection
        following for curl
      * src/esx/esx_vi.h: change the type of responseCode to int
      b79aaf91
    • M
      ESX: Unify naming of VI API utility and convenience functions. · 447ef886
      Matthias Bolte 提交于
      Unified function naming scheme:
      - 'lookup' functions query the ESX or vCenter for information
      - 'get' functions return information from a local object
      
      * src/esx/esx_driver.c, src/esx/esx_vi.[ch]: unify function naming
      447ef886
    • M
      ESX: Change disk selection for datastore detection. · 7c7681dd
      Matthias Bolte 提交于
      In order to register a new virtual machine the ESX driver needs to upload
      a VMX file to a datastore. Try to put this file beside the main VMDK file
      of the virtual machine. Change the disk selection for datastore detection
      to choose the first file-based harddisk instead of just the first disk.
      The first disk may be a CDROM disk and ISO images are normaly not located
      in the virtual machine's directory.
      
      * src/esx/esx_driver.c: change disk selection for datastore detection
      7c7681dd