# HG changeset patch
# User john.levon@sun.com
# Date 1228365031 28800
# Node ID 35baacfe79834400949ebdba69f952ed873ae442
# Parent 7dd32b4d7915937025f42c3519711db50e5a7ce3
Add support for Solaris PV
Solaris PV comes in two flavours: Nevada and OpenSolaris. In order to
correctly build network installs for Nevada, we need to pass down guest
options into OSDistro.
os_type was horribly overloaded between the Installer and Guest classes,
meaning two different things ('solaris' or 'hvm'). Clean this up by
naming the latter 'virt_type'.
Signed-off-by: John Levon <john.levon@sun.com>
diff --git a/virt-install b/virt-install
--- a/virt-install
+++ b/virt-install
@@ -510,27 +510,27 @@ def main():
fail(_("Can't do both --hvm and --paravirt"))
if options.fullvirt:
- os_type = "hvm"
+ virt_type = "hvm"
elif options.paravirt:
- os_type = "xen"
+ virt_type = "xen"
else:
# This should force capabilities to give us the most sensible default
- os_type = None
-
- logging.debug("Requesting virt method '%s'" % (os_type and os_type or
+ virt_type = None
+
+ logging.debug("Requesting virt method '%s'" % (virt_type and virt_type or
_("default")))
- guest = capabilities.guestForOSType(type=os_type, arch=options.arch)
+ guest = capabilities.guestForVirtType(type=virt_type, arch=options.arch)
if guest is None:
- msg = _("Unsupported virtualization type '%s' " % (os_type and os_type
+ msg = _("Unsupported virtualization type '%s' " % (virt_type and virt_type
or _("default")))
if options.arch:
msg += _("for arch '%s'" % options.arch)
fail(msg)
if hvm:
diff --git a/virtinst/CapabilitiesParser.py b/virtinst/CapabilitiesParser.py
--- a/virtinst/CapabilitiesParser.py
+++ b/virtinst/CapabilitiesParser.py
@@ -121,7 +121,7 @@ class Guest(object):
class Guest(object):
def __init__(self, node = None):
# e.g. "xen" or "hvm"
- self.os_type = None
+ self.virt_type = None
# e.g. "i686" or "x86_64"
self.arch = None
@@ -135,8 +135,9 @@ class Guest(object):
def parseXML(self, node):
child = node.children
while child:
+ # In the XML, os_type really means virt_type
if child.name == "os_type":
- self.os_type = child.content
+ self.virt_type = child.content
elif child.name == "features":
self.features = CapabilityFeatures(child)
elif child.name == "arch":
@@ -260,7 +261,7 @@ class Capabilities(object):
self._fixBrokenEmulator()
- def guestForOSType(self, type = None, arch = None):
+ def guestForVirtType(self, type = None, arch = None):
if self.host is None:
return None
@@ -270,7 +271,7 @@ class Capabilities(object):
archs = [arch]
for a in archs:
for g in self.guests:
- if (type is None or g.os_type == type) and
+ if (type is None or g.virt_type == type) and
(a is None or g.arch == a):
return g
@@ -283,7 +284,7 @@ class Capabilities(object):
fixEmulator = None
for g in self.guests:
- if g.os_type != "hvm" or g.arch != "x86_64":
+ if g.virt_type != "hvm" or g.arch != "x86_64":
continue
for d in g.domains:
if d.emulator.find("lib64") != -1:
@@ -293,7 +294,7 @@ class Capabilities(object):
return
for g in self.guests:
- if g.os_type != "hvm" or g.arch != "i686":
+ if g.virt_type != "hvm" or g.arch != "i686":
continue
for d in g.domains:
if d.emulator.find("lib64") == -1:
diff --git a/virtinst/DistroManager.py b/virtinst/DistroManager.py
--- a/virtinst/DistroManager.py
+++ b/virtinst/DistroManager.py
@@ -41,6 +41,8 @@ from OSDistro import DebianDistro
from OSDistro import DebianDistro
from OSDistro import UbuntuDistro
from OSDistro import MandrivaDistro
+from OSDistro import SolarisDistro
+from OSDistro import OpenSolarisDistro
from OSDistro import GenericDistro
def _fetcherForURI(uri, scratchdir=None):
@@ -87,6 +89,11 @@ def _storeForDistro(fetcher, baseuri, ty
stores.append(UbuntuDistro(baseuri, typ, scratchdir, arch))
if distro == "mandriva" or distro is None:
stores.append(MandrivaDistro(baseuri, typ, scratchdir, arch))
+ # XXX: this is really "nevada"
+ if distro == "solaris" or distro is None:
+ stores.append(SolarisDistro(baseuri, type, scratchdir))
+ if distro == "solaris" or distro is None:
+ stores.append(OpenSolarisDistro(baseuri, type, scratchdir))
# Method to fetch a bootable ISO image for a particular distro / HV type
def acquireBootDisk(baseuri, progresscb, scratchdir="/var/tmp", type=None,
@@ -137,9 +126,9 @@ def acquireBootDisk(baseuri, progresscb,
# If they're installing off a local file/device, we map it
- # through to a virtual harddisk
- if self.location is not None and self.location.startswith("/") and not os.path.isdir(self.location):
+ # through to a virtual CD or disk
+
+ if (self.location is not None and self.location.startswith("/")
+ and not os.path.isdir(self.location)):
+ device = Guest.VirtualDisk.DEVICE_DISK
+ if guest._lookup_osdict_key('pv_cdrom_install'):
+ device = Guest.VirtualDisk.DEVICE_CDROM
+
self._install_disk = VirtualDisk(self.location,
+ device=device,
readOnly=True,
transient=True)
@@ -294,9 +307,9 @@ class DistroInstaller(Guest.Installer):
if loader:
osblob += " <loader>%s</loader>
" % loader
@@ -154,7 +154,7 @@ def match_boots(capabilities, boots):
def match_boots(capabilities, boots):
for b in boots:
for g in capabilities.guests:
- if b.type == g.os_type and b.arch == g.arch:
+ if b.type == g.virt_type and b.arch == g.arch:
found = True
for bf in b.features.names():
if not b.features[bf] & g.features[bf]:
diff --git a/virtinst/LiveCDInstaller.py b/virtinst/LiveCDInstaller.py
--- a/virtinst/LiveCDInstaller.py
+++ b/virtinst/LiveCDInstaller.py
@@ -29,10 +29,10 @@ class LiveCDInstallerException(Exception
Exception.__init__(self, msg)
+from virtinst import util
from virtinst import _virtinst as _
def distroFromTreeinfo(fetcher, progresscb, uri, vmtype=None,
@@ -83,7 +85,7 @@ class Distro:
"""Determine if uri points to a tree of the store's distro"""
raise NotImplementedError
@@ -270,6 +276,7 @@ class RedHatDistro(Distro):
class RedHatDistro(Distro):
name = "Red Hat"
+ os_type = "linux"
uses_treeinfo = True
_boot_iso_paths = [ "images/boot.iso" ]
_hvm_kernel_paths = [ ("images/pxeboot/vmlinuz",
@@ -285,6 +292,7 @@ class FedoraDistro(RedHatDistro):
class FedoraDistro(RedHatDistro):
name = "Fedora"
+ os_type = "linux"
def isValidStore(self, fetcher, progresscb):
if self._hasTreeinfo(fetcher, progresscb):
@@ -300,6 +308,7 @@ class RHELDistro(RedHatDistro):
class RHELDistro(RedHatDistro):
name = "Red Hat Enterprise Linux"
+ os_type = "linux"
def isValidStore(self, fetcher, progresscb):
if self._hasTreeinfo(fetcher, progresscb):
@@ -322,6 +331,7 @@ class CentOSDistro(RedHatDistro):
class CentOSDistro(RedHatDistro):
name = "CentOS"
+ os_type = "linux"
def isValidStore(self, fetcher, progresscb):
if self._hasTreeinfo(fetcher, progresscb):
@@ -338,6 +348,7 @@ class SLDistro(RedHatDistro):
class SLDistro(RedHatDistro):
name = "Scientific Linux"
+ os_type = "linux"
_boot_iso_paths = RedHatDistro._boot_iso_paths + [ "images/SL/boot.iso" ]
_hvm_kernel_paths = RedHatDistro._hvm_kernel_paths +
[ ("images/SL/pxeboot/vmlinuz",
@@ -361,6 +372,7 @@ class SuseDistro(Distro):
class SuseDistro(Distro):
- def acquireKernel(self, fetcher, progresscb):
+ def acquireKernel(self, guest, fetcher, progresscb):
# If installing a fullvirt guest
if self.type is None or self.type == "hvm" or
fetcher.hasFile("boot/%s/vmlinuz-xen" % self.arch):
- return Distro.acquireKernel(self, fetcher, progresscb)
+ return Distro.acquireKernel(self, guest, fetcher, progresscb)
# For Opensuse <= 10.2, we need to perform some heinous stuff
logging.debug("Trying Opensuse 10 PV rpm hacking")
@@ -590,6 +602,7 @@ class DebianDistro(Distro):
# daily builds: http://people.debian.org/~joeyh/d-i/
name = "Debian"
+ os_type = "linux"
def __init__(self, uri, vmtype=None, scratchdir=None, arch=None):
Distro.__init__(self, uri, vmtype, scratchdir, arch)
@@ -642,6 +655,7 @@ class UbuntuDistro(DebianDistro):
class UbuntuDistro(DebianDistro):
if self.target:
disknode = self.target
+ if self.device == VirtualDisk.DEVICE_CDROM and disknode.startswith('xvd'):
+ disknode = disknode + ':cdrom'
+
if not disknode:
raise ValueError(_("'disknode' or self.target must be set!"))
-def default_route():
+def default_route(nic = None):
+ if platform.system() == 'SunOS':
+ cmd = '/usr/bin/netstat -rn'
+ if nic:
+ cmd += ' -I %s' % nic
+ for i in os.popen(cmd):
+ line = i.split()
+ if len(line) > 1 and line[0] == 'default':
+ return line[1]
+ return None
+
route_file = "/proc/net/route"
d = file(route_file)
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
12-04-2008, 11:37 AM
"Daniel P. Berrange"
Add support for Solaris PV
On Wed, Dec 03, 2008 at 08:31:28PM -0800, john.levon@sun.com wrote:
> # HG changeset patch
> # User john.levon@sun.com
> # Date 1228365031 28800
> # Node ID 35baacfe79834400949ebdba69f952ed873ae442
> # Parent 7dd32b4d7915937025f42c3519711db50e5a7ce3
> Add support for Solaris PV
>
> Solaris PV comes in two flavours: Nevada and OpenSolaris. In order to
> correctly build network installs for Nevada, we need to pass down guest
> options into OSDistro.
>
> os_type was horribly overloaded between the Installer and Guest classes,
> meaning two different things ('solaris' or 'hvm'). Clean this up by
> naming the latter 'virt_type'.
The new Installer class for Solaris looks fine to me, but I don't really
like the renaming of os_type to virt_type, since its conflicting naming
to the libvirt usage.
'virt type' is usually used to refer to hypervisor type, eg this bit
of the XML
Unfortunaltey the virt-install CLI flag is --os-type - should really
have been --os-distro-type. So I think I'd rather we changed the
insternal variables for this to be os_distro_type and os_distro_variant
This chunk looks a little questionable to me - IIRC this is reverting a fix
we previously made, so perhaps this is just a merge error.
Baiscally the existing "extraargs" data will contain params from --extra-args
command line flag, and the 'self.extraargs' needs to append more data provided
by the DistroInstaller class, such as kickstart URL. This change means we loose
the former.
Hmm, this existing code was dubious even before this change. method= is
the Fedora / RHEL anaconda syntax for specifying install location. It
should never havebeen in Distro class in the first place - instead it
belongs in the RedHatDistro subclass.
> @@ -692,3 +707,194 @@ class MandrivaDistro(Distro):
>
> return False
>
> +# Solaris and OpenSolaris distros
> +class SunDistro(Distro):
> +
> + name = "Solaris"
> + os_type = "solaris"
> +
> + def isValidStore(self, fetcher, progresscb):
> + """Determine if uri points to a tree of the store's distro"""
> + raise NotImplementedError
> +
> + def acquireBootDisk(self, fetcher, progresscb):
> + return fetcher.acquireFile("images/solarisdvd.iso", progresscb)
> +
> + def process_extra_args(self, argstr):
> + """Collect additional arguments."""
> + if not argstr:
> + return (None, None, None, None)
> +
> + kopts = '
> + kargs = '
> + smfargs = '
> + Bargs = '
> +
> + args = argstr.split()
> + i = 0
> + while i < len(args):
> + exarg = args[i]
> + if exarg == '-B':
> + i += 1
> + if i == len(args):
> + continue
> +
> + if not Bargs:
> + Bargs = args[i]
> + else:
> + Bargs = ','.join([Bargs, args[i]])
> +
> + elif exarg == '-m':
> + i += 1
> + if i == len(args):
> + continue
> + smfargs = args[i]
> + elif exarg.startswith('-'):
> + if kopts is None:
> + kopts = exarg[1:]
> + else:
> + kopts = kopts + exarg[1:]
> + else:
> + if kargs is None:
> + kargs = exarg
> + else:
> + kargs = kargs + ' ' + exarg
> + i += 1
> +
> + return kopts, kargs, smfargs, Bargs
> +
> +class SolarisDistro(SunDistro):
> + kernelpath = "boot/platform/i86xpv/kernel/unix"
> + initrdpath = "boot/x86.miniroot"
> +
> + def isValidStore(self, fetcher, progresscb):
> + if fetcher.hasFile(self.kernelpath):
> + logging.debug("Detected Solaris")
> + return True
> + return False
> +
> + def install_args(self, guest):
> + """Construct kernel cmdline args for the installer, consisting of:
> + the pathname of the kernel (32/64) to load, kernel options
> + and args, and '-B' boot properties."""
> +
> + # XXX: ignoring smfargs for the time being
> + (kopts, kargs, smfargs, kbargs) =
> + self.process_extra_args(guest.extraargs)
> +
> + bargs = '
> + if kopts:
> + bargs += '-' + kopts + ' -'
> +
> + if guest.graphics['enabled'] == False:
> + bargs += ' nowin'
> +
> + if guest.autocf:
> + bargs += ' install'
> +
> + if kargs:
> + bargs += ' ' + kargs
> +
> + if guest.location.startswith('nfs:'):
> + try:
> + guestIP = socket.gethostbyaddr(guest.name)[2][0]
> + except:
> + bargs += ' dhcp'
> + else:
> + iserver = guest.location.split(':')[1]
> + ipath = guest.location.split(':')[2]
> + iserverIP = socket.gethostbyaddr(iserver)[2][0]
> + bargs += " -B install_media=" + iserverIP + ":" + ipath
> + bargs += ",host-ip=" + guestIP
> + droute = util.default_route(guest.nics[0].bridge)
> + if droute is not None:
> + bargs += ",router-ip=" + droute
> + if guest.nics[0].macaddr is not None:
> + en = guest.nics[0].macaddr.split(':')
> + for i in range(len(en)):
> + # remove leading '0' from mac address element
> + if len(en[i]) > 1 and en[i][0] == '0':
> + en[i] = en[i][1]
> + boot_mac = ":".join(en)
> + bargs += ",boot-mac=" + boot_mac
> + if guest.autocf:
> + acf_host = guest.autocf.split(":")[1]
> + acf_path = guest.autocf.split(":")[2]
> + try:
> + acf_hostip = socket.gethostbyaddr(acf_host)[2][0]
> + bargs += ",sysid_config=" + acf_hostip + ":" + acf_path
> + bargs += ",install_config=" + acf_hostip + ":" + acf_path
> + except:
> + print "failed to lookup host %s" % acf_host
> + else:
> + bargs += " -B install_media=cdrom"
> +
> + if kbargs:
> + bargs += "," + kbargs
> +
> + return bargs
> +
> + def acquireKernel(self, guest, fetcher, progresscb):
> +
> + try:
> + kernel = fetcher.acquireFile(self.kernelpath, progresscb)
> + except:
> + raise RuntimeError("Solaris PV kernel not found at %s" %
> + self.kernelpath)
> +
> + # strip boot from the kernel path
> + kpath = self.kernelpath.split('/')[1:]
> + args = "/" + "/".join(kpath) + self.install_args(guest)
> +
> + try:
> + initrd = fetcher.acquireFile(self.initrdpath, progresscb)
> + return (kernel, initrd, args)
> + except:
> + os.unlink(kernel)
> + raise RuntimeError(_("Solaris miniroot not found at %s") %
> + self.initrdpath)
> +
> +class OpenSolarisDistro(SunDistro):
> + kernelpath = "platform/i86xpv/kernel/unix"
> + initrdpath = "boot/x86.microroot"
> +
> + def isValidStore(self, fetcher, progresscb):
> + if fetcher.hasFile(self.kernelpath):
> + logging.debug("Detected OpenSolaris")
> + return True
> + return False
> +
> + def install_args(self, guest):
> + """Construct kernel cmdline args for the installer, consisting of:
> + the pathname of the kernel (32/64) to load, kernel options
> + and args, and '-B' boot properties."""
> +
> + # XXX: ignoring smfargs and kargs for the time being
> + (kopts, kargs, smfargs, kbargs) =
> + self.process_extra_args(guest.extraargs)
> +
> + bargs = '
> + if kopts:
> + bargs += ' -' + kopts
> + if kbargs:
> + bargs += ' -B ' + kbargs
> +
> + return bargs
> +
> + def acquireKernel(self, guest, fetcher, progresscb):
> +
> + try:
> + kernel = fetcher.acquireFile(self.kernelpath, progresscb)
> + except:
> + raise RuntimeError(_("OpenSolaris PV kernel not found at %s") %
> + self.kernelpath)
> +
> + args = "/" + self.kernelpath + self.install_args(guest)
> +
> + try:
> + initrd = fetcher.acquireFile(self.initrdpath, progresscb)
> + return (kernel, initrd, args)
> + except:
> + os.unlink(kernel)
> + raise RuntimeError(_("OpenSolaris microroot not found at %s") %
> + self.initrdpath)
These new classes seeem to be more or less independant of the bit
os_type/virt_type renaming (baring the obvious fact that it uses the
new names). I've no problem add this bit right away.
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
12-04-2008, 12:12 PM
John Levon
Add support for Solaris PV
On Thu, Dec 04, 2008 at 12:37:00PM +0000, Daniel P. Berrange wrote:
> The new Installer class for Solaris looks fine to me, but I don't really
> like the renaming of os_type to virt_type, since its conflicting naming
> to the libvirt usage.
>
> 'virt type' is usually used to refer to hypervisor type, eg this bit
> of the XML
>
> <domain type='xen'>
> <domain type='kvm'>
> <domain type='qemu'>
How confusing. Wouldn't this be 'hyp_type' ?
> Unfortunaltey the virt-install CLI flag is --os-type - should really
> have been --os-distro-type. So I think I'd rather we changed the
> insternal variables for this to be os_distro_type and os_distro_variant
I can do this though. Anything but the current mess
> > - if not self.extraargs is None:
> > - self.install["extraargs"] = self.extraargs + " " + args
> > - else:
> > - self.install["extraargs"] = args
> > + self.install["extraargs"] = args
>
> This chunk looks a little questionable to me - IIRC this is reverting a fix
> we previously made, so perhaps this is just a merge error.
Hmm, no, this is intentional. Solaris needs to do all sorts of mangling
of extra args passed in. It's now the responsibility of the OSDistro to
handle .extraargs - see the change to _kernelHelper or whatever it's
called. We can't just do the pre-pending of extra args.
> > +
> > + if not fetcher.location.startswith("/"):
> > + args += "method=" + fetcher.location
> > +
> > + if guest.extraargs:
> > + args += guest.extraargs
> > +
> > try:
> > initrd = fetcher.acquireFile(initrdpath, progresscb)
> > - if fetcher.location.startswith("/"):
> > - # Local host path, so can't pass a location to guest
> > - #for install method
> > - return (kernel, initrd, "")
> > - else:
> > - return (kernel, initrd, "method=" + fetcher.location)
> > + return kernel, initrd, args
>
> Hmm, this existing code was dubious even before this change. method= is
> the Fedora / RHEL anaconda syntax for specifying install location. It
> should never havebeen in Distro class in the first place - instead it
> belongs in the RedHatDistro subclass.
This seems like a change to be made separately.
> These new classes seeem to be more or less independant of the bit
> os_type/virt_type renaming (baring the obvious fact that it uses the
> new names). I've no problem add this bit right away.
If you like, I can split out the os_type renaming as a separate patch.
> > if self.target:
> > disknode = self.target
> > + if self.device == VirtualDisk.DEVICE_CDROM and disknode.startswith('xvd'):
> > + disknode = disknode + ':cdrom'
> > +
>
> This seems wrong - you should not pass "xvda:cdrom" into the libvirt
> XML for a disk. There is an explicit attribute for specifying CDROM
> media
Ack.
regards
john
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
12-09-2008, 07:44 PM
Add support for Solaris PV
# HG changeset patch
# User john.levon@sun.com
# Date 1228854334 28800
# Node ID 5f97d4577a145a71c0b0ac1d50b0721caa5317ab
# Parent 7c692c15dc049d8e62c47ec897ab08979760e032
Add support for Solaris PV
Solaris PV comes in two flavours: Nevada and OpenSolaris. In order to
correctly build network installs for Nevada, we need to pass down guest
options into OSDistro.
Signed-off-by: John Levon <john.levon@sun.com>
diff --git a/virtinst/DistroManager.py b/virtinst/DistroManager.py
--- a/virtinst/DistroManager.py
+++ b/virtinst/DistroManager.py
@@ -41,6 +41,8 @@ from OSDistro import DebianDistro
from OSDistro import DebianDistro
from OSDistro import UbuntuDistro
from OSDistro import MandrivaDistro
+from OSDistro import SolarisDistro
+from OSDistro import OpenSolarisDistro
from OSDistro import GenericDistro
def _fetcherForURI(uri, scratchdir=None):
@@ -87,6 +89,11 @@ def _storeForDistro(fetcher, baseuri, ty
stores.append(UbuntuDistro(baseuri, typ, scratchdir, arch))
if distro == "mandriva" or distro is None:
stores.append(MandrivaDistro(baseuri, typ, scratchdir, arch))
+ # XXX: this is really "nevada"
+ if distro == "solaris" or distro is None:
+ stores.append(SolarisDistro(baseuri, type, scratchdir))
+ if distro == "solaris" or distro is None:
+ stores.append(OpenSolarisDistro(baseuri, type, scratchdir))
# If they're installing off a local file/device, we map it
- # through to a virtual harddisk
- if self.location is not None and self.location.startswith("/") and not os.path.isdir(self.location):
+ # through to a virtual CD or disk
+
+ if (self.location is not None and self.location.startswith("/")
+ and not os.path.isdir(self.location)):
+ device = Guest.VirtualDisk.DEVICE_DISK
+ if guest._lookup_osdict_key('pv_cdrom_install'):
+ device = Guest.VirtualDisk.DEVICE_CDROM
+
self._install_disk = VirtualDisk(self.location,
+ device=device,
readOnly=True,
transient=True)
+from virtinst import _util
from virtinst import _virtinst as _
def distroFromTreeinfo(fetcher, progresscb, uri, vmtype=None,
@@ -83,7 +85,7 @@ class Distro:
"""Determine if uri points to a tree of the store's distro"""
raise NotImplementedError
@@ -270,6 +276,7 @@ class RedHatDistro(Distro):
class RedHatDistro(Distro):
name = "Red Hat"
+ os_type = "linux"
uses_treeinfo = True
_boot_iso_paths = [ "images/boot.iso" ]
_hvm_kernel_paths = [ ("images/pxeboot/vmlinuz",
@@ -285,6 +292,7 @@ class FedoraDistro(RedHatDistro):
class FedoraDistro(RedHatDistro):
name = "Fedora"
+ os_type = "linux"
def isValidStore(self, fetcher, progresscb):
if self._hasTreeinfo(fetcher, progresscb):
@@ -300,6 +308,7 @@ class RHELDistro(RedHatDistro):
class RHELDistro(RedHatDistro):
name = "Red Hat Enterprise Linux"
+ os_type = "linux"
def isValidStore(self, fetcher, progresscb):
if self._hasTreeinfo(fetcher, progresscb):
@@ -322,6 +331,7 @@ class CentOSDistro(RedHatDistro):
class CentOSDistro(RedHatDistro):
name = "CentOS"
+ os_type = "linux"
def isValidStore(self, fetcher, progresscb):
if self._hasTreeinfo(fetcher, progresscb):
@@ -338,6 +348,7 @@ class SLDistro(RedHatDistro):
class SLDistro(RedHatDistro):
name = "Scientific Linux"
+ os_type = "linux"
_boot_iso_paths = RedHatDistro._boot_iso_paths + [ "images/SL/boot.iso" ]
_hvm_kernel_paths = RedHatDistro._hvm_kernel_paths +
[ ("images/SL/pxeboot/vmlinuz",
@@ -361,6 +372,7 @@ class SuseDistro(Distro):
class SuseDistro(Distro):
- def acquireKernel(self, fetcher, progresscb):
+ def acquireKernel(self, guest, fetcher, progresscb):
# If installing a fullvirt guest
if self.type is None or self.type == "hvm" or
fetcher.hasFile("boot/%s/vmlinuz-xen" % self.arch):
- return Distro.acquireKernel(self, fetcher, progresscb)
+ return Distro.acquireKernel(self, guest, fetcher, progresscb)
# For Opensuse <= 10.2, we need to perform some heinous stuff
logging.debug("Trying Opensuse 10 PV rpm hacking")
@@ -590,6 +602,7 @@ class DebianDistro(Distro):
# daily builds: http://people.debian.org/~joeyh/d-i/
name = "Debian"
+ os_type = "linux"
def __init__(self, uri, vmtype=None, scratchdir=None, arch=None):
Distro.__init__(self, uri, vmtype, scratchdir, arch)
@@ -642,6 +655,7 @@ class UbuntuDistro(DebianDistro):
class UbuntuDistro(DebianDistro):
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools
01-12-2009, 06:49 PM
Cole Robinson
Add support for Solaris PV
john.levon@sun.com wrote:
> # HG changeset patch
> # User john.levon@sun.com
> # Date 1228854334 28800
> # Node ID 5f97d4577a145a71c0b0ac1d50b0721caa5317ab
> # Parent 7c692c15dc049d8e62c47ec897ab08979760e032
> Add support for Solaris PV
>
> Solaris PV comes in two flavours: Nevada and OpenSolaris. In order to
> correctly build network installs for Nevada, we need to pass down guest
> options into OSDistro.
>
Applied now.
Thanks,
Cole
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@redhat.com
https://www.redhat.com/mailman/listinfo/et-mgmt-tools