clalancette / oz

Automated installation for guest images
GNU Lesser General Public License v2.1
310 stars 129 forks source link

CentOS 6.3 installation fail #56

Closed remustata closed 11 years ago

remustata commented 11 years ago

I am running the latest version of oz on a ubuntu12.04(precise)32-bit machine. I tried to install CentOS 6.3 and it failed due to the 300second timeout There is only a libvirt version: 0.9.8 for my version of ubuntu and I presume that might be my problem. Also, the screenshot does not work and it never did for my system.

Here is the complete output:

root@remus-pc-unix:/home/remus/oz# ./oz-install -d3 -u centos.tdl 
libvirt bridge name is virbr0
Libvirt type is kvm
Name: centos32-6, UUID: fa2a2c8d-fddf-4bea-8153-02cf1886eca7
MAC: 52:54:00:96:c2:e2, distro: CentOS-6
update: 3, arch: i386, diskimage: /var/lib/libvirt/images/centos32-6.dsk
nicmodel: virtio, clockoffset: utc
mousetype: ps2, disk_bus: virtio, disk_dev: vda
icicletmp: /var/lib/oz/icicletmp/centos32-6, listen_port: 51793
Original ISO path: /var/lib/oz/isos/CentOS-63i386-iso.iso
Modified ISO cache: /var/lib/oz/isos/CentOS-63i386-iso-oz.iso
Output ISO path: /var/lib/libvirt/images/centos32-6-iso-oz.iso
ISO content path: /var/lib/oz/isocontent/centos32-6-iso
Checking for guest conflicts with centos32-6
Generating install media
Fetching the original media
Attempting to get the lock for /var/lib/oz/isos/CentOS-63i386-iso.iso
Got the lock, doing the download
Original install media available, using cached version
Copying ISO contents for modification
Setting up guestfs handle for centos32-6
Adding ISO image /var/lib/oz/isos/CentOS-63i386-iso.iso
Launching guestfs
warning: Unable to get device geometry for /var/tmp/guestfs.ZOtiSE/root
Mounting ISO
Checking if there is enough space on the filesystem
Extracting ISO contents
Putting the kickstart in place
Modifying isolinux.cfg
Generating new ISO
Cleaning up old ISO data
Generating 10GB diskimage for centos32-6
Running install for centos32-6
Generate XML for guest centos32-6 with bootdev cdrom
Generated XML:
<?xml version="1.0"?>
<domain type="kvm">
  <name>centos32-6</name>
  <memory>1048576</memory>
  <currentMemory>1048576</currentMemory>
  <uuid>fa2a2c8d-fddf-4bea-8153-02cf1886eca7</uuid>
  <clock offset="utc"/>
  <vcpu>1</vcpu>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <os>
    <type>hvm</type>
    <boot dev="cdrom"/>
  </os>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>destroy</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <graphics port="-1" type="vnc"/>
    <interface type="bridge">
      <source bridge="virbr0"/>
      <mac address="52:54:00:96:c2:e2"/>
      <model type="virtio"/>
    </interface>
    <input bus="ps2" type="mouse"/>
    <console type="pty">
      <target port="0"/>
    </console>
    <serial type="tcp">
      <source mode="bind" host="127.0.0.1" service="51793"/>
      <protocol type="raw"/>
      <target port="1"/>
    </serial>
    <disk device="disk" type="file">
      <target dev="vda" bus="virtio"/>
      <source file="/var/lib/libvirt/images/centos32-6.dsk"/>
    </disk>
    <disk type="file" device="cdrom">
      <source file="/var/lib/libvirt/images/centos32-6-iso-oz.iso"/>
      <target dev="hdc"/>
    </disk>
  </devices>
</domain>

Waiting for centos32-6 to finish installing, 1200/1200
Waiting for centos32-6 to finish installing, 1190/1200
Waiting for centos32-6 to finish installing, 1180/1200
Waiting for centos32-6 to finish installing, 1170/1200
Waiting for centos32-6 to finish installing, 1160/1200
Waiting for centos32-6 to finish installing, 1150/1200
Waiting for centos32-6 to finish installing, 1140/1200
Waiting for centos32-6 to finish installing, 1130/1200
Waiting for centos32-6 to finish installing, 1120/1200
Waiting for centos32-6 to finish installing, 1110/1200
Waiting for centos32-6 to finish installing, 1100/1200
Waiting for centos32-6 to finish installing, 1090/1200
Waiting for centos32-6 to finish installing, 1080/1200
Waiting for centos32-6 to finish installing, 1070/1200
Waiting for centos32-6 to finish installing, 1060/1200
Waiting for centos32-6 to finish installing, 1050/1200
Waiting for centos32-6 to finish installing, 1040/1200
Waiting for centos32-6 to finish installing, 1030/1200
Waiting for centos32-6 to finish installing, 1020/1200
Waiting for centos32-6 to finish installing, 1010/1200
Waiting for centos32-6 to finish installing, 1000/1200
Waiting for centos32-6 to finish installing, 990/1200
Waiting for centos32-6 to finish installing, 980/1200
Waiting for centos32-6 to finish installing, 970/1200
Waiting for centos32-6 to finish installing, 960/1200
Waiting for centos32-6 to finish installing, 950/1200
Waiting for centos32-6 to finish installing, 940/1200
Waiting for centos32-6 to finish installing, 930/1200
Waiting for centos32-6 to finish installing, 920/1200
Waiting for centos32-6 to finish installing, 910/1200
Waiting for centos32-6 to finish installing, 900/1200
Waiting for centos32-6 to finish installing, 890/1200
Waiting for centos32-6 to finish installing, 880/1200
Waiting for centos32-6 to finish installing, 870/1200
Failed to take screenshot
Cleaning up guest named centos32-6
Cleaning up after install
---------------------------------------------------------------------------
OzException                               Traceback (most recent call last)
/home/remus/oz/oz-install in <module>()
    144         try:
    145             guest.generate_diskimage(size=guest.disksize, force=force_download)
--> 146             libvirt_xml = guest.install(timeout, force_download)
    147         except:
    148             guest.cleanup_old_guest()

/home/remus/oz/oz/Guest.pyc in install(self, timeout, force)
   1531         Method to run the operating system installation.
   1532         """
-> 1533         return self._do_install(timeout, force, 0)
   1534 
   1535     def _check_pvd(self):

/home/remus/oz/oz/Guest.pyc in _do_install(self, timeout, force, reboots)
   1513 
   1514         dom = self.libvirt_conn.createXML(xml, 0)
-> 1515         self._wait_for_install_finish(dom, timeout)
   1516 
   1517         for i in range(0, reboots):

/home/remus/oz/oz/Guest.pyc in _wait_for_install_finish(self, libvirt_dom, count, inactivity_timeout)
    661             # we presume the install has hung.  Fail here

    662             screenshot_text = self._capture_screenshot(libvirt_dom.XMLDesc(0))
--> 663             raise oz.OzException.OzException("No disk activity in %d seconds, failing.  %s" % (inactivity_timeout, screenshot_text))
    664 
    665         # We get here only if we got a libvirt exception

OzException: No disk activity in 300 seconds, failing.  Failed to take screenshot
Exception AttributeError: "'NoneType' object has no attribute 'virConnectClose'" in <bound method virConnect.__del__ of <libvirt.virConnect instance at 0xaa4480c>> ignored
Exception AttributeError: "'NoneType' object has no attribute 'xmlFreeDoc'" in <bound method TDL.__del__ of <oz.TDL.TDL object at 0xa35bdec>> ignored

And here is the tdl file:

<template>
  <name>centos32-6</name>
  <os>
    <name>CentOS-6</name>
    <version>3</version>
    <arch>i386</arch>
    <install type='iso'>
      <iso>http://centos.psw.net/centos/6.3/isos/i386/CentOS-6.3-i386-netinstall.iso</iso>
    </install>
    <rootpw>notrandom</rootpw>
  </os>

   <files>
     <file name='/home/post_install_script_bin' type='raw'>
        bla
   </file>

  </files>

<commands>
    <command name='cmd1'>
    ls -l > ls_test.txt
    </command>

  </commands>

  <description>CentOS-6</description>
</template>
remustata commented 11 years ago

I think I figured out what is the problem. I used a netinstall iso to install it. With a dvd iso it works

anyway, here is a screenshot of where it stops using a netinstall iso: centos32-6-1358026256 83

remustata commented 11 years ago

The install failed because I used netinstall. Tried it with a normal dvd iso and it works