Bug 624536

Summary: kickstart nfs install do not work with kvm guests
Product: Red Hat Enterprise Linux 6 Reporter: Martin Jenner <mjenner>
Component: python-virtinstAssignee: Cole Robinson <crobinso>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: low    
Version: 6.0CC: berrange, xen-maint
Target Milestone: rcKeywords: RHELNAK
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-01 16:33:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
screen shot from virtual console tty4 none

Description Martin Jenner 2010-08-16 19:17:51 UTC
Description of problem:

If I boot a KVM virtual machine from the latest rhel6 boot.iso let it boot, hit tab to edit options and then append ks=http://<server>/test.cfg the install starts but halts on Error 'That directory could no be mounted from the server'

If I modify the kickstart to use either an http or ftp url I am able to continue the installation to completion.

cut and pasting the server/directory from the kickstart I am able to mount the nsf file system on the host installing the virtual machine.

The test kickstart is posted below, I left the test urls of the different install types for reference.

#version=RHEL6
install
#url --url=ftp://download.lab.bos.redhat.com/redhat/rel-eng/RHEL6.0-20100811.2/6/Server/x86_64/os
#url --url=http://download.lab.bos.redhat.com/redhat/rel-eng/RHEL6.0-20100811.2/6/Server/x86_64/os
nfs --server=storage.bos.redhat.com --dir=/vol/engineering/devarchive/redhat/rel-eng/RHEL6.0-20100811.2/6/Server/x86_64/os
lang en_US.UTF-8
keyboard us
network --device eth0 --bootproto dhcp
rootpw  123456
firewall --service=ssh
authconfig --enableshadow --passalgo=sha512 --enablefingerprint
selinux --enforcing
timezone --utc America/New_York
bootloader --location=mbr --driveorder=vda --append=""
zerombr yes
text
cmdline
reboot
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
clearpart --linux --initlabel --drives=vda
ignoredisk --only-use=vda
#autopart
part /boot --fstype=ext4 --size=500
part / --fstype=ext4 --size=500 --grow
part swap --size=576 --grow --maxsize=2048 --ondisk=vda


%packages
@base
@core
expect
%end


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


How reproducible:
100%

Steps to Reproduce:
1. /usr/sbin/virt-install --connect qemu:///system --hvm --name kvm_rhel60_64_raw --ram 3048 --vcpus=2 --vnc --cdrom /var/lib/libvirt/boot/boot.iso --disk path=/var/lib/libvirt/images/kvm_rhel60_64.img.raw,size=6,device=disk,bus=virtio --os-variant=rhel6 --accelerate --debug --network network=default,model=virtio
2. hit tab to and append ks=http://server/ks/test.cfg
3.
  
Actual results:
installation gets halted

Expected results:
the installation should proceed to completion using nfs server

Additional info:

I was able to install this tree with virt-manager but it used a different method to do nfs installs copying the initrd/kernel pairs locally to start the install

Comment 2 Chris Lumens 2010-08-16 19:32:38 UTC
I believe you have to pass some special networking flags to make NFS work in virt installs, though I do not remember them offhand nor am I able to find a reference quickly enough.

Comment 3 RHEL Program Management 2010-08-16 19:38:42 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 4 Martin Jenner 2010-08-16 20:20:35 UTC
I found there is a --opts= for passing the arguments wondering what I need to pass 'ro' did not do it

 nfs — Install from the NFS server specified.

    *
      --server=
      Server from which to install (hostname or IP).
    *
      --dir=
      Directory containing the variant directory of the installation tree.
    *
      --opts=
      Mount options to use for mounting the NFS export. (optional)

Comment 5 Martin Jenner 2010-08-16 21:49:23 UTC
Created attachment 439018 [details]
screen shot from virtual console tty4

I noticed errors on virtual console 4 providing in case they mean something.

I have not been able to get an nfs install to started so far trying various options found by looking at nfs mounted filesystems on other servers. So if you have any thoughts I would welcome them.

Comment 6 Daniel Berrangé 2010-08-17 09:31:07 UTC
I see you are using the 'default' virtual network. This is a NAT based setup. As part of fixing a recent CVE we added extra NAT rules to ensure that all guest IP connections get re-written to have a source port > 1024. If your NFS server has a restrictive policy with the 'secure' flag set against the NFS volume, guests will not be able to access it. In such a case use the 'insecure' flag for the NFS volume, so that it allows access from source ports > 1024.

Comment 7 RHEL Program Management 2010-08-18 21:29:43 UTC
Thank you for your bug report. This issue was evaluated for inclusion
in the current release of Red Hat Enterprise Linux. Unfortunately, we
are unable to address this request in the current release. Because we
are in the final stage of Red Hat Enterprise Linux 6 development, only
significant, release-blocking issues involving serious regressions and
data corruption can be considered.

If you believe this issue meets the release blocking criteria as
defined and communicated to you by your Red Hat Support representative,
please ask your representative to file this issue as a blocker for the
current release. Otherwise, ask that it be evaluated for inclusion in
the next minor release of Red Hat Enterprise Linux.

Comment 10 Cole Robinson 2010-12-01 16:33:59 UTC
Closing as a dup of the libvirt security bug

*** This bug has been marked as a duplicate of bug 602455 ***