Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1457846

Summary: [Doc-Bug] add more steps while installing RHVH from kickstart file PXE boot.
Product: Red Hat Enterprise Virtualization Manager Reporter: Ulhas Surse <usurse>
Component: rhev-hypervisor-ngAssignee: Ryan Barry <rbarry>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0.7CC: dfediuck, ylavi
Target Milestone: ---Flags: lsvaty: testing_plan_complete-
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-08 06:49:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Docs RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ulhas Surse 2017-06-01 12:14:26 UTC
Description of problem:
While installing RHVH 4.1 via PXE, there is an error, "NoSuchGroup: Core".

When installing RHVH4.1 via the graphical mode, it requires you to configure a  "software selection" otherwise you cannot select "begin installtion" button. When selecting "software selection" you cannot enter any groups and a pop-up error message states "An unknown error has occurred"

Version-Release number of selected component (if applicable):
RHVH 4.1 

How reproducible:
Always

Steps to Reproduce:
1. Try to install RHVH 4.1 pxebooting ks file. 
2. Installation failed with error.
.

Actual results:
Installation failed with "NoSuchGroup: Core" error.

Expected results:
Installation success!

Additional info:
1] When installation done with following KS file, it failed:

~~~
cd /tmp
rpm2cpio /run/install/repo/Packages/redhat-virtualization-host-image-update*|cpio -ivd
squashfs=$(find|grep squashfs|grep -v meta)
ln -s $squashfs /tmp/squashfs
%end
liveimg --url=file:///tmp/squashfs
ignoredisk --only-use=sda
clearpart --all
autopart --type=thinp
lang en_US.UTF-8
keyboard --vckeymap=us --xlayouts='us'
rootpw --iscrypted <pwd hash>
timezone --utc America/Los_Angeles --ntpserver ntp_server1,ntp_server2
reboot
%post --erroronfail
imgbase layout --init
%end
~~~

After adding following lines to the KS file, the installation worked.

~~~
%pre --log=/tmp/pre.log
mkdir /run/install/repo/Packages
wget http://yum-master.domain.com/rhev/rhvh4.1/Packages/redhat-virtualization-host-image-update-4.1-20170417.0.el7_3.noarch.rpm -O /run/install/repo/Packages/redhat-virtualization-host-image-update-4.1-20170417.0.el7_3.noarch.rpm
wget http://yum-master.domain.com/rhev/rhvh4.1/Packages/redhat-virtualization-host-productimg-4.1-0.2.el7.x86_64.rpm -O /run/install/repo/Packages/redhat-virtualization-host-productimg-4.1-0.2.el7.x86_64.rpm
~~~

SUMMARY:
=========

This is the default kickstart file from the ISO:

%pre
cd /tmp
rpm2cpio /run/install/repo/Packages/redhat-virtualization-host-image-update*|cpio -ivd
squashfs=$(find|grep squashfs|grep -v meta)
ln -s $squashfs /tmp/squashfs
%end
liveimg --url=file:///tmp/squashfs
autopart --type=thinp
%post --erroronfail
imgbase layout --init
%end


So, it is extracting the redhat-virtualization-host-image-update rpm and using that squashfs.img file which is provided by that package from pre installation script.

It takes this package from /run/install/repo/Packages/ directory since, ISO is mounted at /run/install/repo directory during installation. 

Since, customer is using PXE, we need to modify the above %pre script.

rpm2cpio will never find the rpm inside /run/install/repo/Packages/ directory during pxe unless we manually place it there.

So, we need to wget the package and then extract it at that location.

These steps are missing from the document. 

Can we add these steps to wget and extract the rpm where it is required ? Or suggest any alternative.

Comment 1 Ryan Barry 2017-06-01 12:19:48 UTC
The recommended method for PXE is to extract the RPM on another system and host the squashfs file directly, with:

liveimg --url http://.....

The existing KS (and %pre script) are intended as a way to do it in one step from the ISO, not as a universal kickstart.

Comment 2 Ulhas Surse 2017-06-01 12:42:53 UTC
Hello Ryan,

Thanks for the quick update. My bad i did not attached the document link in previous update. Here it is: 

https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.1/html/installation_guide/advanced_rhvh_install

So in the document, these steps should be mentioned/ modified.

Comment 3 Ryan Barry 2017-06-01 15:26:07 UTC
Hey Ulhas -

This is documented in your link, including an example KS which would not require a %pre script to fetch and extract.

The example kickstart in section 6.1 works as-is. The squashfs should be hosted elsewhere. If they want to host it locally, a %pre script can be used to fetch and extract (or use it from a local disk partition). 

The RHV documentation cannot cover every use of kickstart, though.