<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div>Dear virt-install developers:</div><div><br></div><div>I found one of my commands can run on virt-install 0.5x, but it fails on virt-install 0.6. </div><div>The problem is in _prepare_kernel_and_initrd function of DistroInstaller.py.</div><div><br></div><div>my command line is:</div><div><br></div><div>virt-install -n testredhat2 -r 1024 --vcpus=1 --disk path=/var/lib/libvirt/images/testredhat2.img,size=8 -l /mnt/ --initrd-inject=/home/gongys/redhat/ks.cfg  --extra-args "ks=file:/ks.cfg" --connect=qemu:///system --vnc -v --network bridge=br0  --dry-run -d</div><div><br></div>where my RHEL6.1-20110510.1-Server-x86_64-DVD1.iso is mounted at /mnt.<br><br>To fix it, I think we should add back three-line codes to set <span style="background-color: rgb(255, 0, 0);">_install_bootconfig  before we inject the
 initram:</span><br>   def _prepare_kernel_and_initrd(self, guest, meter):<br>        disk = None<br><br>        # If installing off a local path, map it through to a virtual CD/disk<br>        if (self.location is not None and<br>            self._location_is_path and<br>            not os.path.isdir(self.location)):<br><br>            device = VirtualDisk.DEVICE_CDROM<br>            if (self.is_xenpv() and<br>                not
 guest._lookup_osdict_key('pv_cdrom_install')):<br>                device = VirtualDisk.DEVICE_DISK<br><br>            disk = VirtualDisk(conn=guest.conn,<br>                               device=device,<br>                               path=self.location,<br>                              
 readOnly=True,<br>                               transient=True)<br><br>        # Make sure we always fetch kernel here if required<br>        if self._install_bootconfig.kernel and not self.scratchdir_required():<br>            return disk<br><br>        # Need to fetch the kernel & initrd from a remote site, or<br>        # out of a loopback mounted disk image/device<br>        ignore, os_type, os_variant, media =
 OSDistro.acquireKernel(guest,<br>                                                self.location, meter,<br>                                                self.scratchdir,<br>                                               
 self.os_type)<br>        (kernelfn, initrdfn, args) = media<br><br>        if guest.get_os_autodetect():<br>            if os_type:<br>                logging.debug("Auto detected OS type as: %s" % os_type)<br>                guest.os_type = os_type<br><br>            if (os_variant and guest.os_type == os_type):<br>                logging.debug("Auto detected OS variant as: %s" % os_variant)<br>                guest.os_variant =
 os_variant<br>                <br><span style="background-color: rgb(255, 0, 0);">        self._install_bootconfig.kernel = kernelfn</span><br style="background-color: rgb(255, 0, 0);"><span style="background-color: rgb(255, 0, 0);">        self._install_bootconfig.initrd = initrdfn</span><br style="background-color: rgb(255, 0, 0);"><span style="background-color: rgb(255, 0, 0);">        self._install_bootconfig.kernel_args = args</span><br>        <br>        self._tmpfiles.append(kernelfn)<br>        if initrdfn:<br>            self._tmpfiles.append(initrdfn)<br><br>        if
 self._initrd_injections:<br>            self._perform_initrd_injections()<br><br>        # If required, upload media to an accessible guest location<br>        kernelfn, initrdfn = self._upload_media(guest, meter,<br>                                                kernelfn, initrdfn)<br><br>        self._install_bootconfig.kernel = kernelfn<br>        self._install_bootconfig.initrd = initrdfn<br>        self._install_bootconfig.kernel_args = args<br><br>       
 return disk<br><br>Thanks<br><br></div></body></html>