ia64/xen-unstable

changeset 726:3c39b32327e1

bitkeeper revision 1.431 (3f689945jnFujVkprh_vptT464scvA)

xenctl.xml, Defaults.java, CommandDomainNew.java, ParseDomainNew.java:
Add <root_args>ro</root_args> option to xenctl
author tlh20@labyrinth.cl.cam.ac.uk
date Wed Sep 17 17:26:29 2003 +0000 (2003-09-17)
parents 7c770d3613cf
children 37cb4dcb88fb
files tools/control/src/org/xenoserver/cmdline/ParseDomainNew.java tools/control/src/org/xenoserver/control/CommandDomainNew.java tools/control/src/org/xenoserver/control/Defaults.java tools/control/xenctl.xml
line diff
     1.1 --- a/tools/control/src/org/xenoserver/cmdline/ParseDomainNew.java	Wed Sep 17 16:48:47 2003 +0000
     1.2 +++ b/tools/control/src/org/xenoserver/cmdline/ParseDomainNew.java	Wed Sep 17 17:26:29 2003 +0000
     1.3 @@ -19,6 +19,7 @@ public class ParseDomainNew extends Comm
     1.4          int vifs = getIntParameter(args, 'v', d.domainVIFs);
     1.5          String bargs = getStringParameter(args, 'a', d.args) + " ";
     1.6          String root_dev = getStringParameter(args, 'd', d.rootDevice);
     1.7 +        String root_args = getStringParameter(args, 't', d.rootArgs);
     1.8          String usr_dev = getStringParameter(args, 'u', d.usrDevice);
     1.9          String nfs_root_path = getStringParameter(args, 'f', d.nwNFSRoot);
    1.10          String nw_ip = getStringParameter(args, '4', d.nwIP);
    1.11 @@ -39,6 +40,7 @@ public class ParseDomainNew extends Comm
    1.12                  vifs,
    1.13                  bargs,
    1.14                  root_dev,
    1.15 +                root_args,
    1.16                  nfs_root_path,
    1.17                  nw_ip,
    1.18                  nw_gw,
    1.19 @@ -78,7 +80,7 @@ public class ParseDomainNew extends Comm
    1.20      }
    1.21  
    1.22      public String getUsage() {
    1.23 -        return "[-n<domain_name>] [-k<size>] [-i<image>] [-v<num_vifs>] [-r<initrd>] [-d<root_device>] [-u<usr_device>] [-f<nfs_root>] [-s<nfs_boot_server>] [-4<ipv4_boot_address>] [-g<ipv4_boot_gateway>] [-m<ipv4_boot_netmask>] [-h<hostname>] [-a<args>]";
    1.24 +        return "[-n<domain_name>] [-k<size>] [-i<image>] [-v<num_vifs>] [-r<initrd>] [-d<root_device>] [-t<root_mount_args>] [-u<usr_device>] [-f<nfs_root>] [-s<nfs_boot_server>] [-4<ipv4_boot_address>] [-g<ipv4_boot_gateway>] [-m<ipv4_boot_netmask>] [-h<hostname>] [-a<args>]";
    1.25      }
    1.26  
    1.27      public String getHelpText() {
    1.28 @@ -93,6 +95,7 @@ public class ParseDomainNew extends Comm
    1.29              + "  -v  Number of VIFs                           domain_vifs\n"
    1.30              + "  -r  InitRD (if required)                     domain_init_rd\n"
    1.31              + "  -d  Root device (e.g /dev/nfs, /dev/hda3)    root_device\n"
    1.32 +            + "  -t  Root mount args (e.g ro)                 root_args\n"
    1.33              + "  -u  Usr dev/path (e.g /dev/hda3, server:path)usr_device\n"
    1.34              + "  -a  Additional boot parameters               args\n"
    1.35              + "\n"
     2.1 --- a/tools/control/src/org/xenoserver/control/CommandDomainNew.java	Wed Sep 17 16:48:47 2003 +0000
     2.2 +++ b/tools/control/src/org/xenoserver/control/CommandDomainNew.java	Wed Sep 17 17:26:29 2003 +0000
     2.3 @@ -32,6 +32,8 @@ public class CommandDomainNew extends Co
     2.4      private String bargs;
     2.5      /** Root device */
     2.6      private String root_dev;
     2.7 +    /** Root mount args */
     2.8 +    private String root_args;
     2.9      /** Usr device */
    2.10      private String usr_dev;
    2.11      /** NFS root path */
    2.12 @@ -91,13 +93,14 @@ public class CommandDomainNew extends Co
    2.13          int vifs,
    2.14          String bargs,
    2.15          String root_dev,
    2.16 +        String root_args,
    2.17          String nfs_root_path,
    2.18          String nw_ip,
    2.19          String nw_gw,
    2.20          String nw_mask,
    2.21          String nw_nfs_server,
    2.22          String nw_host) {
    2.23 -        this(d,name,size,image,initrd,vifs,bargs,root_dev,nfs_root_path,nw_ip,nw_gw,nw_mask,nw_nfs_server,nw_host,null);
    2.24 +        this(d,name,size,image,initrd,vifs,bargs,root_dev,root_args,nfs_root_path,nw_ip,nw_gw,nw_mask,nw_nfs_server,nw_host,null);
    2.25      }
    2.26      
    2.27      public CommandDomainNew(
    2.28 @@ -109,6 +112,7 @@ public class CommandDomainNew extends Co
    2.29          int vifs,
    2.30          String bargs,
    2.31          String root_dev,
    2.32 +        String root_args,
    2.33          String nfs_root_path,
    2.34          String nw_ip,
    2.35          String nw_gw,
    2.36 @@ -124,6 +128,7 @@ public class CommandDomainNew extends Co
    2.37              this.vifs = vifs;
    2.38              this.bargs = bargs;
    2.39              this.root_dev = root_dev;
    2.40 +            this.root_args = root_args;
    2.41              this.nfs_root_path = nfs_root_path;
    2.42              this.nw_ip = nw_ip;
    2.43              this.nw_gw = nw_gw;
    2.44 @@ -219,7 +224,7 @@ public class CommandDomainNew extends Co
    2.45                      }
    2.46                      bargs =
    2.47                          (bargs
    2.48 -                            + " root=/dev/nfs "
    2.49 +                            + " root=/dev/nfs " + root_args + " " 
    2.50                              + "nfsroot="
    2.51                              + StringPattern.parse(nfs_root_path).resolve(
    2.52                                  domain_id)
    2.53 @@ -229,7 +234,7 @@ public class CommandDomainNew extends Co
    2.54                          (bargs
    2.55                              + " root="
    2.56                              + StringPattern.parse(root_dev).resolve(domain_id)
    2.57 -                            + " ro ");
    2.58 +                            + " " + root_args + " ");
    2.59  
    2.60                  }
    2.61                  
     3.1 --- a/tools/control/src/org/xenoserver/control/Defaults.java	Wed Sep 17 16:48:47 2003 +0000
     3.2 +++ b/tools/control/src/org/xenoserver/control/Defaults.java	Wed Sep 17 17:26:29 2003 +0000
     3.3 @@ -29,6 +29,8 @@ public class Defaults {
     3.4      public int domainVIFs;
     3.5      /** Default root device. */
     3.6      public String rootDevice;
     3.7 +    /** Default root mount args */
     3.8 +    public String rootArgs;
     3.9      /** Default usr device. */
    3.10      public String usrDevice;
    3.11      /** Default IP address pattern. */
    3.12 @@ -88,6 +90,7 @@ public class Defaults {
    3.13          System.out.println("   domainImage     " + domainImage);
    3.14          System.out.println("   domainInitRD    " + domainInitRD);
    3.15          System.out.println("   rootDevice      " + rootDevice);
    3.16 +        System.out.println("   rootArgs        " + rootArgs);
    3.17          System.out.println("   usrDevice       " + usrDevice);
    3.18          System.out.println("   NWIP            " + nwIP);
    3.19          System.out.println("   NWGW            " + nwGateway);
    3.20 @@ -153,6 +156,8 @@ public class Defaults {
    3.21                      domainVIFs = Integer.parseInt(s);
    3.22                  } else if (lastName.equals("root_device")) {
    3.23                      rootDevice = s;
    3.24 +                } else if (lastName.equals("root_args")) {
    3.25 +                    rootArgs = s;
    3.26                  } else if (lastName.equals("usr_device")) {
    3.27                      usrDevice = s;
    3.28                  } else if (lastName.equals("nw_ip")) {
     4.1 --- a/tools/control/xenctl.xml	Wed Sep 17 16:48:47 2003 +0000
     4.2 +++ b/tools/control/xenctl.xml	Wed Sep 17 17:26:29 2003 +0000
     4.3 @@ -6,6 +6,7 @@
     4.4  <domain_image>./image</domain_image>
     4.5  <domain_vifs>1</domain_vifs>
     4.6  <root_device>/dev/nfs</root_device>
     4.7 +<root_args>ro</root_args>
     4.8  <nw_ip>=+</nw_ip>
     4.9  <nw_gw>=</nw_gw>
    4.10  <nw_mask>=</nw_mask>