Uploaded image for project: 'OpenShift Virtualization'
  1. OpenShift Virtualization
  2. CNV-24497

[2162252] Got 'SyncVMI failed' when hotplug a NFS disk to a NFS VM

XMLWordPrintable

    • Storage Core Sprint 236, Storage Core Sprint 237
    • Important
    • None

      Description of problem:
      Events:
      Type Reason Age From Message
      ---- ------ ---- ---- -------
      Normal SuccessfulCreate 11m virtualmachine-controller Created virtual machine pod virt-launcher-vm-fedora-c4lg4
      Normal Created 11m virt-handler VirtualMachineInstance defined.
      Normal Started 11m virt-handler VirtualMachineInstance started.
      Normal SuccessfulCreate 11m virtualmachine-controller Created attachment pod hp-volume-bgzzw
      Normal SuccessfulCreate 11m (x6 over 11m) virtualmachine-controller Created hotplug attachment pod hp-volume-bgzzw, for volume blank-dv
      Normal VolumeMountedToPod 11m virt-handler Volume blank-dv has been mounted in virt-launcher pod
      Warning SyncFailed 112s (x447 over 11m) virt-handler server error. command SyncVMI failed: "LibvirtError(Code=1, Domain=10, Message='internal error: unable to execute QEMU command 'device_add': Failed to get \"write\" lock')"

      Version-Release number of selected component (if applicable):
      CNV 4.12.0

      How reproducible:
      Always

      Steps to Reproduce:
      1. Import DV (nfs) and create VM
      2. Create a blank dv(nfs)
      3. Hotplug the disk to VM
      $virtctl addvolume vm-fedora --volume-name=blank-dv
      4. Describe the vmi

      Actual results:
      Got error as description for vmi
      Volume blank-dv has been mounted in virt-launcher pod
      Warning SyncFailed 112s (x447 over 11m) virt-handler server error. command SyncVMI failed: "LibvirtError(Code=1, Domain=10, Message='internal error: unable to execute QEMU command 'device_add': Failed to get \"write\" lock')"

      and volume status is keeping in VolumeMountedToPod

      volumeStatus:

      • hotplugVolume:
        attachPodName: hp-volume-bgzzw
        attachPodUID: 9c2e93b3-edac-48d9-bbf8-cf679ae9b8fd
        message: Volume blank-dv has been mounted in virt-launcher pod
        name: blank-dv
        persistentVolumeClaimInfo:
        accessModes:
      • ReadWriteOnce
        capacity:
        storage: 5Gi
        filesystemOverhead: "0.055"
        requests:
        storage: 1Gi
        volumeMode: Filesystem
        phase: MountedToPod
        reason: VolumeMountedToPod
        target: ""

      Expected results:
      VolumeReady in vmi's volumeStatus, hotplug works without error

      Additional info:


      apiVersion: cdi.kubevirt.io/v1alpha1
      kind: DataVolume
      metadata:
      name: dv1
      spec:
      source:
      http:
      url: http://url/fedora-images/Fedora-Cloud-Base-34-1.2.x86_64.qcow2
      pvc:
      accessModes:

      • ReadWriteOnce
        resources:
        requests:
        storage: 10Gi
        storageClassName: nfs
        volumeMode: Filesystem
        contentType: kubevirt


      apiVersion: kubevirt.io/v1
      kind: VirtualMachine
      metadata:
      labels:
      kubevirt.io/vm: vm-fedora
      name: vm-fedora
      spec:
      running: true
      template:
      metadata:
      labels:
      kubevirt.io/vm: vm-fedora
      spec:
      domain:
      devices:
      disks:

      • disk:
        bus: virtio
        name: dv-disk
      • disk:
        bus: virtio
        name: cloudinitdisk
        resources:
        requests:
        memory: 1024Mi
        terminationGracePeriodSeconds: 0
        volumes:
      • name: dv-disk
        dataVolume:
        name: dv1
      • cloudInitNoCloud:
        userData: |-
        #cloud-config
        password: fedora
        chpasswd: { expire: False }

        echo 'printed from cloud-init userdata'
        name: cloudinitdisk


      apiVersion: cdi.kubevirt.io/v1beta1
      kind: DataVolume
      metadata:
      name: blank-dv
      spec:
      source:
      blank: {}
      pvc:
      accessModes:

      • ReadWriteOnce
        resources:
        requests:
        storage: 1Gi
        storageClassName: nfs
        volumeMode: Filesystem

              rhn-support-awels Alexander Wels
              yadu1@redhat.com Yan Du
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: