1. 20 10月, 2010 4 次提交
    • E
      vcpu: implement the remote protocol · eb826444
      Eric Blake 提交于
      Done by editing the first three files, then running
      'make -C src rpcgen', then editing src/remote_protocol-structs
      to match.
      
      * daemon/remote.c (remoteDispatchDomainSetVcpusFlags)
      (remoteDispatchDomainGetVcpusFlags): New functions.
      * src/remote/remote_driver.c (remoteDomainSetVcpusFlags)
      (remoteDomainGetVcpusFlags, remote_driver): Client side
      serialization.
      * src/remote/remote_protocol.x
      (remote_domain_set_vcpus_flags_args)
      (remote_domain_get_vcpus_flags_args)
      (remote_domain_get_vcpus_flags_ret)
      (REMOTE_PROC_DOMAIN_SET_VCPUS_FLAGS)
      (REMOTE_PROC_DOMAIN_GET_VCPUS_FLAGS): Define wire format.
      * daemon/remote_dispatch_args.h: Regenerate.
      * daemon/remote_dispatch_prototypes.h: Likewise.
      * daemon/remote_dispatch_table.h: Likewise.
      * src/remote/remote_protocol.c: Likewise.
      * src/remote/remote_protocol.h: Likewise.
      * src/remote_protocol-structs: Likewise.
      eb826444
    • E
      vcpu: implement the public APIs · 9d2c6079
      Eric Blake 提交于
      Factors common checks (such as nonzero vcpu count) up front, but
      drivers will still need to do additional flag checks.
      
      * src/libvirt.c (virDomainSetVcpusFlags, virDomainGetVcpusFlags):
      New functions.
      (virDomainSetVcpus, virDomainGetMaxVcpus): Refer to new API.
      9d2c6079
    • E
      vcpu: define internal driver API · dd255d64
      Eric Blake 提交于
      * src/driver.h (virDrvDomainSetVcpusFlags)
      (virDrvDomainGetVcpusFlags): New typedefs.
      (_virDriver): New callback members.
      * src/esx/esx_driver.c (esxDriver): Add stub for driver.
      * src/lxc/lxc_driver.c (lxcDriver): Likewise.
      * src/opennebula/one_driver.c (oneDriver): Likewise.
      * src/openvz/openvz_driver.c (openvzDriver): Likewise.
      * src/phyp/phyp_driver.c (phypDriver): Likewise.
      * src/qemu/qemu_driver.c (qemuDriver): Likewise.
      * src/remote/remote_driver.c (remote_driver): Likewise.
      * src/test/test_driver.c (testDriver): Likewise.
      * src/uml/uml_driver.c (umlDriver): Likewise.
      * src/vbox/vbox_tmpl.c (Driver): Likewise.
      * src/xen/xen_driver.c (xenUnifiedDriver): Likewise.
      * src/xenapi/xenapi_driver.c (xenapiDriver): Likewise.
      dd255d64
    • E
      vcpu: add new public API · ea3f5c68
      Eric Blake 提交于
      API agreed on in
      https://www.redhat.com/archives/libvir-list/2010-September/msg00456.html,
      but modified for enum names to be consistent with virDomainDeviceModifyFlags.
      
      * include/libvirt/libvirt.h.in (virDomainVcpuFlags)
      (virDomainSetVcpusFlags, virDomainGetVcpusFlags): New
      declarations.
      * src/libvirt_public.syms: Export new symbols.
      ea3f5c68
  2. 19 10月, 2010 11 次提交
    • E
      vcpu: add current attribute to <vcpu> element · a74f4e44
      Eric Blake 提交于
      Syntax agreed on in
      https://www.redhat.com/archives/libvir-list/2010-September/msg00476.html
      
      <domain ...>
        <vcpu current='x'>y</vcpu>
      ...
      
      can now be used to specify 1 <= x <= y current vcpus, in relation
      to the boot-time max of y vcpus.  If current is omitted, then
      current and max are assumed to be the same value.
      
      * docs/schemas/domain.rng: Add new attribute.
      * docs/formatdomain.html.in: Document it.
      * tests/qemuxml2argvdata/qemuxml2argv-smp.xml: Add to
      domainschematest.
      * tests/xml2sexprdata/xml2sexpr-pv-vcpus.xml: Likewise.
      a74f4e44
    • S
      nwfilter: changes to rules in VM->host table · 7d79da24
      Stefan Berger 提交于
      In the table built for traffic coming from the VM going to the host make the following changes:
      
      - don't ACCEPT the packets but do a 'RETURN' and let the host-specific firewall rules in subsequent rules evaluate whether the traffic is allowed to enter
      
      - use the '-m state' in the rules as everywhere else
      7d79da24
    • E
      build: avoid false positive syntax-check failure · 6dcd9c0d
      Eric Blake 提交于
      * .x-sc_po_check: Exclude docs directory.
      6dcd9c0d
    • M
      proxy: Fix undefined reference to virClose · 77a81b8a
      Matthias Bolte 提交于
      Add src/util/files.c to libvirt_proxy_SOURCES.
      77a81b8a
    • M
      esx: Handle non-UTF-8 encoded VMX files · 1c616489
      Matthias Bolte 提交于
      ESX(i) uses UTF-8, but a Windows based GSX server writes
      Windows-1252 encoded VMX files.
      
      Add a test case to ensure that libxml2 provides Windows-1252
      to UTF-8 conversion.
      1c616489
    • S
      Introduce VIR_CLOSE to be used rather than close() · f04de501
      Stefan Berger 提交于
      Since bugs due to double-closed file descriptors are difficult to track down in a multi-threaded system, I am introducing the VIR_CLOSE(fd) macro to help avoid mistakes here.
      
      There are lots of places where close() is being used. In this patch I am only cleaning up usage of close() in src/conf where the problems were.
      
      I also dare to declare close() as being deprecated in libvirt code base (HACKING).
      f04de501
    • D
      root_squash: virFileOperation may fail with EPERM too · b2c9a879
      Dan Kenigsberg 提交于
      Over root-squashing nfs, when virFileOperation() is called as uid==0,
      it may fail with EACCES, but also with EPERM, due to
      virFileOperationNoFork()'s failed attemp to chown a writable file.
      
      qemudDomainSaveFlag() should expect this case, too.
      b2c9a879
    • D
      Run initgroups() in qemudOpenAsUID() · b7bd75c4
      Dan Kenigsberg 提交于
      qemudOpenAsUID is intended to open a file with the credentials of a
      specified uid. Current implementation fails if the file is accessible to
      one of uid's groups but not owned by uid.
      
      This patch replaces the supplementary group list that the child process
      inherited from libvirtd with the default group list of uid.
      b7bd75c4
    • N
      memtune: Add min_guarantee to the virsh memtune command · 0a22f542
      Nikunj A. Dadhania 提交于
      * tools/virsh.c: Add new memory tunable "min_guarantee", currently only
        ESX can use this
      * tools/virsh.pod: Update the manpage
      0a22f542
    • N
      Update docs for memory parameters and memtune command · 61dfbf8c
      Nikunj A. Dadhania 提交于
      * docs/formatdomain.html.in: Add memtune element details, added min_guarantee
      * src/libvirt.c: Update virDomainGetMemoryParameters api description, make
        it more clear that the user first needs to call the api to get the number
        of parameters supported and then call again to get the values.
      * tools/virsh.pod: Add usage of new command memtune in virsh manpage
      61dfbf8c
    • D
      qemu: let qemu group look below /var/lib/libvirt/qemu/ · 0df552cd
      Dan Kenigsberg 提交于
      Vdsm needs to communicate with its guest agent via unix domain socket,
      which qemu creates due to the following domain xml device:
      
          <channel type='unix'>
            <target type='virtio' name='com.redhat.rhevm.vdsm'/>
            <source mode='bind' path='/var/lib/libvirt/qemu/channels/fcp-xp-1.com.redhat.rhevm.vdsm'/>
          </channel>
      
      The location of the socket below /var/lib/libvirt/qemu/channels makes
      sense, to humans and selinux policy alike. However, that socket should
      be accessible to vdsm, too.
      
      Due to other (storage) reasons, vdsm is to join the "qemu" group. With
      this patch, vdsm can look below /var/lib/libvirt/qemu and connect to the
      socket.
      
      The socket itself should be chmod'ed to allow qemu group read/write, but
      that's for another project.
      
      BZ#643407
      0df552cd
  3. 16 10月, 2010 6 次提交
  4. 15 10月, 2010 4 次提交
  5. 14 10月, 2010 15 次提交
    • S
      nwfilter: prevent filters with different name but same UUID · 4cfcde2d
      Stefan Berger 提交于
      Patch to prevent multiple nwfilters with different name but same UUID.
      4cfcde2d
    • E
      maint: add recent author · a33b7b6f
      Eric Blake 提交于
      * AUTHORS: List Harsh Prateek Bora, for 'make syntax-check'.
      a33b7b6f
    • E
      build: fix accidental submodule reversion · 0faa9ebd
      Eric Blake 提交于
      * .gnulib: Undo change in previous commit.
      0faa9ebd
    • H
      new attribute accessmode to filesystem element · 75a6a9a8
      Harsh Prateek Bora 提交于
      This introduces new attribute to filesystem element
      to support customizable access mode for mount type.
      Valid accessmode are: passthrough, mapped and squash.
      
      Usage:
              <filesystem type='mount' accessmode='passthrough'>
                <source dir='/export/to/guest'/>
                <target dir='mount_tag'/>
              </filesystem>
      
      passthrough is the default model if not specified, that's
      also the current behaviour.
      75a6a9a8
    • S
      nwfilter: cut off connections after changing filters · 2b3df906
      Stefan Berger 提交于
      The following filter transition from a filter allowing incoming TCP connections
      
        <rule action='accept' direction='in' priority='401'>
          <tcp/>
        </rule>
        <rule action='accept' direction='out' priority='500'>
          <tcp/>
        </rule>
      
      to one that does not allow them
      
        <rule action='drop' direction='in' priority='401'>
          <tcp/>
        </rule>
        <rule action='accept' direction='out' priority='500'>
          <tcp/>
        </rule>
      
      did previously not cut off existing (ssh) connections but only prevented newly initiated ones. The attached patch allows to cut off existing connections as well, thus enforcing what the filter is showing.
      
      I had only tested with a configuration where the physical interface is connected to the bridge where the filters are applied. This patch now also solves a filtering problem where the physical interface is not connected to the bridge, but the bridge is given an IP address and the host routes between bridge and physical interface. Here the filters drop non-allowed traffic on the outgoing side on the host.
      2b3df906
    • E
      build: provide URL in 'configure --help' · 8f11a9be
      Eric Blake 提交于
      * configure.ac (AC_INIT): Provide email and URL.
      8f11a9be
    • E
      build: fix mingw build · 2399597a
      Eric Blake 提交于
      * .gnulib: Update to latest, for termios fix.
      * configure.ac (AC_CHECK_HEADERS): Drop redundent check.
      * bootstrap: Synchronize from upstream.
      Reported by Daniel P. Berrange.
      2399597a
    • J
      qemu: Prohibit migration of guests with host devices · f93924f4
      Jiri Denemark 提交于
      Explicitly raising a nice error in the case user tries to migrate a
      guest with assigned host devices is much better than waiting for a
      mysterious error with no clue for the reason.
      f93924f4
    • J
      tests: Honor LIBVIRT_{DEBUG,LOG_*} variables · a4d9d98f
      Jiri Denemark 提交于
      a4d9d98f
    • J
      tests: Do not override LIBVIRT_DEBUG variable · d3ad0ee0
      Jiri Denemark 提交于
      d3ad0ee0
    • J
      cpu: Use vendor in baseline CPU only if all hosts use it · b2de33e2
      Jiri Denemark 提交于
      When only some host CPUs given to cpuBaseline contain <vendor> element,
      baseline CPU should not contain it. Otherwise the result would not be
      compatible with the host CPUs without vendor. CPU vendors are still
      taken into account when computing baseline CPU, it's just removed from
      the result.
      b2de33e2
    • J
      cpu: Fix vendor for recent CPU models · ac7afbeb
      Jiri Denemark 提交于
      Recent CPU models were specified using invalid vendor element
      <vendor>NAME</vendor>, which was silently ignored due to a bug in the
      code which was parsing it.
      ac7afbeb
    • S
      test: silence nwfilter test · 677b7cf9
      Stefan Berger 提交于
       This patch silences the nwfilter test case.
      677b7cf9
    • E
      tests: fix spurious test failure · 94eb11f6
      Eric Blake 提交于
      Failure introduced in commit 3a092f38.
      
      * tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr: Fix typo.
      94eb11f6
    • E
      memory: fix remote protocol compilation · 450cbebe
      Eric Blake 提交于
      'make -C src rpcgen' is supposed to be idempotent.  But commit
      f928f43b mistakently manually edited a generated file rather
      than fixing the upstream file.
      
      * src/remote/remote_protocol.x (remote_memory_param_value): Use
      correct spelling of enum values.
      * src/remote/remote_protocol.c: Regenerate.
      450cbebe