Using dvd for repo, failed to download metadata parse error

Latest response

I am running RHEL8 in aVM and using a DVD as the repo. When I do dnf repolist it lists the BaseOS and AppStream repositories on the DVD. If I run a script that tries to access the repo i get the error curl (37) ‘Failed to download metadata for repo …repomd.xml , parser error, file empty.
I have triple checked the repo settings, they seem correct.

Any ideas?

Responses

look at how the VM shows the CD. In my case it is listed as sr0

lsblk

mount on the fly

mount --verbose /dev/sr0 /mnt/

copy the templated from the ISO to the disk

cp --verbose /mnt/media.repo /etc/yum.repos.d/

permit the edit of the file

chmod --verbose 600 /etc/yum.repos.d/media.repo

add this info to the file
[BaseOS]
name=BaseOS
mediaid=None
metadata_expire=-1
gpgcheck=0
cost=500
baseurl=file:/mnt/ISO/BaseOS
[AppStream]
name=AppStream
mediaid=None
metadata_expire=-1
gpgcheck=0
cost=500
baseurl=file:/mnt/ISO/AppStream
I use another directory, so

mkdir --verbose /mnt/ISO

To make this permanent, edit

vim /etc/fstab

add

/dev/sr0 /mnt/ISO iso9660 ro,user,auto 0 0

run

mount --verbose --all

If there are not complains , you should be good

Saludos

No, this did not help the issue. To be clear I mounted the DVD which has the ISO attached to it via Xencenter. "failed to download metadta for repo 'dvd-baseOS' : repomd.xml parser error parse error at line 1 document is empty.

Alan,

We see that you attached the ISO through Xencenter.

  • Yes or no, did you or did you not mount the DVD to /mnt/ISO ?
  • When you do a repo file, please examine/compare and adjust your repo file with this Red Hat Solution at https://access.redhat.com/solutions/3776721
  • Please go through that entire solution's recommendations.
  • Make sure you do not have any conflicting *.repo files in the /etc/yum.repos.d/ directory

Let us know how it goes.

Regards,
RJ

I am relatively new to linux. I did this: mkdir -P /mnt/disc (or whatever command creates the parent too) mount /dev/sr0 /mnt/disc I mounted the DVD drive . Is this correct?

...Alan

Hi,

lsblk

and / or

findmnt --types iso9660

Should show if sr0 is mounted on the path.

Please share the output

Saludos

Alan Raczek,

I faced the same issue and was able to fix it. Please try to check the below two things:

  1. if the dvd image that you're using is not corrupted/broken.

  2. check if the baseurl mentioned in the media.repo file is correct.

Regards