Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-7492

Vm failed to start on the target host but libvirt still keep the vm paused on the source host when do postcopy

    • None
    • None
    • rhel-sst-virtualization
    • ssg_virtualization
    • 13
    • QE ack
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None

      Description of problem:
      Vm failed to start on the target host but libvirt still keep the vm paused on the source host when do postcopy

      Version-Release number of selected component (if applicable):
      libvirt-8.5.0-5.el9.x86_64
      qemu-kvm-7.0.0-11.el9.x86_64

      How reproducible:
      100%

      Steps to Reproduce:
      1.Do postcopy with a low postcopy speed(leave time to cancel postcopy):

      1. virsh migrate avocado-vt-vm1 qemu+ssh://*.com/system --live --p2p --verbose --bandwidth 10 --postcopy --timeout-postcopy --timeout 10 --postcopy-bandwidth 5

      2.Open another terminal, change the ownership of vm's disk to 'root:root':
      #chown root:root /var/lib/libvirt/images/nfs/ovmf.qcow2

      3.The migration in step 1 failed because the guest can not run on the target host:
      Migration: [ 1 %]error: internal error: unable to execute QEMU command 'cont': Could not open '/var/lib/libvirt/images/nfs/ovmf.qcow2': Permission denied

      4.Check the guest status on both source and target:
      source host:
      #virsh list
      Id Name State
      -------------------------------
      5 avocado-vt-vm1 paused

      target host:
      #virsh list
      no output

      5.Do migration again:

      1. virsh migrate avocado-vt-vm1 qemu+ssh://*.com/system --live --p2p --verbose --bandwidth 10 --postcopy --timeout-postcopy --timeout 10 --postcopy-bandwidth 5
        error: Requested operation is not valid: another migration job is already running for domain 'avocado-vt-vm1'

      Actual results:
      Vm failed to start on the target host but libvirt still keep the vm paused on the source host when do postcopy

      Expected results:
      Libvirt should keep the vm on the source running if guest failed to start on the target host.

      Additional info:

              jdenemar@redhat.com Jiri Denemark
              rhn-support-yafu Yan Fu
              Luyao Huang Luyao Huang
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated: