jpoon / azure-create-vhd

💾 Docker image to create a blank VHD on Microsoft Azure
https://hub.docker.com/r/jpoon/azure-create-vhd/
MIT License
6 stars 2 forks source link

xfs support #2

Closed rutsky closed 7 years ago

rutsky commented 7 years ago

Fixes #1

In addition to xfs support I bumped alpine base image version in order to fix following error during Docker image building:

Executing busybox-1.24.2-r11.trigger
Executing glib-2.52.0-r0.trigger
Error relocating /usr/lib/libglib-2.0.so.0: pthread_setname_np: symbol not found

and update Azure dependencies in order to fix following error during Docker image building:

OK: 35 MiB in 39 packages
# github.com/Microsoft/azure-vhd-utils-for-go
/go/src/github.com/Microsoft/azure-vhd-utils-for-go/vhdUploadCmdHandler.go:158: cannot use blobServiceClient (type "github.com/Microsoft/azure-vhd-utils-for-go/vendor/github.com/Azure/azure-sdk-for-go/stora
ge".BlobStorageClient) as type "github.com/Microsoft/azure-vhd-utils/vendor/github.com/Azure/azure-sdk-for-go/storage".BlobStorageClient in field value
/go/src/github.com/Microsoft/azure-vhd-utils-for-go/vhdUploadCmdHandler.go:212: cannot use client (type "github.com/Microsoft/azure-vhd-utils-for-go/vendor/github.com/Azure/azure-sdk-for-go/storage".BlobSto
rageClient) as type "github.com/Microsoft/azure-vhd-utils/vendor/github.com/Azure/azure-sdk-for-go/storage".BlobStorageClient in argument to metadata.NewMetadataFromBlob
# github.com/Microsoft/azure-vhd-utils-for-go
/go/src/github.com/Microsoft/azure-vhd-utils-for-go/vhdUploadCmdHandler.go:158: cannot use blobServiceClient (type "github.com/Microsoft/azure-vhd-utils-for-go/vendor/github.com/Azure/azure-sdk-for-go/stora
ge".BlobStorageClient) as type "github.com/Microsoft/azure-vhd-utils/vendor/github.com/Azure/azure-sdk-for-go/storage".BlobStorageClient in field value
/go/src/github.com/Microsoft/azure-vhd-utils-for-go/vhdUploadCmdHandler.go:212: cannot use client (type "github.com/Microsoft/azure-vhd-utils-for-go/vendor/github.com/Azure/azure-sdk-for-go/storage".BlobSto
rageClient) as type "github.com/Microsoft/azure-vhd-utils/vendor/github.com/Azure/azure-sdk-for-go/storage".BlobStorageClient in argument to metadata.NewMetadataFromBlob
The command '/bin/sh -c /src/docker-build.sh' returned a non-zero code: 2

Looks like MS splitted/renamed/moved depended packages and utilities.

rutsky commented 7 years ago

I tested those changes with creating and uploading 512 GiB VHD to Premium Storage Account: it took about 27 minutes (most of the time took "Uploading" step):

--- Create raw disk ---
Formatting 'image.raw', fmt=raw size=549755813888

--- Format disk ---
meta-data=./image.raw            isize=512    agcount=4, agsize=33554432 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=0
data     =                       bsize=4096   blocks=134217728, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal log           bsize=4096   blocks=65536, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

--- Convert to vhd ---

--- Upload ---
Computing MD5 Checksum..
 Completed:  99% RemainingTime: 00h:00m:00s Throughput: 4153 MB/sec
Detecting empty ranges..
 Empty ranges : 262140/262145
Effective upload size: 8.00 MB (from 524288.00 MB originally)
Uploading the VHD..
 Completed: 100% [      8.00 MB] RemainingTime: 00h:00m:00s Throughput: 0 Mb/sec     
Upload completed
rutsky commented 7 years ago

I pushed prebuilt version to rutsky/azure-create-vhd if anyone wants to test it before merging.

jpoon commented 7 years ago

oooh, thanks for the PR @rutsky. I'll take a look over the weekend :)

jpoon commented 7 years ago

and... with updated image: https://hub.docker.com/r/jpoon/azure-create-vhd/