我正在尝试将 VHD 文件上传到 Azure 存储(经典)。在cmd中,我正在执行这个命令:
C:\WINDOWS\system32>azure vm image create boot2dockerhyperv ` --blob-url https://URL.blob.core.windows.net/vhds/boot2dockerhyperv.vhd ` --os Linux "C:\Users\USERNAME\Desktop\boot2dockerhyperv.vhd"`
我收到以下错误:
info: Executing command vm image create
error: ENOENT: no such file or directory, stat 'C:\WINDOWS\system32\`'
error: Error information has been recorded to C:\Users\USERNAME\.azure\azure.err
这是内容azure.err
2016-11-17T09:25:34.903Z:
{ [Error: ENOENT: no such file or directory, stat 'C:\WINDOWS\system32\`']
errno: -4058,
code: 'ENOENT',
syscall: 'stat',
path: 'C:\\WINDOWS\\system32\\`' }
Error: ENOENT: no such file or directory, stat 'C:\WINDOWS\system32\`'
at Error (native)
at Object.fs.statSync (fs.js:844:18)
at uploadPageBlobFromBlobService (C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\lib\commands\asm\iaas\upload\pageBlob.js:278:17)
at Object.uploadPageBlob (C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\lib\commands\asm\iaas\upload\pageBlob.js:221:3)
at C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\lib\commands\asm\iaas\upload\uploadVMImage.js:83:16
at C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\lib\commands\asm\iaas\upload\uploadVMImage.js:65:5
at callbacks.(anonymous function) (C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\lib\util\callbackAggregator.js:81:30)
at C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\node_modules\azure-asm-storage\lib\storageManagementClient.js:1419:14
at C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\lib\util\logging.js:339:7
at handleRedirect (C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\lib\util\utils.js:564:9)
在 PowerShell 中执行时,我得到一个不同的错误
info: Executing command vm image create
info: VHD size : 20 GB
info: Uploading 59392.5 KB
error: body.outputStream.on is not a function
error: Error information has been recorded to C:\Users\USERNAME\.azure\azure.err
更新:
即使出现错误,该文件似乎也出现在 Azure 门户中,但我吓坏了,因为它显示大小为 19.53GiB