This discussion is archived
1 2 Previous Next 15 Replies Latest reply: Feb 14, 2013 7:15 PM by Avi Miller RSS

Creating an Oracle Linux PVM Using virt-install

960874 Newbie
Currently Being Moderated
I've copied the contents of the Oracle Linux 6.3 installation media to an directory that's exported via NFS:
san2:~ # ls -1 /srv/md128/repositories/oracle/6.3/os/x86_64/
EFI
EULA
eula.en_US
eula.py
GPL
HighAvailability
images
isolinux
LoadBalancer
media.repo
Packages
README-en
README-en.html
RELEASE-NOTES-en
RELEASE-NOTES-en.html
RELEASE-NOTES-x86_64-en
RELEASE-NOTES-x86_64-en.html
RELEASE-NOTES-x86-en
RELEASE-NOTES-x86-en.html
repodata
ResilientStorage
RPM-GPG-KEY
RPM-GPG-KEY-oracle
ScalableFileSystem
Server
supportinfo
TRANS.TBL
UEK2
...and tried to use the directory to install an Oracle Linux VM with virt-install:
xen2:~ # virt-install -p --name dns2 --ram 786 --disk /dev/disk/by-id/scsi-14945540000000000705f69534353492d73616e315f310000 --location nfs://192.168.0.2/srv/md128/repositories/oracle/6.3/os/x86_64/ --graphics none
...but virt-install complains:
Starting install...
ERROR    Couldn't find xen kernel for Red Hat Enterprise Linux tree.
If I use the NFS respository with virt-manager, virt-manager complains...
Error: coercing to Unicode: need string or buffer, instance found
What is causing these failures?This is a tried-and-true methodology: I use this method for installing CentOS & SuSE regularly:
san2:~ # ls -1 /srv/md128/repositories/centos/6.3/os/x86_64/
CentOS_BuildTag
.discinfo
EFI
EULA
GPL
images
isolinux
Packages
RELEASE-NOTES-en-US.html
repodata
RPM-GPG-KEY-CentOS-6
RPM-GPG-KEY-CentOS-Debug-6
RPM-GPG-KEY-CentOS-Security-6
RPM-GPG-KEY-CentOS-Testing-6
.treeinfo
xen2:~ # virt-install -p --name dns2 --ram 786 --disk /dev/disk/by-id/scsi-14945540000000000705f69534353492d73616e315f310000 --location nfs://192.168.0.2/srv/md128/repositories/centos/6.3/os/x86_64/ --graphics none
What is it that's different about the Oracle Linux installation media (compared to the CentOS installation media, shown above ) that causes this failure? Is there a workaround?

Eric Pretorious
Truckee, CA
  • 1. Re: Creating an Oracle Linux PVM Using virt-install
    Dude! Guru
    Currently Being Moderated
    I sugget to debug the process to get more information. Does adding --debug to the virt-install command give you any more clues?                                                                                                                                                                                                                                                               
  • 2. Re: Creating an Oracle Linux PVM Using virt-install
    alvaromiranda Explorer
    Currently Being Moderated
    Hi There,

    I remember have done that like 7 months ago.

    I am doing a virtual machine to test, and will report back.

    How ever, I do sugest you can try with 6.2 or 6.1 iso, as Oracle have modified 6.3 to have from boot UEK Kernel, so that might be the problem.

    Alvaro.
  • 3. Re: Creating an Oracle Linux PVM Using virt-install
    alvaromiranda Explorer
    Currently Being Moderated
    Ok, worked for me.. with the virt-manager and with virt-install with http and nfs.

    host was Oracle Linux 5.8 with XEN Virtualization

    guest was Oracle Linux 6.3

    Edited by: Alvaro Miranda on Feb 11, 2013 2:56 AM
  • 4. Re: Creating an Oracle Linux PVM Using virt-install
    960874 Newbie
    Currently Being Moderated
    Alvaro Miranda wrote:
    Ok, worked for me.. with the virt-manager and with virt-install with http and nfs.

    host was Oracle Linux 5.8 with XEN Virtualization

    guest was Oracle Linux 6.3
    Thanks, Alvaro! I'll try a different version of OL for the guest first. And, if that doesn't fix the problem, I'll try a different host O/S. (I'm currently using Xen 4.1.3 on SuSE 11 SP2 (SLES-11-SP2).

    Eric Pretorious
    Truckee, CA
  • 5. Re: Creating an Oracle Linux PVM Using virt-install
    960874 Newbie
    Currently Being Moderated
    epretorious wrote:
    Alvaro Miranda wrote:
    Ok, worked for me.. with the virt-manager and with virt-install with http and nfs.

    host was Oracle Linux 5.8 with XEN Virtualization

    guest was Oracle Linux 6.3
    Thanks, Alvaro! I'll try a different version of OL for the guest first. And, if that doesn't fix the problem, I'll try a different host O/S. (I'm currently using Xen 4.1.3 on SuSE 11 SP2 (SLES-11-SP2).
    In installed OVS 3.2.1 on a spare machine last night and discovered that Virt Tools are not included during installation nor are they available in the OVM3 repository (on public-yum):
    [root@foo ~]# cat /etc/redhat-release 
    Oracle VM server release 3.2.1
    
    [root@foo ~]# cat /etc/oracle-release 
    Oracle VM Server release 5.7
    
    [root@foo ~]# yum whatprovides "*virt-install"
    No Matches found
    Then I installed OL 6.3 on a spare machine this morning and discovered that Virt Tools are available but Xen is not
    [root@OL-63 ~]# cat /etc/redhat-release 
    Red Hat Enterprise Linux Server release 6.3 (Santiago)
    
    [root@OL-63 ~]# cat /etc/oracle-release 
    Oracle Linux Server release 6.3
    
    [root@OL-63 ~]# yum search xen
    Loaded plugins: security
    =============================== N/S Matched: xen ===============================
    netxen-firmware.noarch : QLogic Linux Intelligent Ethernet (3000 and 3100: Series) Adapter Firmware
    
      Name and summary matches only, use "search all" for everything.
    
    [root@OL-63 ~]# yum info python-virtinst
    Loaded plugins: security
    Available Packages
    Name        : python-virtinst
    ...
    Description : virtinst is a module that helps build and install libvirt based
                : virtual machines. Currently supports KVM, QEmu and Xen virtual
                : machines. Package includes several command line utilities,
                : including virt-install (build and install new VMs) and virt-clone
                : (clone an existing virtual machine).
    So I set off to search the OL5 and OL6 repositories manually and that's when I noticed that there's no kernel-xen package for OL6!

    What kernel are you using in your OL6U3 PVM?
  • 6. Re: Creating an Oracle Linux PVM Using virt-install
    Dude! Guru
    Currently Being Moderated
    RHEL 6 has dropped the XEN kernel and dom0 support

    http://wiki.xen.org/wiki/RHEL6_Xen4_Tutorial#Red_Hat_Enterprise_Linux_6_Xen_4.0_tutorial
  • 7. Re: Creating an Oracle Linux PVM Using virt-install
    alvaromiranda Explorer
    Currently Being Moderated
    Hello.

    So I set off to search the OL5 and OL6 repositories manually and that's when I noticed that there's no kernel-xen package for OL6!

    What kernel are you using in your OL6U3 PVM?
    It's a bit different.

    When you use XEN virt-install on OEL 5.8 it download the install.img to start the install.

    Another piece of info, is kernel UEK2, includes the XEN bits, so any guest with kernel uek2, is ok to be xen PVM guest.

    If want to give a fast try, install an OEL 5.8/5.9 with virtualization group, and give a try to build a xen PVM.

    As today, what is cool, is if you create a virtualbox template that have kernel UEK2, then the template.ova can be imported in the OVM 3 by the manager as assemblies, and make the process pretty cool.

    If you are stuck in any part, feel free to provide more info, and will be happy to give a hand.
  • 8. Re: Creating an Oracle Linux PVM Using virt-install
    960874 Newbie
    Currently Being Moderated
    Dude wrote:
    RHEL 6 has dropped the XEN kernel and dom0 support

    http://wiki.xen.org/wiki/RHEL6_Xen4_Tutorial#Red_Hat_Enterprise_Linux_6_Xen_4.0_tutorial
    I sat and scratched my head - metaphorically speaking - for a long time, pondering what you might have meant by this and then I remembered my comment:
    Then I installed OL 6.3 on a spare machine this morning and discovered that Virt Tools are available but Xen is not...
    ...and once I thought about your comment in this context, I finally understood what you're trying to tell me: OL 6.3 doesn't include the Xen hypervisor because it's a binary equivalent of RHEL 6.3 +(and Red Hat dropped the Xen hypervisor in RHEL 6.x)+.

    Thanks, Dude.
  • 9. Re: Creating an Oracle Linux PVM Using virt-install
    960874 Newbie
    Currently Being Moderated
    Dude wrote:
    I sugget to debug the process to get more information. Does adding --debug to the virt-install command give you any more clues?
    Once more, with --debug:
    xen2:~ # virt-install -p --name dns2 --ram 786 --disk /dev/disk/by-id/scsi-14945540000000000705f69534353492d73616e315f300000 --location nfs://192.168.0.2/srv/md128/repositories/oracle/6.3/os/x86_64/ --debug
    Thu, 14 Feb 2013 11:48:20 DEBUG    Launched with command line:
    /usr/bin/virt-install -p --name dns2 --ram 786 --disk /dev/disk/by-id/scsi-14945540000000000705f69534353492d73616e315f300000 --location nfs://192.168.0.2/srv/md128/repositories/oracle/6.3/os/x86_64/ --debug
    Thu, 14 Feb 2013 11:48:20 DEBUG    Requesting libvirt URI default
    Thu, 14 Feb 2013 11:48:22 DEBUG    Received libvirt URI xen:///
    Thu, 14 Feb 2013 11:48:22 DEBUG    Requesting virt method 'xen', hv type 'default'.
    Thu, 14 Feb 2013 11:48:22 DEBUG    Received virt method 'xen'
    Thu, 14 Feb 2013 11:48:22 DEBUG    Hypervisor name is 'xen'
    Thu, 14 Feb 2013 11:48:22 DEBUG    DISPLAY is not set: defaulting to nographics.
    Thu, 14 Feb 2013 11:48:22 DEBUG    --graphics compat generated: none
    Thu, 14 Feb 2013 11:48:22 DEBUG    DistroInstaller location is a network source.
    Thu, 14 Feb 2013 11:48:22 DEBUG    Preparing mount at /var/tmp/virtinstmnt.r5psf_
    Thu, 14 Feb 2013 11:48:22 DEBUG    Attempting to detect distro:
    Thu, 14 Feb 2013 11:48:22 DEBUG    local hasFile: Couldn't find /var/tmp/virtinstmnt.r5psf_/.treeinfo
    Thu, 14 Feb 2013 11:48:22 DEBUG    local hasFile: Couldn't find /var/tmp/virtinstmnt.r5psf_/Fedora
    Thu, 14 Feb 2013 11:48:22 DEBUG    Detected a RHEL 5 Server distro
    Thu, 14 Feb 2013 11:48:22 DEBUG    Cleaning up mount at /var/tmp/virtinstmnt.r5psf_
    Thu, 14 Feb 2013 11:48:22 DEBUG    Guest.has_install_phase: True
    
    Starting install...
    Thu, 14 Feb 2013 11:48:22 DEBUG    scratchdir=/var/lib/xen
    Thu, 14 Feb 2013 11:48:22 DEBUG    Preparing mount at /var/lib/xen/virtinstmnt.X0dm9e
    Thu, 14 Feb 2013 11:48:22 DEBUG    Attempting to detect distro:
    Thu, 14 Feb 2013 11:48:22 DEBUG    local hasFile: Couldn't find /var/lib/xen/virtinstmnt.X0dm9e/.treeinfo
    Thu, 14 Feb 2013 11:48:22 DEBUG    local hasFile: Couldn't find /var/lib/xen/virtinstmnt.X0dm9e/Fedora
    Thu, 14 Feb 2013 11:48:22 DEBUG    Detected a RHEL 5 Server distro
    Thu, 14 Feb 2013 11:48:22 DEBUG    local hasFile: Couldn't find /var/lib/xen/virtinstmnt.X0dm9e/images/xen/vmlinuz
    Thu, 14 Feb 2013 11:48:22 DEBUG    Cleaning up mount at /var/lib/xen/virtinstmnt.X0dm9e
    Thu, 14 Feb 2013 11:48:22 ERROR    Couldn't find xen kernel for Red Hat Enterprise Linux tree.
    Thu, 14 Feb 2013 11:48:22 DEBUG    Traceback (most recent call last):
      File "/usr/bin/virt-install", line 633, in start_install
        noboot=options.noreboot)
      File "/usr/lib64/python2.6/site-packages/virtinst/Guest.py", line 1207, in start_install
        self._prepare_install(meter, dry)
      File "/usr/lib64/python2.6/site-packages/virtinst/Guest.py", line 964, in _prepare_install
        meter=meter)
      File "/usr/lib64/python2.6/site-packages/virtinst/DistroInstaller.py", line 429, in prepare
        dev = self._prepare_kernel_and_initrd(guest, meter)
      File "/usr/lib64/python2.6/site-packages/virtinst/DistroInstaller.py", line 368, in _prepare_kernel_and_initrd
        self.os_type)
      File "/usr/lib64/python2.6/site-packages/virtinst/OSDistro.py", line 158, in acquireKernel
        scratchdir, type)
      File "/usr/lib64/python2.6/site-packages/virtinst/OSDistro.py", line 152, in _acquireMedia
        None, media_cb)
      File "/usr/lib64/python2.6/site-packages/virtinst/OSDistro.py", line 133, in _locationCheckWrapper
        return callback(store, fetcher)
      File "/usr/lib64/python2.6/site-packages/virtinst/OSDistro.py", line 145, in media_cb
        media = store.acquireKernel(guest, fetcher, progresscb)
      File "/usr/lib64/python2.6/site-packages/virtinst/OSDistro.py", line 276, in acquireKernel
        { "distro": self.name, "type" : self.type })
    RuntimeError: Couldn't find xen kernel for Red Hat Enterprise Linux tree.
    It appears that the last line provides the vital clue. i.e., The Oracle Linux 6.3 .iso is lacking a .treeinfo file. CentOS, however, includes a .treeinfo file for each of it's installation .iso's:
    san2:/srv/md128/repositories/centos # find . -name .treeinfo
    ./5.7/os/i386/.treeinfo
    ./5.7/os/x86_64/.treeinfo
    ./5.8/os/i386/.treeinfo
    ./5.8/os/x86_64/.treeinfo
    ./5.9/os/i386/.treeinfo
    ./5.9/os/x86_64/.treeinfo
    ./6.0/os/x86_64/.treeinfo
    ./6.2/os/i386/.treeinfo
    ./6.2/os/x86_64/.treeinfo
    ./6.3/os/i386/.treeinfo
    ./6.3/os/x86_64/.treeinfo
    The contents of .treeinfo seem fairly straight-forward:
    san2:/srv/md128/repositories # cat ./centos/6.3/os/x86_64/.treeinfo
    [general]
    family = CentOS
    timestamp = 1341569485.3
    variant =
    totaldiscs = 1
    version = 6.3
    discnum = 1
    packagedir =
    arch = x86_64

    [images-x86_64]
    kernel = images/pxeboot/vmlinuz
    initrd = images/pxeboot/initrd.img
    boot.iso = ../../isos/x86_64/CentOS-6.3-x86_64-netinstall.iso
    [images-xen]
    kernel = images/pxeboot/vmlinuz
    initrd = images/pxeboot/initrd.img

    [stage2]
    mainimage = images/install.img
    ...so I started with the .treeinfo file for CentOS 6.3 and verified that it reflected the contents of the Oracle Linux 6.3 directory as well:
    san2:/srv/md128/repositories/centos # ll ./6.3/os/x86_64/
    total 472
    -rw-r--r--. 1 59999 59999     14 Jul  6  2012 CentOS_BuildTag
    -rw-rw-r--. 1 59999 59999     33 Jul  6  2012 .discinfo
    drwxrwxr-x. 3 59999 59999     17 Jul  6  2012 EFI
    -rw-rw-r--. 1 59999 59999    212 Jun 23  2012 EULA
    -rw-rw-r--. 1 59999 59999  18009 Jun 23  2012 GPL
    drwxr-xr-x. 3 59999 59999     74 Jul  6  2012 images
    drwxr-xr-x. 2 59999 59999   4096 Jul  6  2012 isolinux
    drwxrwxr-x. 2 59999 59999 339968 Jul  5  2012 Packages
    -rw-rw-r--. 1 59999 59999   1354 Jun 23  2012 RELEASE-NOTES-en-US.html
    drwxr-xr-x. 2 59999 59999   4096 Jul  6  2012 repodata
    -rw-rw-r--. 1 59999 59999   1706 Jun 23  2012 RPM-GPG-KEY-CentOS-6
    -rw-rw-r--. 1 59999 59999   1730 Jun 23  2012 RPM-GPG-KEY-CentOS-Debug-6
    -rw-rw-r--. 1 59999 59999   1730 Jun 23  2012 RPM-GPG-KEY-CentOS-Security-6
    -rw-rw-r--. 1 59999 59999   1734 Jun 23  2012 RPM-GPG-KEY-CentOS-Testing-6
    -rw-rw-r--. 1 59999 59999    398 Jul  6  2012 .treeinfo
    
    san2:/srv/md128/repositories/centos # ll ./6.3/os/x86_64/images/
    total 168904
    -rw-r--r--. 1 59999 59999    372736 Jul  6  2012 efiboot.img
    -rw-r--r--. 1 59999 59999  35997696 Jul  6  2012 efidisk.img
    -rw-r--r--. 1 59999 59999 136585216 Jul  6  2012 install.img
    drwxr-xr-x. 2 59999 59999        37 Jul  6  2012 pxeboot
    
    san2:/srv/md128/repositories/centos # ll ./6.3/os/x86_64/images/pxeboot/
    total 34756
    -rw-r--r--. 1 59999 59999 31596586 Jul  6  2012 initrd.img
    -rwxr-xr-x. 1 59999 59999  3986608 Jul  6  2012 vmlinuz
    san2:/srv/md128/repositories/centos # ll ../oracle/6.3/os/x86_64/
    total 504
    drwxr-xr-x 3 root root     33 Feb  8 18:09 EFI
    -rw-r--r-- 1 root root   7041 Feb  8 18:09 EULA
    -rw-r--r-- 1 root root   7041 Feb  8 18:09 eula.en_US
    -rw-r--r-- 1 root root   3334 Feb  8 18:09 eula.py
    -rw-r--r-- 1 root root  18390 Feb  8 18:09 GPL
    drwxr-xr-x 3 root root     66 Feb  8 18:09 HighAvailability
    drwxr-xr-x 3 root root    103 Feb  8 18:09 images
    drwxr-xr-x 2 root root   4096 Feb  8 18:09 isolinux
    drwxr-xr-x 3 root root     66 Feb  8 18:09 LoadBalancer
    -rw-r--r-- 1 root root    196 Feb  8 18:09 media.repo
    drwxr-xr-x 2 root root 188416 Feb  8 18:10 Packages
    -rw-r--r-- 1 root root   2619 Feb  8 18:10 README-en
    -rw-r--r-- 1 root root   7054 Feb  8 18:10 README-en.html
    -rw-r--r-- 1 root root  29531 Feb  8 18:10 RELEASE-NOTES-en
    -rw-r--r-- 1 root root  32428 Feb  8 18:10 RELEASE-NOTES-en.html
    -rw-r--r-- 1 root root  29531 Feb  8 18:10 RELEASE-NOTES-x86_64-en
    -rw-r--r-- 1 root root  32428 Feb  8 18:10 RELEASE-NOTES-x86_64-en.html
    -rw-r--r-- 1 root root  29531 Feb  8 18:10 RELEASE-NOTES-x86-en
    -rw-r--r-- 1 root root  32428 Feb  8 18:10 RELEASE-NOTES-x86-en.html
    lrwxrwxrwx 1 root root     15 Feb  8 18:10 repodata -> Server/repodata
    drwxr-xr-x 3 root root     66 Feb  8 18:10 ResilientStorage
    -rw-r--r-- 1 root root   1011 Feb  8 18:10 RPM-GPG-KEY
    -rw-r--r-- 1 root root   1011 Feb  8 18:10 RPM-GPG-KEY-oracle
    drwxr-xr-x 3 root root     66 Feb  8 18:10 ScalableFileSystem
    drwxr-xr-x 4 root root     87 Feb  8 18:10 Server
    -rw-r--r-- 1 root root    108 Feb  8 18:10 supportinfo
    -r--r--r-- 1 root root   6517 Feb  8 18:10 TRANS.TBL
    drwxr-xr-x 3 root root     66 Feb  8 18:10 UEK2
    
    san2:/srv/md128/repositories/centos # ll ../oracle/6.3/os/x86_64/images/
    total 167692
    -rw-r--r-- 1 root root    376832 Feb  8 18:09 efiboot.img
    -rw-r--r-- 1 root root  34924544 Feb  8 18:09 efidisk.img
    -rw-r--r-- 1 root root 136404992 Feb  8 18:09 install.img
    drwxr-xr-x 2 root root        53 Feb  8 18:09 pxeboot
    -rw-r--r-- 1 root root       541 Feb  8 18:09 README
    -r--r--r-- 1 root root      1106 Feb  8 18:09 TRANS.TBL
    
    san2:/srv/md128/repositories/centos # ll ../oracle/6.3/os/x86_64/images/pxeboot/
    total 33668
    -rw-r--r-- 1 root root 30481341 Feb  8 18:09 initrd.img
    -r--r--r-- 1 root root      441 Feb  8 18:09 TRANS.TBL
    -rwxr-xr-x 1 root root  3986992 Feb  8 18:09 vmlinuz
    ...and then I used the CentOS 6.3 .treeinfo file verbatim to guide virt-install through the process of creating an Oracle 6.3 PV: :)
    san2:/srv/md128/repositories # cp ./centos/6.3/os/x86_64/.treeinfo ./oracle/6.3/os/x86_64/
    Problem solved!
  • 10. Re: Creating an Oracle Linux PVM Using virt-install
    Avi Miller Guru
    Currently Being Moderated
    epretorious wrote:
    It appears that the last line provides the vital clue. i.e., The Oracle Linux 6.3 .iso is lacking a .treeinfo file.
    My Oracle Linux ISO has a .treeinfo file:
    # mount -o loop OracleLinux-R6-U3-Server-x86_64-dvd.iso /media/
    # ls -la /media/.treeinfo 
    -rw-r--r-- 1 root root 1546 Jun 27  2012 /media/.treeinfo
    
    # cat /media/.treeinfo 
    [general]
    family = Oracle Linux Server
    timestamp = 1340764248.23
    variant = Server
    totaldiscs = 1
    version = 6.3
    discnum = 1
    packagedir = Packages
    variants = Server
    arch = x86_64
    
    [images-x86_64]
    kernel = images/pxeboot/vmlinuz
    initrd = images/pxeboot/initrd.img
    
    [images-xen]
    kernel = images/pxeboot/vmlinuz
    initrd = images/pxeboot/initrd.img
    
    [stage2]
    mainimage = images/install.img
    
    [variant-Server]
    addons = ResilientStorage,HighAvailability,ScalableFileSystem,LoadBalancer
    repository = Server/repodata
    identity = Server/Server.cert
    
    [addon-ResilientStorage]
    repository = ResilientStorage
    name = Resilient Storage
    identity = ResilientStorage/ResilientStorage.cert
    
    [addon-HighAvailability]
    repository = HighAvailability
    name = High Availability
    identity = HighAvailability/HighAvailability.cert
    
    [addon-ScalableFileSystem]
    repository = ScalableFileSystem
    name = Scalable Filesystem Support
    identity = ScalableFileSystem/ScalableFileSystem.cert
    
    [addon-LoadBalancer]
    repository = LoadBalancer
    name = Load Balancer
    identity = LoadBalancer/LoadBalancer.cert
    
    [checksums]
    images/install.img = sha256:c6f84bc868e82c07120c336cede9b01aa4a864ec6ccab782fc24a84683129703
    images/pxeboot/vmlinuz = sha256:d2e268237355e41b3a681ace31ece1b68803b820bb199f1480f23b11010639f3
    images/pxeboot/initrd.img = sha256:ac7a33c8c9b4b7024a198bd46be9be2e36b140c75d55f981000ba462c9b7f4e1
    images/efiboot.img = sha256:7f6ae7f0b8fed11c5f26c9f836f51e532afa2b8af8986d9c98c9be2c981f0672
    images/efidisk.img = sha256:a887c209392c6a453002a52e91b07b63a2c27c3d2be4fa46f1f3d92b425db993
    Might want to double-check that you copied the files off your ISO properly. A lot of tools don't copy dotfiles by default.
  • 11. Re: Creating an Oracle Linux PVM Using virt-install
    960874 Newbie
    Currently Being Moderated
    Avi Miller wrote:
    epretorious wrote:
    It appears that the last line provides the vital clue. i.e., The Oracle Linux 6.3 .iso is lacking a .treeinfo file.
    My Oracle Linux ISO has a .treeinfo file:...

    Might want to double-check that you copied the files off your ISO properly. A lot of tools don't copy dotfiles by default.
    Thanks, Avi:

    You are correct: The .iso does contain a .treeinfo file. Somehow the .treeinfo file went missing from my repository so I'm refreshing the contents of the repository and will verify the presence of the .treeinfo file this time around. ;)

    Eric Pretorious
    Truckee, CA
  • 12. Re: Creating an Oracle Linux PVM Using virt-install
    960874 Newbie
    Currently Being Moderated
    Avi Miller wrote:
    epretorious wrote:
    It appears that the last line provides the vital clue. i.e., The Oracle Linux 6.3 .iso is lacking a .treeinfo file.
    My Oracle Linux ISO has a .treeinfo file:
    # mount -o loop OracleLinux-R6-U3-Server-x86_64-dvd.iso /media/
    # ls -la /media/.treeinfo 
    -rw-r--r-- 1 root root 1546 Jun 27  2012 /media/.treeinfo
    
    # cat /media/.treeinfo 
    [general]
    family = Oracle Linux Server
    timestamp = 1340764248.23
    variant = Server
    totaldiscs = 1
    version = 6.3
    discnum = 1
    packagedir = Packages
    variants = Server
    arch = x86_64
    
    [images-x86_64]
    kernel = images/pxeboot/vmlinuz
    initrd = images/pxeboot/initrd.img
    
    [images-xen]
    kernel = images/pxeboot/vmlinuz
    initrd = images/pxeboot/initrd.img
    
    [stage2]
    mainimage = images/install.img
    
    [variant-Server]
    addons = ResilientStorage,HighAvailability,ScalableFileSystem,LoadBalancer
    repository = Server/repodata
    identity = Server/Server.cert
    
    [addon-ResilientStorage]
    repository = ResilientStorage
    name = Resilient Storage
    identity = ResilientStorage/ResilientStorage.cert
    
    [addon-HighAvailability]
    repository = HighAvailability
    name = High Availability
    identity = HighAvailability/HighAvailability.cert
    
    [addon-ScalableFileSystem]
    repository = ScalableFileSystem
    name = Scalable Filesystem Support
    identity = ScalableFileSystem/ScalableFileSystem.cert
    
    [addon-LoadBalancer]
    repository = LoadBalancer
    name = Load Balancer
    identity = LoadBalancer/LoadBalancer.cert
    
    [checksums]
    images/install.img = sha256:c6f84bc868e82c07120c336cede9b01aa4a864ec6ccab782fc24a84683129703
    images/pxeboot/vmlinuz = sha256:d2e268237355e41b3a681ace31ece1b68803b820bb199f1480f23b11010639f3
    images/pxeboot/initrd.img = sha256:ac7a33c8c9b4b7024a198bd46be9be2e36b140c75d55f981000ba462c9b7f4e1
    images/efiboot.img = sha256:7f6ae7f0b8fed11c5f26c9f836f51e532afa2b8af8986d9c98c9be2c981f0672
    images/efidisk.img = sha256:a887c209392c6a453002a52e91b07b63a2c27c3d2be4fa46f1f3d92b425db993
    Might want to double-check that you copied the files off your ISO properly. A lot of tools don't copy dotfiles by default.
    Hm. When I use the .treeinfo included on the ISO +(shown above)+, virt-install complains...
    xen2:~ # virt-install -p --name oracle3 --ram 786 --disk /dev/disk/by-id/scsi-14945540000000000705f69534353492d73616e325f310000 --location nfs://192.168.0.2/srv/md128/repositories/oracle/6.3/os/x86_64/ --debug
    Thu, 14 Feb 2013 17:00:10 DEBUG    Launched with command line:
    /usr/bin/virt-install -p --name oracle3 --ram 786 --disk /dev/disk/by-id/scsi-14945540000000000705f69534353492d73616e325f310000 --location nfs://192.168.0.2/srv/md128/repositories/oracle/6.3/os/x86_64/ --debug
    Thu, 14 Feb 2013 17:00:10 DEBUG    Requesting libvirt URI default
    Thu, 14 Feb 2013 17:00:13 DEBUG    Received libvirt URI xen:///
    Thu, 14 Feb 2013 17:00:13 DEBUG    Requesting virt method 'xen', hv type 'default'.
    Thu, 14 Feb 2013 17:00:13 DEBUG    Received virt method 'xen'
    Thu, 14 Feb 2013 17:00:13 DEBUG    Hypervisor name is 'xen'
    Thu, 14 Feb 2013 17:00:13 DEBUG    DISPLAY is not set: defaulting to nographics.
    Thu, 14 Feb 2013 17:00:13 DEBUG    --graphics compat generated: none
    Thu, 14 Feb 2013 17:00:13 DEBUG    DistroInstaller location is a network source.
    Thu, 14 Feb 2013 17:00:13 DEBUG    Preparing mount at /var/tmp/virtinstmnt._8jiS6
    Thu, 14 Feb 2013 17:00:13 DEBUG    Attempting to detect distro:
    Thu, 14 Feb 2013 17:00:13 DEBUG    Fetching URI: /var/tmp/virtinstmnt._8jiS6/.treeinfo
    Thu, 14 Feb 2013 17:00:13 DEBUG    Saved file to /var/tmp/virtinst-.treeinfo._jiClZ
    Thu, 14 Feb 2013 17:00:13 DEBUG    Cleaning up mount at /var/tmp/virtinstmnt._8jiS6
    Thu, 14 Feb 2013 17:00:13 ERROR    No option 'boot.iso' in section: 'images-x86_64'
    Thu, 14 Feb 2013 17:00:13 DEBUG    Traceback (most recent call last):
      File "/usr/bin/virt-install", line 1008, in <module>
        sys.exit(main())
      File "/usr/bin/virt-install", line 993, in main
        guest = build_guest_instance(conn, options)
      File "/usr/bin/virt-install", line 530, in build_guest_instance
        get_install_media(guest, options.location, options.cdrom, need_install)
      File "/usr/bin/virt-install", line 304, in get_install_media
        validate_install_media(guest, location, cdpath, cdinstall)
      File "/usr/bin/virt-install", line 341, in validate_install_media
        guest.installer.check_location()
      File "/usr/lib64/python2.6/site-packages/virtinst/DistroInstaller.py", line 440, in check_location
        OSDistro.detectMediaDistro(location=self.location, arch=self.arch)
      File "/usr/lib64/python2.6/site-packages/virtinst/OSDistro.py", line 185, in detectMediaDistro
        _type, arch, media_cb)
      File "/usr/lib64/python2.6/site-packages/virtinst/OSDistro.py", line 131, in _locationCheckWrapper
        arch=arch)
      File "/usr/lib64/python2.6/site-packages/virtinst/OSDistro.py", line 68, in _storeForDistro
        arch, typ, scratchdir)
      File "/usr/lib64/python2.6/site-packages/virtinst/OSDistro.py", line 224, in distroFromTreeinfo
        ob.isValidStore(fetcher, progresscb)
      File "/usr/lib64/python2.6/site-packages/virtinst/OSDistro.py", line 426, in isValidStore
        self._valid_iso_path = self.treeinfo.get(isoSection, "boot.iso")
      File "/usr/lib64/python2.6/ConfigParser.py", line 540, in get
        raise NoOptionError(option, section)
    NoOptionError: No option 'boot.iso' in section: 'images-x86_64'
    Comparing the two .treeinfo files, I can see the difference: The CentOS 6.3 .treeinfo file contains a line that references "boot.iso":
    san2:/srv/md128/repositories # cat centos/6.3/os/x86_64/.treeinfo
    [general]
    family = CentOS
    timestamp = 1341569485.3
    variant =
    totaldiscs = 1
    version = 6.3
    discnum = 1
    packagedir =
    arch = x86_64

    [images-x86_64]
    kernel = images/pxeboot/vmlinuz
    initrd = images/pxeboot/initrd.img
    boot.iso = ../../isos/x86_64/CentOS-6.3-x86_64-netinstall.iso
    [images-xen]
    kernel = images/pxeboot/vmlinuz
    initrd = images/pxeboot/initrd.img

    [stage2]
    mainimage = images/install.img
    If I add that exact same line to the Oracle Linux 6.3 .treeinfo file, the installation completes successfully (just as when I used the unmodified CentOS 6.3 .treeinfo).

    Thoughts, anyone?
  • 13. Re: Creating an Oracle Linux PVM Using virt-install
    Avi Miller Guru
    Currently Being Moderated
    epretorious wrote:
    Thoughts, anyone?
    I guess you could download the OL boot.iso and add a reference to it to the .treeinfo file. I have no idea why it needs it, though.
  • 14. Re: Creating an Oracle Linux PVM Using virt-install
    960874 Newbie
    Currently Being Moderated
    Avi Miller wrote:
    I guess you could download the OL boot.iso and add a reference to it to the .treeinfo file. I have no idea why it needs it, though.
    But that's the thing, Avi:

    virt-install doesn't use the value contained in the boot.iso value, it just needs the value to be defined. e.g., The value from the CentOS .treeinfo file satisfies virt-install...
    [general]
    family = CentOS
    timestamp = 1341569485.3
    variant =
    totaldiscs = 1
    version = 6.3
    discnum = 1
    packagedir =
    arch = x86_64
    
    [images-x86_64]
    kernel = images/pxeboot/vmlinuz
    initrd = images/pxeboot/initrd.img
    boot.iso = ../../isos/x86_64/CentOS-6.3-x86_64-netinstall.iso
    [images-xen]
    kernel = images/pxeboot/vmlinuz
    initrd = images/pxeboot/initrd.img
    
    [stage2]
    mainimage = images/install.img
    ...even though there is no file ../../isos/x86_64/CentOS-6.3-x86_64-netinstall.iso in the local Oracle installation repository.

    I think that this is a bug in virt-install.

    Eric Pretorious
    Truckee, CA
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points