mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00
GCE: Rename image in tar file to disk.raw
To register with GCE, the image must be named disk.raw, or else the gcloud create images command fails.
This commit is contained in:
parent
4b34cb2615
commit
be595efd99
1 changed files with 4 additions and 1 deletions
|
@ -30,8 +30,11 @@ class CreateTarball(Task):
|
|||
tarball_path = os.path.join(info.manifest.bootstrapper['workspace'], tarball_name)
|
||||
info._gce['tarball_name'] = tarball_name
|
||||
info._gce['tarball_path'] = tarball_path
|
||||
# GCE requires that the file in the tar be named disk.raw, hence the transform
|
||||
log_check_call(['tar', '--sparse', '-C', info.manifest.bootstrapper['workspace'],
|
||||
'-caf', tarball_path, filename])
|
||||
'-caf', tarball_path,
|
||||
'--transform=s|.*|disk.raw|',
|
||||
filename])
|
||||
|
||||
|
||||
class UploadImage(Task):
|
||||
|
|
Loading…
Add table
Reference in a new issue