1. 25 2月, 2015 4 次提交
    • M
      qemu: Use correct flags for ABI stability check in SaveImageUpdateDef · cf2d4c60
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1183869
      
      Soo. you've successfully started yourself a domain. And since you want
      to use it on your host exclusively you are confident enough to
      passthrough the host CPU model, like this:
      
        <cpu mode='host-passthrough'/>
      
      Then, after a while, you want to save the domain into a file (e.g.
      virsh save dom dom.save). And here comes the trouble. The file consist
      of two parts: Libvirt header (containing domain XML among other
      things), and qemu migration data. Now, the domain XML in the header is
      formatted using special flags (VIR_DOMAIN_XML_SECURE |
      VIR_DOMAIN_XML_UPDATE_CPU | VIR_DOMAIN_XML_INACTIVE |
      VIR_DOMAIN_XML_MIGRATABLE).
      
      Then, on your way back from the bar, you think of changing something
      in the XML in the saved file (we have a command for it after all), say
      listen address for graphics console. So you successfully type in the
      command:
      
        virsh save-image-edit dom.save
      
      Change all the bits, and exit the editor. But instead of success
      you're left with sad error message:
      
        error: unsupported configuration: Target CPU model <null> does not
        match source Pentium Pro
      
      Sigh. Digging into the code you see lines, where we check for ABI
      stability. The new XML you've produced is compared with the old one
      from the saved file to see if qemu ABI will break or not. Wait, what?
      We are using different flags to parse the XML you've provided so we
      were just lucky it worked in some cases? Yep, that's right.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      cf2d4c60
    • M
      cpu: Format <cpu/> properly · 0e69d976
      Michal Privoznik 提交于
      Well, not that we are not formatting invalid XML, rather than not as
      beautiful as we can:
      
        <cpu mode='host-passthrough'>
        </cpu>
      
      If there are no children, let's use the singleton element.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      0e69d976
    • M
      virCPUDefFormatBufFull: Use our general error handling pattern · 33912cc0
      Michal Privoznik 提交于
      Well, so far there are no variables to free, no cleanup work needed on
      an error, so bare 'return -1;' after each error is just okay. But this
      will change in a while.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      33912cc0
    • M
      util: Introduce virBufferAddBuffer · 83c5467e
      Michal Privoznik 提交于
      This API joins the following two lines:
      
      char *s = virBufferContentAndReset(buf1);
      virBufferAdd(buf2, s, -1);
      
      into one:
      
      virBufferAddBuffer(buf2, buf1);
      
      With one exception: there's no re-indentation applied to @buf1.
      The idea is, that in general both can have different indentation
      (like the test I'm adding proves)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      83c5467e
  2. 24 2月, 2015 5 次提交
  3. 23 2月, 2015 2 次提交
    • D
      po: Add config file for zanata · 4989d41b
      Daniel P. Berrange 提交于
      Add configuration file for use with https://fedora.zanata.org
      translation system
      4989d41b
    • M
      libvirt-guests: Allow time sync on guests resume · 0fa15b19
      Michal Privoznik 提交于
      Well, imagine domains were running, and as the host went down, they
      were managesaved. Later, after some time, the host went up again and
      domains got restored. But without correct time. And depending on how
      long was the host shut off, it may take some time for ntp to sync the
      time too. But hey, wait a minute. We have an API just for that! So:
      
      1) Introduce SYNC_TIME variable in libvirt-guests.sysconf to allow
      users control over the new functionality
      2) Call 'virsh domtime --sync $dom' in the libvirt-guests script.
      
      Unfortunately, this is all-or-nothing approach (just like anything
      else with the script). Domains are required to have configured and
      running qemu-ga inside.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      0fa15b19
  4. 22 2月, 2015 1 次提交
  5. 21 2月, 2015 28 次提交