ia64/xen-unstable

changeset 2204:294fd489740a

bitkeeper revision 1.1159.1.43 (411b823643tlKC-NQ-OaFo48LvEShA)

Add an option to leave a domain paused when it is created.
author mjw@wray-m-3.hpl.hp.com
date Thu Aug 12 14:44:06 2004 +0000 (2004-08-12)
parents 86c685a1dda9
children 0213aef0e364
files tools/python/xen/xm/create.py
line diff
     1.1 --- a/tools/python/xen/xm/create.py	Thu Aug 12 14:43:17 2004 +0000
     1.2 +++ b/tools/python/xen/xm/create.py	Thu Aug 12 14:44:06 2004 +0000
     1.3 @@ -73,9 +73,13 @@ gopts.opt('dryrun', short='n',
     1.4  The defaults file is loaded and the SXP configuration is created and printed.         
     1.5  """)
     1.6  
     1.7 +gopts.opt('paused', short='p',
     1.8 +          fn=set_true, default=0,
     1.9 +          use='Leave the domain paused after it is created.')
    1.10 +
    1.11  gopts.opt('console_autoconnect', short='c',
    1.12            fn=set_true, default=0,
    1.13 -          use="Connect to console after domain is created.")
    1.14 +          use="Connect to the console after the domain is created.")
    1.15  
    1.16  gopts.var('name', val='NAME',
    1.17            fn=set_value, default=None,
    1.18 @@ -407,10 +411,11 @@ def make_domain(opts, config):
    1.19          console_port = int(sxp.child_value(console_info, 'console_port'))
    1.20      else:
    1.21          console_port = None
    1.22 -    
    1.23 -    if server.xend_domain_unpause(dom) < 0:
    1.24 -        server.xend_domain_destroy(dom)
    1.25 -        opts.err("Failed to unpause domain %s" % dom)
    1.26 +
    1.27 +    if not opts.vals.paused:
    1.28 +        if server.xend_domain_unpause(dom) < 0:
    1.29 +            server.xend_domain_destroy(dom)
    1.30 +            opts.err("Failed to unpause domain %s" % dom)
    1.31      opts.info("Started domain %s, console on port %d"
    1.32                % (dom, console_port))
    1.33      return (dom, console_port)