2016-07-10 5 views
0

vhdファイルからイメージを作成し、そのイメージファイルを使用してVMを作成する例があります。私はアームモードを使用しており、アップロードされたvhdを画像として一覧表示したいと考えています。基本的には、次の記事https://azure.microsoft.com/en-in/documentation/articles/virtual-machines-windows-classic-createupload-vhd/でazure cli/java sdkを使用して、手順5を実行します。私はこれを行う例を見ていない。 'azure vm image create'というcliコマンドがありますが、Azure-Cliバージョン0.10.1では非推奨ですか?私はMac用のazure-cliのコンパイル済みのバージョンをインストールしました。azure cliを使用してカスタムvhdからイメージを作成する

答えて

0

知られているように、azure-cliバージョン0.10.1のコマンドazure vm image createをサポートしていないという証拠はありません。そして、npm update -g azure-cliコマンドでAzure-Cliバージョンを0.10.2にアップグレードすることができます。

articleのステップ5を行うために、あなたは記事ASMモードでコマンドazure vm image createを使用する「アズールCLIは、Azureのサービス管理(ASM)モードでコマンド」のセクションCommands to manage your Azure virtual machine imagesを参照しようとすることができ、参照してください。以下の手順を実行します。

# Sets the cli wording mode with asm 
$ azure config mode asm 
# See the help manual for the command `vm image create` 
$ azure vm image creaet -h 
help: Upload and register a VM image 
help:  
help: Usage: vm image create [options] <name> [source-path] 
help:  
help: Options: 
help:  -h, --help     output usage information 
help:  -v, --verbose    use verbose output 
help:  -vv       more verbose with debug output 
help:  --json      use json output 
help:  -u, --blob-url <url>   the target image blob url 
help:  -l, --location <name>  the location 
help:  -a, --affinity-group <name> the affinity group 
help:  -o, --os <type>    the operating system [linux|windows] 
help:  -p, --parallel <number>  the maximum number of parallel uploads [96] 
help:  -m, --md5-skip    skip MD5 hash computation 
help:  -f, --force-overwrite  Force overwrite of prior uploads 
help:  -e, --label <about>   the image label 
help:  -d, --description <about> the image description 
help:  -b, --base-vhd <blob>  the base vhd blob url 
help:  -k, --source-key <key>  the source storage key if source-path 
help:        is a Microsoft Azure private blob url 
help:  -s, --subscription <id>  the subscription id 
help:  
help: Current Mode: asm (Azure Service Management) 
# Does the step 5 like Azure-AddVMImage 
$ azure vm image create <ImageName> -b <vhd-blob-url> -o <ostype: linux|windows> 

はその間、私はあなたがGitHubの上the template samplearticleを参照することができ、カスタムイメージから仮想マシンを作成するための簡単な方法は、テンプレートからARMとAzureのCLIを使用していると思います。

+0

ありがとうございました。私はARMモードで作業しており、リソースグループの1つに自分のBLOB BLOBをアップロードしました。今私はちょうどこのvhdファイルからイメージを作成する必要があります。プレビュー・ポータルからもこれを行うオプションはないようです。テンプレートを使用せずにこれを行う方法はありませんか? –

+0

ARMはあらゆる場所で使用することが推奨されているので、私はリソースグループを使用してカスタムイメージを作成する方法を探したかったのです。非ウィンドウのプラットフォームでは、blobのURLを指定すると、ユーザーイメージを作成するためのドキュメントはほとんどないようです。 –

関連する問題