Пример #1
0
    def execute(self, args):
        image = images.Manager(self.config).get(args.image)
        key = keys.Manager(self.config).get(args.key)
        preset = dict(self.config.items(Presets.prefix + args.type))
        name = args.name.replace(' ', '-')

        vboxmanage(self, 'import', image.filename(),
            '--vsys', '0',
            '--vmname', name,
            '--cpus', preset['cores'],
            '--memory', preset['memory']
        )

        properties.set(self, name, 'auth-key', key.content())
Пример #2
0
 def process_vm(self, name, uuid, args):
     manager = keys.Manager(self.config)
     key = manager.get(args.key)
     properties.set(self, uuid, "auth-key", key.content())