question

TimGross-8496 avatar image
0 Votes"
TimGross-8496 asked JennyFeng-MSFT commented

Sysprep.exe /mode:vm Server 2019

After creating a Server 2019 virtual machine in Hyper-V and loading apps, I ran Syspre.exe /generalize /oobe /shutdown /mode:vm and everything appeared to work just fine.

After creating a new virtual machine and configuring it to use that hard drive it booted and again, everyting appeared to be ok.

Then after some looking at things, I noticed that the computer name, WIM-H12FDIOSJHE

was different from the name showing as the device name in Printers and Devices, WIM-HDIUEWIHRRT

I can change the computer name, but it does not change the device name.

If I don't use the mode:vm option with sysprep I don't have this problem. Is this a bug in Sysprep, Server 2019, or Hyper-V?

windows-server-setup
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

After doing more testing, it also does this when I run sysprep without the mode:vm option.

0 Votes 0 ·

@TimGross-8496
Hi,

Just checking in to see if the information provided was helpful.

If the reply helped you, please remember to accept as answer.
If no, please reply and tell us the current situation in order to provide further help.

0 Votes 0 ·
TimGross-8496 avatar image
0 Votes"
TimGross-8496 answered JennyFeng-MSFT commented

So, I have finally figured out what caused the issue I was seeing, but am not sure why yet.

On the Hyper-V Host machine, in the Ethernet Properties for the network adapter, I had the File and Printer Sharing for Microsoft networks disabled. Once I enabled that item and saved changes, the device name on the Hyper-V guest computer updated almost immediately to reflect the name of the computer or hostname.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@TimGross-8496
Hi,

Looks like you have found a solution and thank you for sharing it here.
I'm still researching the cause of this situation.
Please accept your reply as answer. It will be helpful to other members who have same questions posting appropriately.

0 Votes 0 ·
JennyFeng-MSFT avatar image
0 Votes"
JennyFeng-MSFT answered TimGross-8496 commented

@TimGross-8496
Hi,
This is by designed.
Sysprep = Prepare system for imaging and mass deployment. Strip all the umique items from the system and create and/or apply new unique items at the next reboot.

Therefore, it is not possible to retain original computer name which is the name of the device name you mentioned.
That is done as a safety mechanism to ensure that computers with the same name do not join the domain.

Hope above information can help you.

============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for the reply. I agree with your information about how Sysprep works, but the original computer name is not what I am trying to retain.

The problem I am running into is renaming the computer after imaging the computer.

1 Apply Image that had Sysprep run on it.
2 Boot into windows
3 Login and rename computer
4 Restart
5 Computername and Device name are not the same, but they should be.

I have 20+ virtual servers running Windows Server 2016 that I have done the same process on and they all have the same name showing for the Device Name and Computername, it is just with 2019 that I am seeing this issue.

0 Votes 0 ·