1. 08 11月, 2010 2 次提交
    • D
      Add smbios element to schema and configuration to HVM os · d528b52f
      Daniel Veillard 提交于
      the element has a mode attribute allowing only 3 values:
        - emulate: use the smbios emulation from the hypervisor
        - host: try to use the smbios values from the node
        - sysinfo: grab the values from the <sysinfo> fields
      
      * docs/schemas/domain.rng: extend the schemas
      * src/conf/domain_conf.h: add the flag to the domain config
      * src/conf/domain_conf.h: parse and serialize the smbios if present
      d528b52f
    • D
      Sysinfo parsing and saving to/from configuration files · ebb7a0dd
      Daniel Veillard 提交于
      * src/conf/domain_conf.h: defines a new internal type added to the
        domain structure
      * src/conf/domain_conf.c: parsing and serialization of that new type
      ebb7a0dd
  2. 06 11月, 2010 1 次提交
  3. 03 11月, 2010 4 次提交
    • S
      macvtap: libvirtd forgot macvtap dev name when restarted · c4bd44d9
      Stefan Berger 提交于
      During a shutdown/restart cycle libvirtd forgot the macvtap device name that it had created on behalf of a VM so that a stale macvtap device remained on the host when the VM terminated. Libvirtd has to actively tear down a macvtap device and it uses its name for identifying which device to tear down.
      
      The solution is to not blank out the <target dev='...'/> completely, but only blank it out on VMs that are not active. So, if a VM is active, the device name makes it into the XML and is also being parsed. If a VM is not active, the device name is discarded.
      c4bd44d9
    • D
      Fix virPipeReadUntilEOF on more than 1024 bytes of data · 04cbfa4f
      Daniel Veillard 提交于
      virPipeReadUntilEOF is used to read the stdout of exec'ed
      and this could fail to capture the full output and read only
      1024 bytes.
        The problem is that this is based on a poll loop, and in the
      loop we read at most 1024 bytes per file descriptor, but we also
      note in the loop if poll indicates that the process won't output
      more than that on that fd by setting finished[i] = 1.
        The simplest way is that if we read a full buffer make sure
      finished[i] is still 0 because we will need another pass in the
      loop.
      04cbfa4f
    • E
      virterror: supply missing spaces · b50408c1
      Eric Blake 提交于
      * src/util/virterror.c (virErrorDomainName): Always supply
      trailing space if category was present.
      b50408c1
    • E
      xen: work with xen 4.0.1 headers · 8dd22be9
      Eric Blake 提交于
      * src/xen/xen_driver.h (includes): Include main xen headers
      here...
      * src/xen/xs_internal.c (includes): ...rather than in just one of
      the sub-drivers.
      8dd22be9
  4. 02 11月, 2010 9 次提交
    • D
      Change calling conventions in remote driver client internals · a75cf152
      Daniel P. Berrange 提交于
      The remoteIO() method has wierd calling conventions, where
      it is passed a pre-allocated 'struct remote_call *' but
      then free()s it itself, instead of letting the caller free().
      This fixes those weird semantics
      
      * src/remote/remote_driver.c: Sanitize semantics of remoteIO
        method wrt to memory release
      a75cf152
    • D
      Misc error handling fixes in text mode monitor commands · a1de6ba0
      Daniel P. Berrange 提交于
      A couple of places in the text monitor were overwriting the
      'ret' variable with a >= 0 value before success was actually
      determined. So later error paths would not correctly return
      the -1 value. The drive_add code was not checking for errors
      like missing command
      
      * src/qemu/qemu_monitor_text.c: Misc error handling fixes
      a1de6ba0
    • D
      Ignore open failures when relabelling disk images · 347d266c
      Daniel P. Berrange 提交于
      NFS in root squash mode may prevent opening disk images to
      determine backing store. Ignore errors in this scenario.
      
      * src/security/security_selinux.c: Ignore open failures on disk
        images
      347d266c
    • D
      Treat failure to relabel stdin_path as non-fatal on NFS · 93a18bba
      Daniel P. Berrange 提交于
      NFS does not support file labelling, so ignore this error
      for stdin_path when on NFS.
      
      * src/security/security_selinux.c: Ignore failures on labelling
        stdin_path on NFS
      * src/util/storage_file.c, src/util/storage_file.h: Refine
        virStorageFileIsSharedFS() to allow it to check for a
        specific FS type.
      93a18bba
    • D
      Revert commit 06f81c63 · a51ccaf8
      Daniel P. Berrange 提交于
      Commit 06f81c63 attempted to make
      QEMU driver ignore the failure to relabel 'stdin_path' if it was
      on NFS. The actual result was that it ignores *all* failures to
      label any aspect of the VM, unless stdin_path is non-NULL and
      is not on NFS.
      
      * src/qemu/qemu_driver.c: Treat all relabel failures as terminal
      a51ccaf8
    • J
      Fix several warnings about a non-literal format string · 53618145
      Jiri Denemark 提交于
      They only popped up during --disable-nls build. Without this configure
      option, gcc wasn't able to detect them.
      53618145
    • O
      util: Add helper function to build timestamp string · af3ba2cd
      Osier Yang 提交于
      * src/util/util.h
      * src/util/util.c
      * src/libvirt_private.syms
      af3ba2cd
    • E
      build: avoid compiler warning in xen code · b164db62
      Eric Blake 提交于
      * src/xen/xend_internal.c (xenDaemonFormatSxpr): Hoist verify
      outside of function to avoid a -Wnested-externs warning.
      * src/xen/xm_internal.c (xenXMDomainConfigFormat): Likewise.
      Reported by Daniel P. Berrange.
      b164db62
    • D
      qemu: add the USB devices to the cgroup whitelist · 5919afe3
      Diego Elio Pettenò 提交于
      Make sure that the QEmu process within the cgroup can access the device
      file for the USB device that has to be connected to the virtual domain.
      5919afe3
  5. 01 11月, 2010 1 次提交
    • E
      xen: work with ia64 MAX_VIRT_CPUS of 64 · dc27e089
      Eric Blake 提交于
      * src/xen/xen_hypervisor.c (MAX_VIRT_CPUS): Move...
      * src/xen/xen_driver.h (MAX_VIRT_CPUS): ...so all xen code can see
      same value.
      * src/xen/xend_internal.c (sexpr_to_xend_domain_info)
      (xenDaemonDomainGetVcpusFlags, xenDaemonParseSxpr)
      (xenDaemonFormatSxpr): Work if MAX_VIRT_CPUS is 64 on a platform
      where long is 64-bits.
      * src/xen/xm_internal.c (xenXMDomainConfigParse)
      (xenXMDomainConfigFormat): Likewise.
      dc27e089
  6. 30 10月, 2010 2 次提交
    • K
    • K
      add compression support for "virsh dump" · 95a17abd
      KAMEZAWA Hiroyuki 提交于
      Add dump_image_format[] to qemu.conf and support compressed dump
      at virsh dump. coredump compression is important for saving disk space
      in an environment where multiple guests run.
      
      In general, "disk space for dump" is specially allocated and will be
      a dead space in the system. It's used only at emergency. So, it's better
      to have both of save_image_format and dump_image_format. "save" is done
      in scheduled manner with enough calculated disk space for it.
      
      This code reuses some of save_image_format[] and supports the same format.
      
      Changelog:
       - modified libvirtd_qemu.aug
       - modified test_libvirtd_qemu.aug
       - fixed error handling of qemudSaveCompressionTypeFromString()
      95a17abd
  7. 29 10月, 2010 4 次提交
    • L
      qemu_driver: add virCgroupMounted · 41b2cee2
      Lai Jiangshan 提交于
      When we mount any cgroup without "-o devices", we will fail to start vms:
      
      error: Failed to start domain vm1
      error: Unable to deny all devices for vm1: No such file or directory
      
      When we mount any cgroup without "-o cpu", we will fail to get schedinfo:
      Scheduler      : posix
      error: unable to get cpu shares tunable: No such file or directory
      
      We should only use the cgroup controllers which are mounted on host.
      So I add virCgroupMounted() for qemuCgroupControllerActive()
      Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
      41b2cee2
    • M
      vbox: Don't warn when the linker search path doesn't contain VBoxXPCOMC.so · 2eb99c4a
      Matthias Bolte 提交于
      This is actually a workaround, to unbreak make check on systems
      without VirtualBox.
      2eb99c4a
    • M
      vbox: Stop hardcoding a single path for VBoxXPCOMC.so · f4a8542d
      Matthias Bolte 提交于
      This partly reverts df90ca76.
      
      Don't disable the VirtualBox driver when configure can't find
      VBoxXPCOMC.so, rely on detection at runtime again instead.
      
      Keep --with-vbox=/path/to/virtualbox intact, added to for:
      https://bugzilla.redhat.com/show_bug.cgi?id=609185
      
      Detection order for VBoxXPCOMC.so:
      
      1. VBOX_APP_HOME environment variable
      2. configure provided location
      3. hardcoded list of known locations
      4. dynamic linker search path
      
      Also cleanup the glue code and improve error reporting.
      f4a8542d
    • K
      audit: printf warning fix · 55460342
      KAMEZAWA Hiroyuki 提交于
      fix warning
        CC     libvirt_util_la-virtaudit.lo
      cc1: warnings being treated as errors
      util/virtaudit.c: In function 'virAuditEncode':
      util/virtaudit.c:146: error: implicit declaration of function 'virAsprintf' [-Wimplicit-function-declaration]
      util/virtaudit.c:146: error: nested extern declaration of 'virAsprintf' [-Wnested-externs]
      55460342
  8. 28 10月, 2010 11 次提交
  9. 27 10月, 2010 2 次提交
  10. 26 10月, 2010 4 次提交
    • E
      qemu: work around dash 0.5.5 bug in managed save · f22e670b
      Eric Blake 提交于
      Older dash mistakenly truncates regular files when using <> redirection;
      this kills our use of double dd to reduce storage overhead when
      saving qemu images.  But qemu insists on running a command through
      /bin/sh, so we work around it by having qemu run $sh -c 'real command'
      when we have a replacement $sh in mind.
      
      * configure.ac (VIR_WRAPPER_SHELL): Define to a replacement shell,
      if /bin/sh is broken on <> redirection.
      * src/qemu/qemu_monitor.h (VIR_WRAPPER_SHELL_PREFIX)
      (VIR_WRAPPER_SHELL_SUFFIX): New macros.
      * src/qemu/qemu_monitor_text.c (qemuMonitorTextMigrateToFile): Use
      them.
      * src/qemu/qemu_monitor_json.c (qemuMonitorJSONMigrateToFile):
      Likewise.
      f22e670b
    • D
      Avoid squashing errors during network startup cleanup path · d68bb70a
      Daniel P. Berrange 提交于
      When failing to start a virtual network, we have to cleanup,
      tearing down any iptables rules. If the iptables rules were
      not present yet though, this raises an error, which squashes
      the original error we were handling.
      
      * src/network/bridge_driver.c: When failing to start a virtual
        network, don't squash the original error in cleanup
      d68bb70a
    • J
      xen: Fix domain dump · 608554f2
      Jiri Denemark 提交于
      Remove redundant 'live' parameter which caused an error from xend:
      
          "xend.err 'Too many values for live'"
      608554f2
    • D
      Fix formatting of network address in iptables helpers · eff1735e
      Daniel P. Berrange 提交于
      The network address was being set to 192.168.122.0 instead
      of 192.168.122.0/24. Fix this by removing the unneccessary
      'network' field from virNetworkDef and just pass the
      network address and netmask into the iptables APIs directly.
      
      * src/conf/network_conf.h, src/conf/network_conf.c: Remove
        the 'network' field from virNEtworkDef.
      * src/network/bridge_driver.c: Update for iptables API changes
      * src/util/iptables.c, src/util/iptables.h: Require the
        network address + netmask pair to be passed in
      eff1735e