1. 24 6月, 2016 1 次提交
  2. 16 5月, 2016 8 次提交
    • J
      xlconfigtests: use qemu-xen in all test data files · 2d302d79
      Jim Fehlig 提交于
      Some of the test configuration files in tests/xlconfigdata
      use the old qemu-dm as the emulator. Many of the configuration
      features tested (spice, rbd, multi-usb) are not even usable with
      the old qemu. Change these files to use the new qemu-xen (also
      known as qemu upstream) emulator.
      
      Note: This change fixes xlconfigtest failures when the old
      qemu is actually installed on the system. During device post
      parse, the libxl driver attempts to invoke the emulator to
      determine if it is the old or new qemu so it can properly set
      video RAM defaults. With the old qemu installed, the default
      video RAM was set differently than the expected value.
      Changing all the test data files to use qemu-xen ensures
      predictable results wrt default video RAM size.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      (cherry picked from commit b90c4b5f)
      2d302d79
    • J
      libxl: don't attempt to probe a non-existent emulator · 50b9de5b
      Jim Fehlig 提交于
      When probing the <emulator> with '-help' to determine if
      it is the old qemu, errors are reported if the emulator
      doesn't exist
      
      libvirt:  error : internal error: Child process
      (/usr/lib/xen/bin/qemu-dm -help) unexpected exit status 127:
      libvirt:  error : cannot execute binary /usr/lib/xen/bin/qemu-dm:
      No such file or directory
      
      Avoid the probe if the specified emulator doesn't exist,
      squelching the error. There is no behavior change since
      libxlDomainGetEmulatorType() would return
      LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN if the probe failed
      via virCommandRun().
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      (cherry picked from commit 400e716d)
      50b9de5b
    • J
      Fix tests to include video ram size · a086fa28
      Ján Tomko 提交于
      My commit 3e428670 started filling out the video size in post-parse,
      but did not adjust the tests.
      
      (cherry picked from commit 96b21fb0)
      a086fa28
    • J
      Fill out default vram in DeviceDefPostParse · 4dbcc6fb
      Ján Tomko 提交于
      Move filling out the default video (v)ram to DeviceDefPostParse.
      
      This means it can be removed from virDomainVideoDefParseXML
      and qemuParseCommandLine. Also, we no longer need to special case
      VIR_DOMAIN_VIRT_XEN, since the per-driver callback gets called
      before the generic one.
      
      (cherry picked from commit 538012c8)
      4dbcc6fb
    • J
      Call per-device post-parse callback even on implicit video · 41d837ae
      Ján Tomko 提交于
      Commit 6879be48 moved adding of an implicit video device after XML
      parsing. As a result, libxlDomainDeviceDefPostParse() is no longer
      called to set the default vram when adding an implicit device.
      Commit 6879be48 assumes virDomainVideoDefaultRAM() will set the
      default vram, but it returns 0 if the domain virtType is
      VIR_DOMAIN_VIRT_XEN. Attempting to start an HVM domain with vram=0
      results in
      
      error: unsupported configuration: videoram must be at least 4MB for CIRRUS
      
      The default vram setting for Xen HVM domains depends on the device
      model used (qemu-xen vs qemu-traditional), hence setting the
      default is deferred to libxlDomainDeviceDefPostParse().
      
      Call the device post-parse callback even for implicit video,
      to fill out the default vram even for VIR_DOMAIN_VIRT_XEN.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1334557Most-of-commit-message-by: NJim Fehlig <jfehlig@suse.com>
      (cherry picked from commit 3e428670)
      41d837ae
    • J
      Move virDomainDefPostParseInternal after virDomainDeviceDefPostParse · 2b574dca
      Ján Tomko 提交于
      Future commit will call DeviceDefPostParse on a device auto-added
      in DomainDefPostParse.
      
      (cherry picked from commit e4d131b8)
      2b574dca
    • J
      conf: use VIR_APPEND_ELEMENT in virDomainDefAddImplicitVideo · d460558e
      Ján Tomko 提交于
      (cherry picked from commit 12786889)
      d460558e
    • J
      conf: reduce indentation in virDomainDefAddImplicitVideo · 24cf4c64
      Ján Tomko 提交于
      Return early if there is nothing to do.
      
      (cherry picked from commit 1485be17)
      24cf4c64
  3. 06 5月, 2016 1 次提交
  4. 05 5月, 2016 19 次提交
  5. 21 4月, 2016 1 次提交
  6. 20 4月, 2016 10 次提交
    • J
      tests: fix xen-related tests · af20fbab
      Ján Tomko 提交于
      My commit 6879be48 moved the addition of the implicit video device
      from the XML parser to the PostParse function, but did not regenerate
      all the tests.
      
      (cherry picked from commit 4b35a715)
      af20fbab
    • C
      man: Clarify virsh vol-clone works within a single pool · d38a7c17
      Cole Robinson 提交于
      virsh vol-clone is expected to clone a volume within a single
      pool; it doesn't work for cloning across pools. Clarify the docs
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1103714
      (cherry picked from commit 2f1dc3de)
      d38a7c17
    • C
      network: Don't use ERR_NO_SUPPORT for invalid net-update requests · 2908ace2
      Cole Robinson 提交于
      VIR_ERR_NO_SUPPORT maps to the error string
      
          this function is not supported by the connection driver
      
      and is largely only used for when a driver doesn't have any
      implementation for a public API. So its usage with invalid
      net-update requests is a bit out of place. Instead use
      VIR_ERR_OPERATION_UNSUPPORTED which maps to:
      
          Operation not supported
      
      And is what qemu's hotplug routines use in similar scenarios
      
      (cherry picked from commit cdb4caac)
      2908ace2
    • C
      Revert "daemon: use socket activation with systemd" · 36f2f621
      Cole Robinson 提交于
      This reverts commit 1e9808d3.
      
      We shouldn't advertise libvirtd.socket activation, since currently
      it means VM/network/... autostart won't work as expected.
      
      We tried to find a middle ground by installing the config file without
      an [Install] section, since systemd won't allow .socket to be enabled
      without one... or at least it did do that; presently on f24 it allows
      activating the socket quite happily. This also caused user confusion[1]
      
      Just remove the socket file. I've filed a new RFE to track coming up
      with a solution to the autostart problem[2], we can point users at that
      if there's more confusion:
      
      [1]: https://bugzilla.redhat.com/show_bug.cgi?id=1279348
      [2]: https://bugzilla.redhat.com/show_bug.cgi?id=1326136
      
      (cherry picked from commit 3b9100a4)
      36f2f621
    • C
      Explicitly error on uri=qemu://system · 19e49128
      Cole Robinson 提交于
      It's a fairly common error that a user tries to connect to a URI
      like qemu://system or qemu://session (missing a slash). This errors
      like:
      
      $ virsh --connect qemu://session
      error: failed to connect to the hypervisor
      error: Unable to resolve address 'session' service '16514': No address associated with hostname
      
      If you already know that the standard qemu URI has 3 slashes, that
      error will make it obvious enough. But new user's may not get it.
      There's even a RHEL support page explicitly mentioning it!:
      
      https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Deployment_and_Administration_Guide/sect-Troubleshooting-Common_libvirt_errors_and_troubleshooting.html
      
      Catch this error early in libvirt.c virConnectOpen for qemu (and vbox
      which has similar rules
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1038304
      (cherry picked from commit 0d157957)
      19e49128
    • C
      lxc: explicitly error on interface type=ethernet · 8cb52464
      Cole Robinson 提交于
      It isn't implemented and does not work:
      
      error: internal error: guest failed to start: /usr/lib/libvirt/libvirt_lxc: option '--veth' requires an argument
      syntax: /usr/lib/libvirt/libvirt_lxc [OPTIONS] ...
      
      We previously threw an explicit error, but this changed in
      22cff52a , which I suspect was
      untested for LXC
      
      (cherry picked from commit 27f2b747)
      8cb52464
    • J
      tests: Fix syntax in iSCSI auth/secret tests · 35351d52
      John Ferlan 提交于
      While working on the tests for the secret initialization vector, I found
      that the existing iSCSI tests were lacking in how they defined the IQN.
      Many had IQN's of just 'iqn.1992-01.com.example' for one disk while using
      'iqn.1992-01.com.example/1' for the second disk (same for hostdevs - guess
      how they were copied/generated).
      
      Typically (and documented this way), IQN's would include be of the form
      'iqn.1992-01.com.example:storage/1' indicating an IQN using "storage" for
      naming authority specific string and "/1" for the iSCSI LUN.
      
      So modify the input XML's to use the more proper format - this of course
      has a ripple effect on the output XML and the args.
      
      Also note that the "%3A" is generated by the virURIFormat/xmlSaveUri
      to represent the colon.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      (cherry picked from commit dd140028)
      35351d52
    • J
      Libvirt: virTypedParamsValidate: Fix detection of multiple parameters · 791c90cb
      Jason J. Herne 提交于
      virTypedParamsValidate currently uses an index based check to find
      duplicate parameters. This check does not work. Consider the following
      simple example:
      
      We have only 2 keys
      A  (multiples allowed)
      B  (multiples NOT allowed)
      
      We are given the following list of parameters to check:
      A
      A
      B
      
      If you work through the validation loop you will see that our last iteration
      through the loop has i=2 and j=1. In this case, i > j and keys[j].value.i will
      indicate that multiples are not allowed. Both conditionals are satisfied so
      an incorrect error will be given: "parameter '%s' occurs multiple times"
      
      This patch replaces the index based check with code that remembers
      the name of the last parameter seen and only triggers the error case if
      the current parameter name equals the last one. This works because the
      list is sorted and duplicate parameters will be grouped together.
      
      In reality, we hit this bug while using selective block migration to migrate
      a guest with 5 disks. 5 was apparently just the right number to push i > j
      and hit this bug.
      
      virsh migrate --live guestname --copy-storage-all
                    --migrate-disks vdb,vdc,vdd,vde,vdf
                    qemu+ssh://dsthost/systemSigned-off-by: NJason J. Herne <jjherne@linux.vnet.ibm.com>
      Reviewed-by: NEric Farman <farman@linux.vnet.ibm.com>
      (cherry picked from commit 0e570a6a)
      791c90cb
    • J
      Resolve a couple of memory leaks · 58650d53
      John Ferlan 提交于
      Commit id '4b75237f' seems to have triggered Coverity into finding
      at least one memory leak in xen_xl.c for error path for cleanup where
      the listenAddr would be leaked. Reviewing other callers, it seems that
      qemu_parse_command.c would have the same issue, so just it too.
      
      (cherry picked from commit 727a3c58)
      58650d53
    • J
      libxl: use LIBXL_API_VERSION 0x040200 · 06791c14
      Jim Fehlig 提交于
      To ensure the libvirt libxl driver will build with future versions
      of Xen where the libxl API may change in incompatible ways,
      explicitly use LIBXL_API_VERSION 0x040200. The libxl driver
      does use new libxl APIs that have been added since Xen 4.2, but
      currently it does not make use of any changes made to existing
      APIs such as libxl_domain_create_restore or libxl_set_vcpuaffinity.
      The version can be bumped if/when the libxl driver consumes the
      changed APIs.
      
      Further details can be found in the following discussion thread
      
      https://www.redhat.com/archives/libvir-list/2016-April/msg00178.htmlSigned-off-by: NJim Fehlig <jfehlig@suse.com>
      (cherry picked from commit e7440656)
      06791c14