Revision e482b7f9 image_creator/main.py

b/image_creator/main.py
140 140
                      help="register image with the cloud as public",
141 141
                      action="store_true")
142 142

  
143
    parser.add_option("--allow-unsupported", dest="allow_unsupported",
144
                      help="Proceed with the image creation even if the media "
145
                      "is not supported", default=False, action="store_true")
146

  
143 147
    parser.add_option("--tmpdir", dest="tmp", type="string", default=None,
144 148
                      help="create large temporary image files under DIR",
145 149
                      metavar="DIR")
......
273 277

  
274 278
        image = disk.get_image(snapshot, sysprep_params=options.sysprep_params)
275 279

  
280
        if hasattr(image, 'unsupported') and not options.allow_unsupported:
281
            raise FatalError(
282
                "The media seems to be unsupported. If you insist on creating "
283
                "an image out of it, use the `--allow-unsupported' option. "
284
                "Using this is highly discouraged, since the resulting image "
285
                "will not be cleaned up from sensitive data and will not get "
286
                "configured during the deployment")
287

  
276 288
        for sysprep in options.disabled_syspreps:
277 289
            image.os.disable_sysprep(image.os.get_sysprep_by_name(sysprep))
278 290

  
......
298 310
        size = options.shrink and image.shrink() or image.size
299 311
        metadata.update(image.meta)
300 312

  
313
        if hasattr(image, 'unsupported'):
314
            metadata['EXCLUDE_ALL_TASKS'] = "yes"
315

  
301 316
        # Add command line metadata to the collected ones...
302 317
        metadata.update(options.metadata)
303 318

  

Also available in: Unified diff