Quantcast
Channel: Azure Virtual Machines forum
Viewing all articles
Browse latest Browse all 12545

How to attach DataDisk to existing image via PowerShell

$
0
0

Hi,

Is there any possibility to Add exisitng VHD (data disk) to existing Image in PowerShell?

I'm creating Image with MediaLocation pointing to my OS system but I have also DataDisk that want to attach. I do not see such a possibility.

The only way I see now is to create VM form that image -> attach disk -> create image again.... is there any shortcut for this?

For creating image I use:

Add-AzureVMImage -ImageName "DevCopyTest" -MediaLocation [OUR URL TO VHD] -Label "DevCopyTest" -OS "Windows" -Verbose;

Viewing all articles
Browse latest Browse all 12545

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>