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

[libguestfs] [btrfs] Failed to create files with guestfish --remote in image file

Linking RHIVOS CVEs to...Migration: Automation ...RHELPRIO AssignedTeam ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • No
    • None
    • rhel-virt-tools
    • None
    • QE ack
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      What were you trying to do that didn't work?

      [libguestfs] [btrfs] Failed to create files with guestfish --remote in image file

      What is the impact of this issue to you?

      Please provide the package NVR for which the bug is seen:

      libguestfs-1.56.0-1.el10.1.x86_64

      kernel-6.12.0-95.el10.x86_64

      libguestfs-fssupport-10.1-3.el10.x86_64

      How reproducible is this bug?:

      100%

      Steps to reproduce

      1. Prepare a btrfs image, e.g.: esx8.0-sles15sp6-x86_64-efi-with-btrfs-sda
      2. Execute following commands:
      # qemu-img create -f qcow2 -F raw -o backing_file=esx8.0-sles15sp6-x86_64-efi-with-btrfs-sda tmp.qcow2
      eval `guestfish --listen`
      # eval `guestfish --listen`
      # guestfish --remote -- add tmp.qcow2
      # guestfish --remote -- run
      # mount_device=`guestfish --remote -- inspect-os`
      # guestfish --remote -- mount-options noatime $mount_device /
      # guestfish --remote -- mkdir-p /home/testdir
      # guestfish --remote -- write /home/testdir/testfile1 "testfile1"
      # guestfish --remote -- ln-s /home/testdir /home/testdir_link
      # guestfish --remote -- ln-s /home/testdir/testfile1 /home/testdir/testfile1_link
      # guestfish --remote -- ls /home/testdir
      testfile1
      testfile1_link
      #  guestfish --remote -- quit
      # virt-ls -R -a tmp.qcow2 /home/ 

      There is no "testfile1" and "testfile1_link"

      But following command can create the files as expected:

      # guestfish -a tmp.qcow2 -i <<EOF
        mkdir-p /home/testdir
        write /home/testdir/testfile1 "testfile1"
        ln-s /home/testdir /home/testdir_link
        ln-s /home/testdir/testfile1 /home/testdir/testfile1_link   
      EOF 

       

      Expected results

      Files can be created with guestfish --remote

      Actual results

      As above

              virt-maint virt-maint
              xchen@redhat.com Xiang Hua Chen
              virt-maint virt-maint
              Xiang Hua Chen Xiang Hua Chen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: