Unable to attach a new Network Interface in a "newly created" Virtual Network to a Windows VM

Operations 21 Reputation points
2025-02-08T16:30:19.9866667+00:00

I have a VM that has a virtual network and an interface attached. I am aware you cannot detach an interface without attaching a new interface to the VM.

However, when I try to attach a new interface, it makes me create a new one (doesn't use the one I have already created with a new virtual network & interface). I can deal with it but when I create a new interface, the Virtual Network option is grayed out (see attached screenshot Azure.JPG) and doesn't allow me to pick a existing virtual network or even create a new virtual network. Is this by design?

What are my other options? May be keeping the disk and creating a new interface? If this is what it takes, then I would like to leave the existing users as id and their profiles and data in the existing VM. Please help.

Azure VMware Solution
Azure VMware Solution
An Azure service that runs native VMware workloads on Azure.
379 questions
0 comments No comments
{count} votes

Accepted answer
  1. Suwarna S Kale 786 Reputation points
    2025-02-09T21:47:12.2566667+00:00

    Hello,

    Thanks for posting your question in the Microsoft Q&A forum.

    If your goal is to move the VM to a new VNet while preserving user profiles and data,creating a new VM with the existing disk is the most straightforward approach. This ensures that the VM is correctly configured in the new VNet without losing any data or configurations.

    However from your latest comment I understood the error message indicates that your VM is in a generalized state, which means it has been sysprepped (generalized) to remove machine-specific information (e.g., user profiles, SIDs, etc.). This is typically done when creating a VM image for reuse. Unfortunately, this process is irreversible, and the VM can no longer be started in its original state.

    However, there is still hope for recovering your data. 🤗 Yes, you can recover data from the OS disk and data disks attached to the VM, below are the steps:

    1. Identify the Disks

    • Go to the Azure portal and navigate to the VM's resource group.
    • Locate the OS disk and any data disks associated with the VM. These disks are still intact and contain your data.

    2. Create a New VM and Attach the Disks

    • Create a new VM in the same region as the disks.
    • During the creation process, attach the existing OS disk and data disks to the new VM.
      • OS Disk: Attach it as the OS disk for the new VM.
        • Data Disks: Attach them as additional data disks.

    3. Access the Data

    • Start the new VM and log in.
    • Navigate to the attached disks to recover your data:
      • OS Disk: Check the C:\Users folder for user profiles and data.
        • Data Disks: Access the drives to retrieve any stored files.

    4. Export Data (Optional)

    • If you don't want to keep the new VM, you can export the data to another location (e.g., Azure Storage, another VM, or on-premises) and then delete the VM.

    Does the response help answer your question? Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution. Thanks 🙂 Thanks for posting your question in the Microsoft Q&A forum.

    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Marcin Policht 36,435 Reputation points MVP
    2025-02-08T19:06:47.9666667+00:00

    Follow https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-network-interface-vm


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    0 comments No comments

  2. Operations 21 Reputation points
    2025-02-09T16:34:47.39+00:00

    Thank you so much. When I try to follow the instructions in the linked page, I get the message that VM is in generalized state. I hope I didn't lose the users & data.

    (OperationNotAllowed) Operation 'Update VM' is not allowed on VM 'Operations-VM' since the VM is generalized.

    Code: OperationNotAllowed

    Message: Operation 'Update VM' is not allowed on VM 'my-VM' since the VM is generalized. Is it irreversible? Would I have other users & data? I think I know where I messed it up. I was moving the VM and other things to a different resource group and I thought it would be wise (aghh...) to create an image which probably run the sysprep command. I do see a drive there. Any change I could recover some data?

    0 comments No comments

  3. Operations 21 Reputation points
    2025-02-09T17:02:20.1033333+00:00

    What I have read so far, seems like this is irreversible? Can I recover the user data? I thjink I know where I messed it up. I was moving resources to a new Resource group and thought it would be wise (aghh...) to create an image from the existing VM just in case. That may have run the sysprep command. Is there any way I can get to the data on the drive? I see that but no snapshot or backup at this time. There was one created but idiot me, I was trying to clean up the resources.... Can I restore a snapshot or backup?


  4. Operations 21 Reputation points
    2025-02-10T18:29:41.36+00:00

    Thank you for your response. There is one issue here. My OS and Data disk are the same. I kept all the data inside the user profile data. Would the existing disk still have the user data?


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.