📦 Use raw image format for AWS

Although the vhdx format is smaller than raw, AWS often has some issues
booting instances from an imported vhdx snapshot. The raw format seems
to boot consistently at AWS.

Fixes #754.

Signed-off-by: Major Hayden <major@redhat.com>
This commit is contained in:
Major Hayden 2020-07-02 11:48:21 -05:00 committed by Major Hayden
parent dd0fc32b02
commit 0f32f35756
12 changed files with 28 additions and 29 deletions

View file

@ -194,7 +194,7 @@ func New() *Fedora31 {
amiImgType := imageType{
name: "ami",
filename: "image.vhdx",
filename: "image.raw",
mimeType: "application/octet-stream",
packages: []string{
"@Core",
@ -218,7 +218,7 @@ func New() *Fedora31 {
bootable: true,
defaultSize: 6 * GigaByte,
assembler: func(uefi bool, size uint64) *osbuild.Assembler {
return qemuAssembler("vhdx", "image.vhdx", uefi, size)
return qemuAssembler("raw", "image.raw", uefi, size)
},
}

View file

@ -23,7 +23,7 @@ func TestFilenameFromType(t *testing.T) {
{
name: "ami",
args: args{"ami"},
want: "image.vhdx",
want: "image.raw",
want1: "application/octet-stream",
},
{

View file

@ -578,7 +578,7 @@ func New() distro.Distro {
}
amiImgType := imageType{
name: "ami",
filename: "image.vhdx",
filename: "image.raw",
mimeType: "application/octet-stream",
packages: []string{
"@Core",
@ -602,7 +602,7 @@ func New() distro.Distro {
bootable: true,
defaultSize: 6 * GigaByte,
assembler: func(uefi bool, options distro.ImageOptions, arch distro.Arch) *osbuild.Assembler {
return qemuAssembler("vhdx", "image.vhdx", uefi, options)
return qemuAssembler("raw", "image.raw", uefi, options)
},
}

View file

@ -23,7 +23,7 @@ func TestFilenameFromType(t *testing.T) {
{
name: "ami",
args: args{"ami"},
want: "image.vhdx",
want: "image.raw",
want1: "application/octet-stream",
},
{

View file

@ -694,7 +694,7 @@ func New() distro.Distro {
}
amiImgType := imageType{
name: "ami",
filename: "image.vhdx",
filename: "image.raw",
mimeType: "application/octet-stream",
packages: []string{
"checkpolicy",
@ -765,7 +765,7 @@ func New() distro.Distro {
bootable: true,
defaultSize: 6 * GigaByte,
assembler: func(uefi bool, options distro.ImageOptions, arch distro.Arch) *osbuild.Assembler {
return qemuAssembler("vhdx", "image.vhdx", uefi, options, arch)
return qemuAssembler("raw", "image.raw", uefi, options, arch)
},
}

View file

@ -23,7 +23,7 @@ func TestFilenameFromType(t *testing.T) {
{
name: "ami",
args: args{"ami"},
want: "image.vhdx",
want: "image.raw",
want1: "application/octet-stream",
},
{