mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00
Add image_location param when registering an S3 backde AMI.
This commit is contained in:
parent
b64ad495ab
commit
c708e5ab42
1 changed files with 2 additions and 0 deletions
|
@ -62,6 +62,7 @@ class UploadImage(Task):
|
|||
s3_url = 'https://s3.cn-north-1.amazonaws.com.cn'
|
||||
else:
|
||||
s3_url = 'https://s3-{region}.amazonaws.com/'.format(region=info.host['region'])
|
||||
info.manifest.manifest_location = info.manifest.image['bucket'] + '/' + info.ami_name + '.manifest.xml'
|
||||
log_check_call(['/usr/bin/euca-upload-bundle',
|
||||
'--bucket', info.manifest.image['bucket'],
|
||||
'--manifest', manifest_file,
|
||||
|
@ -140,6 +141,7 @@ class RegisterAMI(Task):
|
|||
|
||||
if info.manifest.volume['backing'] == 's3':
|
||||
grub_boot_device = 'hd0'
|
||||
registration_params['image_location'] = info.manifest.manifest_location
|
||||
else:
|
||||
root_dev_name = {'pvm': '/dev/sda',
|
||||
'hvm': '/dev/xvda'}.get(info.manifest.data['virtualization'])
|
||||
|
|
Loading…
Add table
Reference in a new issue