1. 18 12月, 2019 4 次提交
    • P
      util: storage: Don't treat files with missing backing store format as 'raw' · 3615e8b3
      Peter Krempa 提交于
      Assuming that the backing image format is raw is wrong when doing image
      detection:
      
      1) In -drive mode qemu will still probe the image format of the backing
         image. This means it will try to open a backing file of the image
         which will fail if a more advanced security model is in use.
      
      2) In blockdev mode the image will be opened as raw actually which is
         wrong since it might be qcow. Not opening the backing images will
         also end up in the guest seeing corrupted data.
      
      Rather than attempt to solve various corner cases when us assuming the
      storage file being raw and actually being right forbid startup when the
      guest image doesn't have the format specified in the metadata.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1588373Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      3615e8b3
    • P
      tests: storage: Remove unused test modes · a6493694
      Peter Krempa 提交于
      EXP_WARN and ALLOW_PROBE flags for the testStorageChain cases are no
      longer used so we can remove them.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      a6493694
    • P
      tests: storage: Use strict version of virStorageFileGetMetadata · 7e582fe9
      Peter Krempa 提交于
      Pass in 'true' as '@report_broken' of virStorageFileGetMetadata to make
      it fail in the tests. The most important code paths (when starting the
      VM) expect this function to fail rather than silently return partial
      data. Switch the test to exercise this more important code path.
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      7e582fe9
    • L
      qemu: homogenize MAC address in live & config when hotplugging a netdev · 6c17606b
      Laine Stump 提交于
      Prior to commit 55ce6564 (first in libvirt 4.6.0), the XML sent to
      virDomainAttachDeviceFlags() was parsed only once, and the results of
      that parse were inserted into both the live object of the running
      domain and into the persistent config. Thus, if MAC address was
      omitted from in XML for a network device (<interface>), both the live
      and config object would have the same MAC address.
      
      Commit 55ce6564 changed the code to parse the incoming XML twice -
      once for live and once for config. This does eliminate the problem of
      PCI (/scsi/sata) address conflicts caused by allocating an address
      based on existing devices in live object, but then inserting the
      result into the config (which may already have a device using that
      address), BUT it also means that when the MAC address of a network
      device hasn't been specified in the XML, each copy will get a
      different auto-generated MAC address.
      
      This results in the MAC address of the device changing the next time
      the domain is shutdown and restarted, which creates havoc with the
      guest OS's network config.
      
      There have been several discussions about this in the last > 1 year,
      attempting to find the ideal solution to this problem that makes MAC
      addresses consistent and accounts for all sorts of corner cases with
      PCI/scsi/sata addresses. All of these discussions fizzled out because
      every proposal was either too difficult to implement or failed to fix
      some esoteric case someone thought up.
      
      So, in the interest of solving the MAC address problem while not
      making the "other address" situation any worse than before, this patch
      simply adds a qemuDomainAttachDeviceLiveAndConfigHomogenize() function
      that (for now) copies the MAC address from the config object to the
      live object (if the original xml had <mac address='blah'/> then this
      will be an effective NOP (as the macs already match)).
      
      Any downstream libvirt containing upstream commit
      55ce6564 should have this patch as well.
      
      https://bugzilla.redhat.com/1783411Signed-off-by: NLaine Stump <laine@redhat.com>
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      6c17606b
  2. 17 12月, 2019 36 次提交