0

I am trying to install RHEL7.9 KVM guest on Ubuntu 18.04 Azure VM. The anaconda installer fails due to some error but the virt-viewer screen got closed so fast, I was unable to read what is the exact error. I know all anaconda logs get stored in /tmp/anaconda.log file on the KVM guest disk image but I am unable to figure out a way to check the contents of the file. I tried mounting the KVM guest disk image using "mount -o loop .img " command but it fails with NTFS signature is missing, thats probably because the installation fails before the KVM guest's disk is partitioned properly. I am looking for ways to check the contents of that file. Is there any way to redirect the anaconda logs of the guest machine to the Ubuntu host machine ? Pasting the virt-install script and kickstart file used. The RHEL7.9 installation media was downloaded from https://developers.redhat.com/products/rhel/download site.

virt-install.sh

virt-install --location /datadrive/iso_images/rhel7.9-dvd.iso \
             --disk /datadrive/rhel79-oracle-$1.img,size=40,format=raw \
             --os-variant rhel7.0 \
             --initrd-inject ./ks-rhel79-oracle.cfg \
             --extra-args="ks=file:/ks-rhel79-oracle.cfg" \
             --vcpus 2 \
             --memory 2048 \
             --noreboot \
             --name rhel79-oracle-$1

ks-rhel79-oracle.cfg

#version=DEVEL
# System authorization information
auth --passalgo=sha512 --useshadow

text
firstboot --disable
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8
# Installation logging level
logging --level=debug
# Network information
network  --bootproto=dhcp --device=link --activate
network  --bootproto=dhcp --hostname=Azure-image
# Shutdown after installation
shutdown
# Root password
rootpw --plaintext password
# SELinux configuration
selinux --disabled
# System services
services --enabled="sshd,chronyd"
# Do not configure the X Window System
skipx
# System timezone
timezone US/Eastern
# System bootloader configuration
bootloader --append="rootdelay=60 mpath crashkernel=2048M intel_idle.max_cstate=1 processor.max_cstate=1 transparent_hugepage=never numa_balancing=disable mce=ignore_ce modprobe.blacklist=kvm_intel,kvm,iTCO_wdt,iTCO_vendor_support,sb_edac,edac_core" --location=mbr
# Partition scheme
zerombr
clearpart --all
# Disk partitioning information
part swap --fstype="swap" --size=32768
part / --fstype="xfs" --grow --size=6144

%post --logfile=/root/anaconda-composer.log --erroronfail
# Remove random-seed
rm /var/lib/systemd/random-seed

# Clear /etc/machine-id
rm /etc/machine-id
touch /etc/machine-id
%end

%packages
@base
%end

%addon com_redhat_kdump --enable --reserve-mb=2048

%end
SHALU
  • 11
  • 1
  • I was going through this bugzilla ticket: https://bugzilla.redhat.com/show_bug.cgi?id=576439 and the comment by "MingtaoNiu" at "2010-11-15 02:27:57 UTC" lists the steps needed to configure remote anaconda logging via virtio. I am unable to clone this repo, "git clone git://git.fedorahosted.org/git/anaconda.gitanaconda". When I run this git clone command, it just shows "Cloning into 'anaconda.gitanaconda'... " and then nothing. Its not a very simple process, has this process got improved by now ? – SHALU May 08 '21 at 19:13

1 Answers1

1

The below solution worked for me. Used below commands to start rsyslog on port 6080 on the host machine (Redhat7.8 Azure VM) and modified the virt-install script as below to direct anaconda logging to the host machine

yum install -y anaconda

mkdir -p /home/shaaga/remote_inst

eval `analog -p 6080 -o rsyslogd.conf -s /home/shaaga/remote_inst

virt-install --location /datadrive/iso_images/rhel7.9-dvd.iso --disk /datadrive/rhel79-oracle-$1.img,size=40,format=raw --os-variant rhel7.0 --initrd-inject ./ks-rhel79-oracle.cfg --extra-args="ks=file:/ks-rhel79-oracle.cfg" --vcpus 2 --memory 2048 --noreboot --name rhel79-oracle-$1 --channel tcp,host=127.0.0.1:6080,mode=connect,target_type=virtio,name=org.fedoraproject.anaconda.log.0

SHALU
  • 11
  • 1