qvm-template*: Add option to specify pool to store created VM.

Tento commit je obsažen v:
WillyPillow 2020-07-29 20:55:56 +08:00
rodič ef59a658f4
revize 90e4f65bea
V databázi nebyl nalezen žádný známý klíč pro tento podpis
ID GPG klíče: 3839E194B1415A9C
2 změnil soubory, kde provedl 8 přidání a 1 odebrání

Zobrazit soubor

@ -64,6 +64,8 @@ parser.add_argument('--nogpgcheck', action='store_true',
help='Disable signature checks.')
parser.add_argument('--allow-pv', action='store_true',
help='Allow setting virt_mode to pv in configuration file.')
parser.add_argument('--pool',
help='Specify pool to store created VMs in.')
# qvm-template download
parser.add_argument('--downloaddir', default='.',
help='Override download directory.')
@ -228,6 +230,8 @@ def install(args, app, version_selector=VersionSelector.LATEST,
]
if args.allow_pv:
cmdline.append('--allow-pv')
if args.pool:
cmdline += ['--pool', args.pool]
subprocess.check_call(cmdline + [
'post-install',
name,

Zobrazit soubor

@ -53,6 +53,8 @@ parser.add_argument('--no-installed-by-rpm', action='store_true',
help='Do not set installed_by_rpm')
parser.add_argument('--allow-pv', action='store_true',
help='Allow setting virt_mode to pv in configuration file.')
parser.add_argument('--pool',
help='Specify pool to store created VMs in.')
parser.add_argument('action', choices=['post-install', 'pre-remove'],
help='Action to perform')
parser.add_argument('name', action='store',
@ -259,7 +261,8 @@ def post_install(args):
vm = app.add_new_vm('TemplateVM',
name=args.name,
label=qubesadmin.config.defaults['template_label'])
label=qubesadmin.config.defaults['template_label'],
pool=args.pool)
vm_created = True
vm.log.info('Importing data')