Revision 3b6d8c9b

b/lib/cmdlib.py
2997 2997
      raise errors.OpPrereqError("OS '%s' not in supported os list for"
2998 2998
                                 " primary node"  % self.op.os_type)
2999 2999

  
3000
    if self.op.kernel_path == constants.VALUE_NONE:
3001
      raise errors.OpPrereqError("Can't set instance kernel to none")
3002

  
3000 3003
    # instance verification
3001 3004
    hostname1 = utils.HostInfo(self.op.instance_name)
3002 3005

  
......
3087 3090
                            disk_template=self.op.disk_template,
3088 3091
                            status=self.instance_status,
3089 3092
                            network_port=network_port,
3093
                            kernel_path=self.op.kernel_path,
3094
                            initrd_path=self.op.initrd_path,
3090 3095
                            )
3091 3096

  
3092 3097
    feedback_fn("* creating instance disks...")
b/lib/opcodes.py
160 160
class OpCreateInstance(OpCode):
161 161
  """Create an instance."""
162 162
  OP_ID = "OP_INSTANCE_CREATE"
163
  __slots__ = ["instance_name", "mem_size", "disk_size", "os_type", "pnode",
164
               "disk_template", "snode", "swap_size", "mode",
165
               "vcpus", "ip", "bridge", "src_node", "src_path", "start",
166
               "wait_for_sync", "ip_check", "mac"]
163
  __slots__ = [
164
    "instance_name", "mem_size", "disk_size", "os_type", "pnode",
165
    "disk_template", "snode", "swap_size", "mode",
166
    "vcpus", "ip", "bridge", "src_node", "src_path", "start",
167
    "wait_for_sync", "ip_check", "mac",
168
    "kernel_path", "initrd_path",
169
    ]
167 170

  
168 171

  
169 172
class OpReinstallInstance(OpCode):
b/scripts/gnt-instance
241 241

  
242 242
  (pnode, snode) = SplitNodeOption(opts.node)
243 243

  
244
  kernel_path = _TransformPath(opts.kernel_path)
245
  initrd_path = _TransformPath(opts.initrd_path)
246

  
244 247
  op = opcodes.OpCreateInstance(instance_name=instance, mem_size=opts.mem,
245 248
                                disk_size=opts.size, swap_size=opts.swap,
246 249
                                disk_template=opts.disk_template,
......
249 252
                                snode=snode, vcpus=opts.vcpus,
250 253
                                ip=opts.ip, bridge=opts.bridge,
251 254
                                start=opts.start, ip_check=opts.ip_check,
252
                                wait_for_sync=opts.wait_for_sync, mac=opts.mac)
255
                                wait_for_sync=opts.wait_for_sync,
256
                                mac=opts.mac,
257
                                kernel_path=kernel_path,
258
                                initrd_path=initrd_path)
253 259
  SubmitOpCode(op)
254 260
  return 0
255 261

  
......
745 751
  make_option("--no-ip-check", dest="ip_check", default=True,
746 752
              action="store_false", help="Don't check that the instance's IP"
747 753
              " is alive (only valid with --no-start)"),
754
  make_option("--kernel", dest="kernel_path",
755
              help="Path to the instances' kernel (or 'default')",
756
              default=None,
757
              type="string", metavar="<FILENAME>"),
758
  make_option("--initrd", dest="initrd_path",
759
              help="Path to the instances' initrd (or 'none', or 'default')",
760
              default=None,
761
              type="string", metavar="<FILENAME>"),
748 762
  ]
749 763

  
750 764
commands = {

Also available in: Unified diff