mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-10-08 01:40:31 +00:00
HVM AMIs now working with extlinux
This commit is contained in:
parent
9ee318e3d9
commit
03db9823f9
2 changed files with 13 additions and 2 deletions
|
@ -32,7 +32,7 @@ def validate_manifest(data, validator, error):
|
||||||
|
|
||||||
from common.bytes import Bytes
|
from common.bytes import Bytes
|
||||||
if data['volume']['backing'] == 'ebs':
|
if data['volume']['backing'] == 'ebs':
|
||||||
volume_size = Bytes('2MiB') if data['volume']['partitions']['type'] == 'msdos' else Bytes(0)
|
volume_size = Bytes(0)
|
||||||
for key, partition in data['volume']['partitions'].iteritems():
|
for key, partition in data['volume']['partitions'].iteritems():
|
||||||
if key != 'type':
|
if key != 'type':
|
||||||
volume_size += Bytes(partition['size'])
|
volume_size += Bytes(partition['size'])
|
||||||
|
@ -44,8 +44,10 @@ def validate_manifest(data, validator, error):
|
||||||
|
|
||||||
if data['virtualization'] == 'pvm' and data['system']['bootloader'] != 'pvgrub':
|
if data['virtualization'] == 'pvm' and data['system']['bootloader'] != 'pvgrub':
|
||||||
error('Paravirtualized AMIs only support pvgrub as a bootloader', ['system', 'bootloader'])
|
error('Paravirtualized AMIs only support pvgrub as a bootloader', ['system', 'bootloader'])
|
||||||
if data['virtualization'] == 'hvm' and data['system']['bootloader'] != 'extlinux':
|
if data['virtualization'] == 'hvm' and data['system']['bootloader'] == 'pvgrub':
|
||||||
error('HVM AMIs only support extlinux as a bootloader', ['system', 'bootloader'])
|
error('HVM AMIs only support extlinux as a bootloader', ['system', 'bootloader'])
|
||||||
|
if data['volume']['partitions']['type'] == 'none' and data['system']['bootloader'] == 'grub':
|
||||||
|
error('Grub cannot boot from unpartitioned disks', ['system', 'bootloader'])
|
||||||
|
|
||||||
|
|
||||||
def resolve_tasks(taskset, manifest):
|
def resolve_tasks(taskset, manifest):
|
||||||
|
|
|
@ -23,6 +23,15 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"system": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"bootloader": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["pvgrub", "extlinux"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"volume": {
|
"volume": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|
Loading…
Add table
Reference in a new issue