1. 01 8月, 2012 12 次提交
    • D
      parallels: add storage driver · aa296e6c
      Dmitry Guryanov 提交于
      Parallels Cloud Server has one serious discrepancy with libvirt:
      libvirt stores domain configuration files in one place, and storage
      files in other places (with the API of storage pools and storage volumes).
      Parallels Cloud Server stores all domain data in a single directory,
      for example, you may have domain with name fedora-15, which will be
      located in '/var/parallels/fedora-15.pvm', and it's hard disk image will be
      in '/var/parallels/fedora-15.pvm/harddisk1.hdd'.
      
      I've decided to create storage driver, which produces pseudo-volumes
      (xml files with volume description), and they will be 'converted' to
      real disk images after attaching to a VM.
      
      So if someone creates VM with one hard disk using virt-manager,
      at first virt-manager creates a new volume, and then defines a
      domain. We can lookup a volume by path in XML domain definition
      and find out location of new domain and size of its hard disk.
      Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
      aa296e6c
    • D
      parallels: implement virDomainDefineXML operation for existing domains · e356f610
      Dmitry Guryanov 提交于
      Add parallelsDomainDefineXML function, it works only for existing
      domains for the present.
      
      It's too hard to convert libvirt's XML domain configuration into
      Parallel's one, so I've decided to compare virDomainDef structures:
      current domain definition and the one created from XML, given to
      the function. And change only different parameters.
      
      Currently only name, description, number of cpus, memory amount
      and video memory can be changed.
      
      Video device and console added, because libvirt supposes that
      VM must always have one video device, if there are some
      graphics and one console.
      Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
      e356f610
    • D
      parallels: add support of VNC remote display · d71145ad
      Dmitry Guryanov 提交于
      Add support for reading VNC parameters of the VM.
      Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
      d71145ad
    • D
      parallels: get info about serial ports · e172cd50
      Dmitry Guryanov 提交于
      Add support of collecting information about serial
      ports. This change is needed mostly as an example,
      support of other devices will be added later.
      Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
      e172cd50
    • D
      parallels: implement functions for domain life cycle management · 0740e1bb
      Dmitry Guryanov 提交于
      Add functions for create/shutdown/destroy and suspend/resume domain.
      Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
      0740e1bb
    • D
      parallels: add functions to list domains and get info · e93c33a9
      Dmitry Guryanov 提交于
      Parallels driver is 'stateless', like vmware or openvz drivers.
      It collects information about domains during startup using
      command-line utility prlctl. VMs in Parallels are identified by UUIDs
      or unique names, which can be used as respective fields in
      virDomainDef structure. Currently only basic info, like
      description, virtual cpus number and memory amount, is implemented.
      Querying devices information will be added in the next patches.
      
      Parallels doesn't support non-persistent domains - you can't run
      a domain having only disk image, it must always be registered
      in system.
      
      Functions for querying domain info have been just copied from
      test driver with some changes - they extract needed data from
      previously created list of virDomainObj objects.
      Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
      e93c33a9
    • D
      add function virCommandNewVAList · 4033df7e
      Dmitry Guryanov 提交于
      Add function virCommandNewVAList which is equivalent to the
      virCommandNewArgList but with va_list instead of a variable number
      of arguments.
      Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
      4033df7e
    • D
      parallels: add driver skeleton · cafc26ff
      Dmitry Guryanov 提交于
      Parallels Cloud Server is a cloud-ready virtualization
      solution that allows users to simultaneously run multiple virtual
      machines and containers on the same physical server.
      
      More information can be found here: http://www.parallels.com/products/pcs/
      Also beta version of Parallels Cloud Server can be downloaded there.
      Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
      cafc26ff
    • M
      qemu: syntax fix · 2beed2da
      Marc-André Lureau 提交于
      Pushed without ack, under the trivial rule.
      2beed2da
    • D
      Only perform symbol check against libvirt.so · 8c63ff39
      Daniel P. Berrange 提交于
      The 'check-symfile' test case was checking the contents of
      libvirt.syms against libvirt.so + all of libvirt_driver_XXX.so
      This was in fact bogus - libvirt.syms should only refer to
      stuff in libvirt.so, but it had some symbols from the various
      driver modules in it too. Now that libvirt.syms has been
      fixed, the check-symfile test can be simplified to only
      consider libvirt.so
      8c63ff39
    • D
      Don't link nwfilter or secrets driver to libvirt.so · aae5cfb6
      Daniel P. Berrange 提交于
      The nwfilter and secrets drivers are both stateful and are already
      linked directly to libvirtd. Linking them to libvirt.so is thus
      wrong, likewise exporting their symbols in libvirt.so is wrong
      aae5cfb6
    • D
      Remove bogus libvirt_network.syms file · 5830c72e
      Daniel P. Berrange 提交于
      The network driver is stateful, so it is linked directly to libvirtd,
      rather than libvirt.so. Thus there are no network symbols to be exported
      in libvirt.so, and libvirt_network.syms can be deleted
      5830c72e
  2. 31 7月, 2012 5 次提交
    • E
      qemu: fix use after free · 665c8cde
      Eric Blake 提交于
      Detected by Coverity.
      
      * src/qemu/qemu_hotplug.c (qemuDomainAttachHostDevice): Avoid
      double free of usb on failure.
      665c8cde
    • J
      build: Don't export xenLinuxDomainBlockStats symbol · 73bc94c5
      Jiri Denemark 提交于
      The symbol is only used within Xen driver.
      73bc94c5
    • G
      build: distribute virsh related source files · b254cad9
      Guannan Ren 提交于
      In virsh.c, it includes multiple virsh source files, we need
      to have them distributed.
      b254cad9
    • E
      build: fix build without HAVE_CAPNG · 6f926c5e
      Eric Blake 提交于
      Otherwise, a build may fail with:
      
      lxc/lxc_conatiner.c: In function 'lxcContainerDropCapabilities':
      lxc/lxc_container.c:1662:46: error: unused parameter 'keepReboot' [-Werror=unused-parameter]
      
      * src/lxc/lxc_container.c (lxcContainerDropCapabilities): Mark
      parameter unused.
      6f926c5e
    • J
      daemon: Fix crash in virTypedParameterArrayClear · 6039a2cb
      Jiri Denemark 提交于
      Daemon uses the following pattern when dispatching APIs with typed
      parameters:
      
          VIR_ALLOC_N(params, nparams);
          virDomain*(dom, params, &nparams, flags);
          virTypedParameterArrayClear(params, nparams);
      
      In case nparams was originally set to 0, virDomain* API would fill it
      with the number of typed parameters it can provide and we would use this
      number (rather than zero) to clear params. Because VIR_ALLOC* returns
      non-NULL pointer even if size is 0, the code would end up walking
      through random memory. If we were lucky enough and the memory contained
      7 (VIR_TYPED_PARAM_STRING) at the right place, we would try to free a
      random pointer and crash.
      
      Let's make sure params stays NULL when nparams is 0.
      6039a2cb
  3. 30 7月, 2012 21 次提交
  4. 29 7月, 2012 1 次提交
  5. 28 7月, 2012 1 次提交
    • J
      security: Skip labeling resources when seclabel defaults to none · ce53382b
      Jiri Denemark 提交于
      If a domain is explicitly configured with <seclabel type="none"/> we
      correctly ensure that no labeling will be done by setting
      norelabel=true. However, if no seclabel element is present in domain XML
      and hypervisor is configured not to confine domains by default, we only
      set type to "none" without turning off relabeling. Thus if such a domain
      is being started, security driver wants to relabel resources with
      default label, which doesn't make any sense.
      
      Moreover, with SELinux security driver, the generated image label lacks
      "s0" sensitivity, which causes setfilecon() fail with EINVAL in
      enforcing mode.
      ce53382b