How to rename the multiply VM hostname in azurehow can I deploy multiple instances of VM from custom image...











up vote
0
down vote

favorite












I want to create 70 VM's of the same OS in Azure. For this, I have created a VM converted to a custom image of it so that I can deploy 70 instances of this machine.



The issue here for me is if I deploy 70 instances of VM via custom images I am getting the hostname of all the VM's as same. All 70 VM's hostname is WIN2K12.



Is there any way where I can change this hostname while deploying?










share|improve this question
























  • What command are you using to create the VM? Are you using CLI?
    – sidprasher
    Nov 9 at 11:30






  • 2




    You can try to create the VM through Azure template and with a VM extension to change the hostname using a custom shell script.
    – Charles Xu
    Nov 9 at 13:07










  • PowerShell Script
    – Rthomas529
    Nov 9 at 15:16










  • How you created your custom image ? Normally, if you follow procedures, sysprep should remove network configuration from image during Generalize phase docs.microsoft.com/en-us/azure/virtual-machines/windows/…, and you should have hostname equal to Azure VM name
    – Ivan Ignatiev - MSFT
    Nov 9 at 16:26










  • I have used a Create custom Image option and selected No on the Sysprep option for the VM. Based on this custom image created I am deploying multiple machines which is of same hostname as of now
    – san
    Nov 11 at 2:11

















up vote
0
down vote

favorite












I want to create 70 VM's of the same OS in Azure. For this, I have created a VM converted to a custom image of it so that I can deploy 70 instances of this machine.



The issue here for me is if I deploy 70 instances of VM via custom images I am getting the hostname of all the VM's as same. All 70 VM's hostname is WIN2K12.



Is there any way where I can change this hostname while deploying?










share|improve this question
























  • What command are you using to create the VM? Are you using CLI?
    – sidprasher
    Nov 9 at 11:30






  • 2




    You can try to create the VM through Azure template and with a VM extension to change the hostname using a custom shell script.
    – Charles Xu
    Nov 9 at 13:07










  • PowerShell Script
    – Rthomas529
    Nov 9 at 15:16










  • How you created your custom image ? Normally, if you follow procedures, sysprep should remove network configuration from image during Generalize phase docs.microsoft.com/en-us/azure/virtual-machines/windows/…, and you should have hostname equal to Azure VM name
    – Ivan Ignatiev - MSFT
    Nov 9 at 16:26










  • I have used a Create custom Image option and selected No on the Sysprep option for the VM. Based on this custom image created I am deploying multiple machines which is of same hostname as of now
    – san
    Nov 11 at 2:11















up vote
0
down vote

favorite









up vote
0
down vote

favorite











I want to create 70 VM's of the same OS in Azure. For this, I have created a VM converted to a custom image of it so that I can deploy 70 instances of this machine.



The issue here for me is if I deploy 70 instances of VM via custom images I am getting the hostname of all the VM's as same. All 70 VM's hostname is WIN2K12.



Is there any way where I can change this hostname while deploying?










share|improve this question















I want to create 70 VM's of the same OS in Azure. For this, I have created a VM converted to a custom image of it so that I can deploy 70 instances of this machine.



The issue here for me is if I deploy 70 instances of VM via custom images I am getting the hostname of all the VM's as same. All 70 VM's hostname is WIN2K12.



Is there any way where I can change this hostname while deploying?







azure azure-devops azure-active-directory azure-web-sites azure-storage






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 9 at 13:15









Billal Begueradj

5,541132637




5,541132637










asked Nov 9 at 11:11









san

165




165












  • What command are you using to create the VM? Are you using CLI?
    – sidprasher
    Nov 9 at 11:30






  • 2




    You can try to create the VM through Azure template and with a VM extension to change the hostname using a custom shell script.
    – Charles Xu
    Nov 9 at 13:07










  • PowerShell Script
    – Rthomas529
    Nov 9 at 15:16










  • How you created your custom image ? Normally, if you follow procedures, sysprep should remove network configuration from image during Generalize phase docs.microsoft.com/en-us/azure/virtual-machines/windows/…, and you should have hostname equal to Azure VM name
    – Ivan Ignatiev - MSFT
    Nov 9 at 16:26










  • I have used a Create custom Image option and selected No on the Sysprep option for the VM. Based on this custom image created I am deploying multiple machines which is of same hostname as of now
    – san
    Nov 11 at 2:11




















  • What command are you using to create the VM? Are you using CLI?
    – sidprasher
    Nov 9 at 11:30






  • 2




    You can try to create the VM through Azure template and with a VM extension to change the hostname using a custom shell script.
    – Charles Xu
    Nov 9 at 13:07










  • PowerShell Script
    – Rthomas529
    Nov 9 at 15:16










  • How you created your custom image ? Normally, if you follow procedures, sysprep should remove network configuration from image during Generalize phase docs.microsoft.com/en-us/azure/virtual-machines/windows/…, and you should have hostname equal to Azure VM name
    – Ivan Ignatiev - MSFT
    Nov 9 at 16:26










  • I have used a Create custom Image option and selected No on the Sysprep option for the VM. Based on this custom image created I am deploying multiple machines which is of same hostname as of now
    – san
    Nov 11 at 2:11


















What command are you using to create the VM? Are you using CLI?
– sidprasher
Nov 9 at 11:30




What command are you using to create the VM? Are you using CLI?
– sidprasher
Nov 9 at 11:30




2




2




You can try to create the VM through Azure template and with a VM extension to change the hostname using a custom shell script.
– Charles Xu
Nov 9 at 13:07




You can try to create the VM through Azure template and with a VM extension to change the hostname using a custom shell script.
– Charles Xu
Nov 9 at 13:07












PowerShell Script
– Rthomas529
Nov 9 at 15:16




PowerShell Script
– Rthomas529
Nov 9 at 15:16












How you created your custom image ? Normally, if you follow procedures, sysprep should remove network configuration from image during Generalize phase docs.microsoft.com/en-us/azure/virtual-machines/windows/…, and you should have hostname equal to Azure VM name
– Ivan Ignatiev - MSFT
Nov 9 at 16:26




How you created your custom image ? Normally, if you follow procedures, sysprep should remove network configuration from image during Generalize phase docs.microsoft.com/en-us/azure/virtual-machines/windows/…, and you should have hostname equal to Azure VM name
– Ivan Ignatiev - MSFT
Nov 9 at 16:26












I have used a Create custom Image option and selected No on the Sysprep option for the VM. Based on this custom image created I am deploying multiple machines which is of same hostname as of now
– san
Nov 11 at 2:11






I have used a Create custom Image option and selected No on the Sysprep option for the VM. Based on this custom image created I am deploying multiple machines which is of same hostname as of now
– san
Nov 11 at 2:11














1 Answer
1






active

oldest

votes

















up vote
0
down vote













Point of clarification.



If you create VM from a Image they will not/should not have the same Hostname. Part of process of making an Azure Custom Image is to sysprep machine which guarantees the hostname will be different when you deploy new VM using that image.



https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource



In Azure the only time VM will get the same host name is if you create VM from a specialized disk, meaning create VM from a copy of the same disk (not really image).



The thing you have to confirm is if your applications on the VM allows sysprep.






share|improve this answer





















  • I have used a Create custom Image option and selected No on the Sysprep option for the VM. Based on this custom image created I am deploying multiple machines which is of same hostname as of now. Do you suggest to run Sysprep while creating custom image? will that work for me?
    – san
    Nov 11 at 2:17











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53224616%2fhow-to-rename-the-multiply-vm-hostname-in-azure-how-can-i-deploy-multiple-instan%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













Point of clarification.



If you create VM from a Image they will not/should not have the same Hostname. Part of process of making an Azure Custom Image is to sysprep machine which guarantees the hostname will be different when you deploy new VM using that image.



https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource



In Azure the only time VM will get the same host name is if you create VM from a specialized disk, meaning create VM from a copy of the same disk (not really image).



The thing you have to confirm is if your applications on the VM allows sysprep.






share|improve this answer





















  • I have used a Create custom Image option and selected No on the Sysprep option for the VM. Based on this custom image created I am deploying multiple machines which is of same hostname as of now. Do you suggest to run Sysprep while creating custom image? will that work for me?
    – san
    Nov 11 at 2:17















up vote
0
down vote













Point of clarification.



If you create VM from a Image they will not/should not have the same Hostname. Part of process of making an Azure Custom Image is to sysprep machine which guarantees the hostname will be different when you deploy new VM using that image.



https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource



In Azure the only time VM will get the same host name is if you create VM from a specialized disk, meaning create VM from a copy of the same disk (not really image).



The thing you have to confirm is if your applications on the VM allows sysprep.






share|improve this answer





















  • I have used a Create custom Image option and selected No on the Sysprep option for the VM. Based on this custom image created I am deploying multiple machines which is of same hostname as of now. Do you suggest to run Sysprep while creating custom image? will that work for me?
    – san
    Nov 11 at 2:17













up vote
0
down vote










up vote
0
down vote









Point of clarification.



If you create VM from a Image they will not/should not have the same Hostname. Part of process of making an Azure Custom Image is to sysprep machine which guarantees the hostname will be different when you deploy new VM using that image.



https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource



In Azure the only time VM will get the same host name is if you create VM from a specialized disk, meaning create VM from a copy of the same disk (not really image).



The thing you have to confirm is if your applications on the VM allows sysprep.






share|improve this answer












Point of clarification.



If you create VM from a Image they will not/should not have the same Hostname. Part of process of making an Azure Custom Image is to sysprep machine which guarantees the hostname will be different when you deploy new VM using that image.



https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource



In Azure the only time VM will get the same host name is if you create VM from a specialized disk, meaning create VM from a copy of the same disk (not really image).



The thing you have to confirm is if your applications on the VM allows sysprep.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 9 at 18:00









Hannel

39618




39618












  • I have used a Create custom Image option and selected No on the Sysprep option for the VM. Based on this custom image created I am deploying multiple machines which is of same hostname as of now. Do you suggest to run Sysprep while creating custom image? will that work for me?
    – san
    Nov 11 at 2:17


















  • I have used a Create custom Image option and selected No on the Sysprep option for the VM. Based on this custom image created I am deploying multiple machines which is of same hostname as of now. Do you suggest to run Sysprep while creating custom image? will that work for me?
    – san
    Nov 11 at 2:17
















I have used a Create custom Image option and selected No on the Sysprep option for the VM. Based on this custom image created I am deploying multiple machines which is of same hostname as of now. Do you suggest to run Sysprep while creating custom image? will that work for me?
– san
Nov 11 at 2:17




I have used a Create custom Image option and selected No on the Sysprep option for the VM. Based on this custom image created I am deploying multiple machines which is of same hostname as of now. Do you suggest to run Sysprep while creating custom image? will that work for me?
– san
Nov 11 at 2:17


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53224616%2fhow-to-rename-the-multiply-vm-hostname-in-azure-how-can-i-deploy-multiple-instan%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Guess what letter conforming each word

Port of Spain

Run scheduled task as local user group (not BUILTIN)