All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Remus python issue
       [not found] <encrypt-26322636@satgate.net>
@ 2011-01-17 11:15 ` Denis Chapligin
  0 siblings, 0 replies; 3+ messages in thread
From: Denis Chapligin @ 2011-01-17 11:15 UTC (permalink / raw)
  To: Shriram Rajagopalan, xen-devel

[-- Attachment #1: Type: text/plain, Size: 1921 bytes --]

Hi

It is in attachment.
I've changed domain name and logical volume name,
don't think they matter.

On Fri, 14 Jan 2011 21:51:29 -0800
Shriram Rajagopalan <rshriram@gmail.com> wrote:

> what is your domU configuration?
> 
> On Fri, Jan 14, 2011 at 2:46 AM, Denis Chapligin
> <chollya@satgate.net> wrote:
> > Hi
> >
> > I'm trying to use remues with xen 4.0.2-rc2, dom0 kernel is pvops
> > 2.6.32, domU is PV with kernel 2.6.18. When i try to start remus, it
> > gives me a backtrace like this:
> >
> > #remus domU 10.10.10.2
> > Traceback (most recent call last):
> >  File "/usr/bin/remus", line 212, in <module>
> >    run(cfg)
> >  File "/usr/bin/remus", line 106, in run
> >    dom = vm.VM(cfg.domid)
> >  File "/usr/lib/xen-4.0/lib/python/xen/remus/vm.py", line 32, in
> > __init__ self.loaddominfo()
> >  File "/usr/lib/xen-4.0/lib/python/xen/remus/vm.py", line 35, in
> > loaddominfo self.dom = parsedominfo(self.dominfo)
> >  File "/usr/lib/xen-4.0/lib/python/xen/remus/vm.py", line 77, in
> > parsedominfo return s2d(dominfo[1:])
> >  File "/usr/lib/xen-4.0/lib/python/xen/remus/vm.py", line 61, in s2d
> >    val = s2d(elem[1:])
> >  File "/usr/lib/xen-4.0/lib/python/xen/remus/vm.py", line 61, in s2d
> >    val = s2d(elem[1:])
> >  File "/usr/lib/xen-4.0/lib/python/xen/remus/vm.py", line 66, in s2d
> >    for k, v in val.iteritems():
> > AttributeError: 'int' object has no attribute 'iteritems'
> >
> > It looks like remues isn't able to parse some data from xen. Is it a
> > well know problem or just my local misconfiguration?
> >
> > --
> >                                                Denis Chapligin
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xensource.com
> > http://lists.xensource.com/xen-devel
> >
> 
> 
> 


-- 
						Denis Chapligin

[-- Attachment #2: domU.cfg --]
[-- Type: application/octet-stream, Size: 9848 bytes --]

#  -*- mode: python; -*-
#============================================================================
# Example Python setup script for Debian guest installation.
#============================================================================
#
# Standard options are configured as normal. Only a subset are included below.
# See /usr/share/doc/xen-utils-common/examples for full examples.
#
# After standard options are configure use
#    xm create xm-debian.cfg install=true"
# to start the Debian Installer.
#
# In the installation case the following additional variables exist:
#
# COMMON OPTIONS
# install-method: "cdrom" or "network"
# install-arch: which architecture to install. e.g. i386 or amd64
# install-installer: URL or path to the Debian Installer bits. By
#   default for a network install these are located under
#   install-mirror. For a CDROM install the default is a fixed path on
#   the CD.
# install-kernel, install-ramdisk: URL/path to the installer kernel and
#   ramdisk to use, by default these are located via install-installer.
# install-extra: extra command line arguments
#
# CDROM SPECIFIC OPTIONS
# install-media: Path to the Debian install media (i.e. an ISO)
# install-cdrom-device: Name of the CD-ROM device within the guest.
#
# NETWORK SPECIFIC OPTIONS
# install-suite: which Debian version to install. e.g. lenny, squeeze or sid
# install-mirror: which Debian mirror to use
#   e.g. http://ftp.uk.debian.org/debian
#============================================================================


#----------------------------------------------------------------------------
# Standard variables

# Initial memory allocation (in megabytes) for the new domain.
memory = 2560

# A name for your domain. All domains must have different names.
name = "domu"

# 128-bit UUID for the domain.  The default behavior is to generate a new UUID
# on each call to 'xm create'.
#uuid = "06ed00fe-1162-4fc4-b5d8-11993ee4a8b9"

cpuid=['0x80000000:eax=0x3,ebx=0x0,ecx=0x0,edx=0x0']

# List of which CPUS this domain is allowed to use, default Xen picks
#cpus = ""         # leave to Xen to pick
#cpus = "0"        # all vcpus run on CPU0
cpus = "1,2,3" # run on cpus 0,2,3,5

# Number of Virtual CPUS to use, default is 1
vcpus = 3

#----------------------------------------------------------------------------
# Define network interfaces.

# By default, no network interfaces are configured.  You may have one created
# with sensible defaults using an empty vif clause:
#
# vif = ['']
#
# or optionally override backend, bridge, ip, mac, script, type, or vifname:
#
# vif = ['mac=00:16:3e:00:00:11, bridge=xenbr0']
#
# or more than one interface may be configured:
#
# vif = ['', 'bridge=xenbr1']

vif = ['', 'bridge=br6']

#----------------------------------------------------------------------------
# Define the disk devices you want the domain to have access to, and
# what you want them accessible as.
# Each disk entry is of the form phy:UNAME,DEV,MODE
# where UNAME is the device, DEV is the device name the domain will see,
# and MODE is r for read-only, w for read-write.
#
# NB: Only xvd devices are supported by the kernel in Debian Lenny and later.

disk = ['phy:/dev/SATA/TEST,xvda,w']

#----------------------------------------------------------------------------
# Define frame buffer device.
#
# By default, no frame buffer device is configured.
#
# To create one using the SDL backend and sensible defaults:
#
# vfb = [ 'type=sdl' ]
#
# This uses environment variables XAUTHORITY and DISPLAY.  You
# can override that:
#
# vfb = [ 'type=sdl,xauthority=/home/bozo/.Xauthority,display=:1' ]
#
# To create one using the VNC backend and sensible defaults:
#
# vfb = [ 'type=vnc' ]
#
# The backend listens on 127.0.0.1 port 5900+N by default, where N is
# the domain ID.  You can override both address and N:
#
# vfb = [ 'type=vnc,vnclisten=127.0.0.1,vncdisplay=1' ]
#
# Or you can bind the first unused port above 5900:
#
# vfb = [ 'type=vnc,vnclisten=0.0.0.0,vnunused=1' ]
#
# You can override the password:
#
# vfb = [ 'type=vnc,vncpasswd=MYPASSWD' ]
#
# Empty password disables authentication.  Defaults to the vncpasswd
# configured in xend-config.sxp.


#============================================================================
# Debian Installer specific variables

def check_bool(name, value):
    value = str(value).lower()
    if value in ('t', 'tr', 'tru', 'true'):
        return True
    return False

global var_check_with_default
def var_check_with_default(default, var, val):
    if val:
        return val
    return default

xm_vars.var('install', use='Install Debian, default: false', check=check_bool)
xm_vars.var("install-method",
            use='Installation method to use "cdrom" or "network" (default: network)',
            check=lambda var, val: var_check_with_default('network', var, val))

# install-method == "network"
xm_vars.var("install-mirror",
            use='Debian mirror to install from (default: http://ftp.debian.org/debian)',
            check=lambda var, val: var_check_with_default('http://ftp.debian.org/debian', var, val))
xm_vars.var("install-suite",
            use='Debian suite to install (default: squeeze)',
            check=lambda var, val: var_check_with_default('squeeze', var, val))

# install-method == "cdrom"
xm_vars.var("install-media",
            use='Installation media to use (default: None)',
            check=lambda var, val: var_check_with_default(None, var, val))
xm_vars.var("install-cdrom-device",
            use='Installation media to use (default: xvdd)',
            check=lambda var, val: var_check_with_default('xvdd', var, val))

# Common options
xm_vars.var("install-arch",
            use='Debian mirror to install from (default: i386)',
            check=lambda var, val: var_check_with_default('i386', var, val))
xm_vars.var("install-extra",
            use='Extra command line options (default: None)',
            check=lambda var, val: var_check_with_default(None, var, val))
xm_vars.var("install-installer",
            use='Debian installer to use (default: network uses install-mirror; cdrom uses /install.ARCH)',
            check=lambda var, val: var_check_with_default(None, var, val))
xm_vars.var("install-kernel",
            use='Debian installer kernel to use (default: uses install-installer)',
            check=lambda var, val: var_check_with_default(None, var, val))
xm_vars.var("install-ramdisk",
            use='Debian installer ramdisk to use (default: uses install-installer)',
            check=lambda var, val: var_check_with_default(None, var, val))

xm_vars.check()

if not xm_vars.env.get('install'):
    bootloader="pygrub"
elif xm_vars.env['install-method'] == "network":
    import os.path
    print "Install Mirror: %s" % xm_vars.env['install-mirror']
    print "Install Suite: %s" % xm_vars.env['install-suite']
    if xm_vars.env['install-installer']:
        installer = xm_vars.env['install-installer']
    else:
        installer = xm_vars.env['install-mirror']+"/dists/"+xm_vars.env['install-suite'] + \
                    "/main/installer-"+xm_vars.env['install-arch']+"/current/images"
    print "Installer: %s" % installer

    print
    print "WARNING: Installer kernel and ramdisk are not authenticated."
    print

    if xm_vars.env.get('install-kernel'):
        kernelurl = xm_vars.env['install-kernel']
    else:
        kernelurl = installer + "/netboot/xen/vmlinuz"

    if xm_vars.env.get('install-ramdisk'):
        ramdiskurl = xm_vars.env['install-ramdisk']
    else:
        ramdiskurl = installer + "/netboot/xen/initrd.gz"

    import urllib
    class MyUrlOpener(urllib.FancyURLopener):
        def http_error_default(self, req, fp, code, msg, hdrs):
            raise IOError("%s %s" % (code, msg))
    urlopener = MyUrlOpener()

    try:
        print "Fetching %s" % kernelurl
        kernel, _ = urlopener.retrieve(kernelurl)
        print "Fetching %s" % ramdiskurl
        ramdisk, _ = urlopener.retrieve(ramdiskurl)
    except IOError, _:
        raise

elif xm_vars.env['install-method'] == "cdrom":
    arch_path = { 'i386': "/install.386",
                  'amd64': "/install.amd" }

    if xm_vars.env['install-media']:
        print "Install Media: %s" % xm_vars.env['install-media']
    else:
        raise OptionError("No installation media given.")

    if xm_vars.env['install-installer']:
        installer = xm_vars.env['install-installer']
    else:
        installer = arch_path[xm_vars.env['install-arch']]

    print "Installer: %s" % installer

    if xm_vars.env.get('install-kernel'):
        kernelpath = xm_vars.env['install-kernel']
    else:
        kernelpath = installer + "/xen/vmlinuz"

    if xm_vars.env.get('install-ramdisk'):
        ramdiskpath = xm_vars.env['install-ramdisk']
    else:
        ramdiskpath = installer + "/xen/initrd.gz"

    disk.insert(0, 'file:%s,%s:cdrom,r' % (xm_vars.env['install-media'],
                                           xm_vars.env['install-cdrom-device']))

    bootloader="pygrub"
    bootargs="--kernel=%s --ramdisk=%s" % (kernelpath, ramdiskpath)
    print "From CD"
else:
    print "WARNING: Unknown install-method: %s." % xm_vars.env['install-method']

if xm_vars.env.get('install'):
    # Figure out command line
    if xm_vars.env['install-extra']:
        extras=[xm_vars.env['install-extra']]
    else:
        extras=[]

    # Reboot will just restart the installer since this file is not
    # reparsed, so halt and restart that way.
    extras.append("debian-installer/exit/always_halt=true")
    extras.append("--")
    extras.append("quiet")

    console="hvc0"
    try:
        if len(vfb) >= 1:
            console="tty0"
    except NameError, e:
        pass

    extras.append("console="+ console)

    extra = str.join(" ", extras)
    print "command line is \"%s\"" % extra

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Remus python issue
  2011-01-14 10:46 Denis Chapligin
@ 2011-01-15  5:51 ` Shriram Rajagopalan
  0 siblings, 0 replies; 3+ messages in thread
From: Shriram Rajagopalan @ 2011-01-15  5:51 UTC (permalink / raw)
  To: Denis Chapligin; +Cc: xen-devel

what is your domU configuration?

On Fri, Jan 14, 2011 at 2:46 AM, Denis Chapligin <chollya@satgate.net> wrote:
> Hi
>
> I'm trying to use remues with xen 4.0.2-rc2, dom0 kernel is pvops
> 2.6.32, domU is PV with kernel 2.6.18. When i try to start remus, it
> gives me a backtrace like this:
>
> #remus domU 10.10.10.2
> Traceback (most recent call last):
>  File "/usr/bin/remus", line 212, in <module>
>    run(cfg)
>  File "/usr/bin/remus", line 106, in run
>    dom = vm.VM(cfg.domid)
>  File "/usr/lib/xen-4.0/lib/python/xen/remus/vm.py", line 32, in
> __init__ self.loaddominfo()
>  File "/usr/lib/xen-4.0/lib/python/xen/remus/vm.py", line 35, in
> loaddominfo self.dom = parsedominfo(self.dominfo)
>  File "/usr/lib/xen-4.0/lib/python/xen/remus/vm.py", line 77, in
> parsedominfo return s2d(dominfo[1:])
>  File "/usr/lib/xen-4.0/lib/python/xen/remus/vm.py", line 61, in s2d
>    val = s2d(elem[1:])
>  File "/usr/lib/xen-4.0/lib/python/xen/remus/vm.py", line 61, in s2d
>    val = s2d(elem[1:])
>  File "/usr/lib/xen-4.0/lib/python/xen/remus/vm.py", line 66, in s2d
>    for k, v in val.iteritems():
> AttributeError: 'int' object has no attribute 'iteritems'
>
> It looks like remues isn't able to parse some data from xen. Is it a
> well know problem or just my local misconfiguration?
>
> --
>                                                Denis Chapligin
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>



-- 
perception is but an offspring of its own self

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Remus python issue
@ 2011-01-14 10:46 Denis Chapligin
  2011-01-15  5:51 ` Shriram Rajagopalan
  0 siblings, 1 reply; 3+ messages in thread
From: Denis Chapligin @ 2011-01-14 10:46 UTC (permalink / raw)
  To: xen-devel

Hi

I'm trying to use remues with xen 4.0.2-rc2, dom0 kernel is pvops
2.6.32, domU is PV with kernel 2.6.18. When i try to start remus, it
gives me a backtrace like this:

#remus domU 10.10.10.2
Traceback (most recent call last):
  File "/usr/bin/remus", line 212, in <module>
    run(cfg)
  File "/usr/bin/remus", line 106, in run
    dom = vm.VM(cfg.domid)
  File "/usr/lib/xen-4.0/lib/python/xen/remus/vm.py", line 32, in
__init__ self.loaddominfo()
  File "/usr/lib/xen-4.0/lib/python/xen/remus/vm.py", line 35, in
loaddominfo self.dom = parsedominfo(self.dominfo)
  File "/usr/lib/xen-4.0/lib/python/xen/remus/vm.py", line 77, in
parsedominfo return s2d(dominfo[1:])
  File "/usr/lib/xen-4.0/lib/python/xen/remus/vm.py", line 61, in s2d
    val = s2d(elem[1:])
  File "/usr/lib/xen-4.0/lib/python/xen/remus/vm.py", line 61, in s2d
    val = s2d(elem[1:])
  File "/usr/lib/xen-4.0/lib/python/xen/remus/vm.py", line 66, in s2d
    for k, v in val.iteritems():
AttributeError: 'int' object has no attribute 'iteritems'

It looks like remues isn't able to parse some data from xen. Is it a
well know problem or just my local misconfiguration?

-- 
						Denis Chapligin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-17 11:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <encrypt-26322636@satgate.net>
2011-01-17 11:15 ` Remus python issue Denis Chapligin
2011-01-14 10:46 Denis Chapligin
2011-01-15  5:51 ` Shriram Rajagopalan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.