LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   RedHat Linux KVM installation / FTP or HTTP Kickstart (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/redhat-linux-kvm-installation-ftp-or-http-kickstart-4175495917/)

pankajjaura 02-23-2014 02:31 AM

RedHat Linux KVM installation / FTP or HTTP Kickstart
 
Hi Linux Experts,

This is my first question on LQ. Finally i registered here to seek some advice from you all experts where I am kind of stuck. Below is the problem description:

Context: Trying to install a virtual machine KVM based on my RedHat Linux 6.4 x86_64 bit server using kickstart file & ftp server as installation server.

Installation Process: I start my virt-manager on target server , create new domain & boot it from local DVD. Once on first boot screen for RHEL , I press tab and give below command to specify my kickstart file location , and press enter.

ks=ftp://10.0.0.15/kickstart.cfg

Virtual machine picks up the kicksstart file from FTP server and starts creating the partitions as I have I put in kickstart file. Once partitions are made, process throws an error:

"Unable to read package metadata... Cannot retrieve repository metadata(repomd.xml) for repository: anaconda-base-201004300022.i386. Please verify its path and try again "

What works I know & steps taken to troubleshoot :
1. FTP server and access to subnet works without any issue
2. Firewall & SELINUX are disabled for this installation, just to avoid any unnecessary issues.
3. The installation server files are copied to target location with below command from RHEL DVD

cp -ar /media/. /var/ftp/pub/ftpinstall

Your help will be much appreciated for this issue.
Thanks
PJ

dyasny 02-23-2014 02:25 PM

have you tried with another DVD?

pankajjaura 02-23-2014 05:37 PM

No, because this works fine if I install medium is CDROM instead of ftp.

dyasny 02-23-2014 09:39 PM

did you just point to the dvd mountpoint, or copy the files? if you copy the dvd, you might have to rerun createrepo

ericson007 02-23-2014 10:00 PM

If evrrything is configured properly and you can verify that you can install from ftp without kickstart, then it is likely that you have set the wrong source or a conflicting source as the install root in the kickstart file. If you just copied the anaconda one, remember to change the source to network install from ftp

pankajjaura 02-23-2014 10:17 PM

I copied the files from dvd with below command. Can you please help as to what are the steps if I have to createrepo

Cp -ar /media/dvd/. /var/ftp/pub/install

dyasny 02-23-2014 11:04 PM

man createrepo, it's quite simple.
The command will regenerate the repo files required for running a local repo

ericson007 02-24-2014 02:08 AM

Create repo seems like over kill. The op is likely trying to study for the rhcsa from the way the question is phrased.

Can you show the output of getenforce, post the first section of your kickstart and the permissions of the ftp folder where the install tree is copied to?

For those purposes, there is no need to recreate a repo. Many people have successfully done this operation both on test systems and the exams.

pankajjaura 02-24-2014 09:10 AM

From the FTP installation server:

[root@i5VirtualServer pub]# getenforce
Enforcing
[root@i5VirtualServer pub]# sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: enforcing
Mode from config file: enforcing
Policy version: 24
Policy from config file: targeted

[root@i5VirtualServer pub]# pwd ; ls -ltr
/var/ftp/pub
dr-xr-xr-x. 13 root root 4096 Feb 23 01:06 ftpinstall

From the server I am doing installation on:
[root@latitudepro13 jauras]# getenforce ; sestatus
Enforcing
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: enforcing
Mode from config file: enforcing
Policy version: 24
Policy from config file: targeted
[root@latitudepro13 jauras]#

Kickstrat top section

#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Firewall configuration
firewall --enabled --ssh --service=ssh
# Install OS instead of upgrade
install
# Use network installation
url --url="ftp://10.0.0.15/pub/ftpinstall"

ericson007 02-24-2014 04:20 PM

So Selinux is not disabled like you stated.
Relable the ftp folder

Restorcon -Rv /path-to-ftp

Or

chcon -R -t public_content_t /var/ftp

pankajjaura 02-24-2014 04:52 PM

@ Ericson - correct, SELinux was enabled after couple of tries and below was run before I pasted the prior update for this:

chcon -R --reference /var/ftp/pub / var/ftp/pub/ftpinstall.

The instructions you are giving are doing the same as the action for SELinux is public_content_t by default, am I missing something here?

Thanks.

ericson007 02-24-2014 05:45 PM

Try the following.

Confirm ftpserver port 21 open.

iptables -L

Change kickstart to

url --url ftp://server/dir

So take out the = and ""

pankajjaura 02-25-2014 09:07 PM

@ericson007 - thank you!. the trick to take = , "" actually works

ericson007 02-26-2014 02:26 AM

Not a trick. Taken straight from the manual following the text format they recommend. But glad it worked.

f0olyc0oly 08-14-2014 07:48 PM

hi guys, sorry for replying to a thread that is solved already but I encountered the same problem as pankajjaura. but the steps provided didn't fix my problem. any other advice?

i created a separate thread for this as well..

many thanks!


All times are GMT -5. The time now is 07:17 PM.