Vhd Virtual Machine

Vhd Virtual Machine Average ratng: 8,4/10 908 reviews

I had an instance a few months ago where I had to do a recovery from a VHD image of a SQL server data drive. I simply attached the VHD file to an already live virtual machine and was able to restore from it. This is not the best method by any shot and your best bet to use your backup software for BM recoveries. When you create a new virtual machine in HYPER-V you must create and new virtual hard disk (vhd,vhdx). There are times that you want to attach an existing vhd,vhdx in a new virtual machines or an already created for different reasons. Disk2vhd is a utility that creates VHD (Virtual Hard Disk - Microsoft's Virtual Machine disk format) versions of physical disks for use in Microsoft Virtual PC or Microsoft Hyper-V virtual machines (VMs). Import Virtual Machine into Hyper-V. The next step is to see if it works. Launch Hyper-V in Windows 10, click New Virtual Machine then click Next.Go through the wizard and configure your virtual.

  1. Vhd To Vmware Virtual Machine
  2. Virtual Machine Vhd Windows 7
  3. Create A Vhd Backup
  4. Windows Xp Vhd Virtual Machine
  5. Shared Vhdx Between Virtual Machines

If you're running Windows 10 Pro or Enterprise 64-bit edition, here we take a look at setting up a Virtual Machine using the built in Hyper-V technology. To specify the VHD, click the yellow folder icon to launch the Virtual Media Manger. Click Next and then Finish having reviewed the summary. In the VirtualBox main window, click Start. The virtual machine appears in a window on your host. If the virtual machine cannot boot, then using VirtualBox you can adjust hardware environment options. I have Installed Windows 7 in VHD from my Windows 200 Server R2 and booting this machine natively. Is it possible to use this VHD Windows 7 installed inside in Hyper-V virtual machine?

-->

Before you upload a Windows virtual machine (VM) from on-premises to Azure, you must prepare the virtual hard disk (VHD or VHDX). Azure supports both generation 1 and generation 2 VMs that are in VHD file format and that have a fixed-size disk. The maximum size allowed for the VHD is 1,023 GB.

In a generation 1 VM, you can convert a VHDX file system to VHD. You can also convert a dynamically expanding disk to a fixed-size disk. But you can't change a VM's generation. For more information, see Should I create a generation 1 or 2 VM in Hyper-V? and Azure support for generation 2 VMs (preview).

For information about the support policy for Azure VMs, see Microsoft server software support for Azure VMs.

Note

The instructions in this article apply to:

  1. The 64-bit version of Windows Server 2008 R2 and later Windows Server operating systems. For information about running a 32-bit operating system in Azure, see Support for 32-bit operating systems in Azure VMs.
  2. If any Disaster Recovery tool will be used to migrate the workload, like Azure Site Recovery or Azure Migrate, this process is still required to be done and followed on the Guest OS to prepare the image prior the migration.

Convert the virtual disk to a fixed size and to VHD

If you need to convert your virtual disk to the required format for Azure, use one of the methods in this section:

  1. Back up the VM before you run the virtual disk conversion process.

  2. Make sure that the Windows VHD works correctly on the local server. Resolve any errors within the VM itself before you try to convert or upload it to Azure.

  3. Regarding the size of the VHD:

    1. All VHDs on Azure must have a virtual size aligned to 1MB. When converting from a raw disk to VHD you must ensure that the raw disk size is a multiple of 1 MB before conversion. Fractions of a megabyte will cause errors when creating images from the uploaded VHD.

    2. The maximum size allowed for the OS VHD is 2TB.

After you convert the disk, create a VM that uses the disk. Start and sign in to the VM to finish preparing it for uploading.

Windows

Use Hyper-V Manager to convert the disk

  1. Open Hyper-V Manager and select your local computer on the left. In the menu above the computer list, select Action > Edit Disk.
  2. On the Locate Virtual Hard Disk page, select your virtual disk.
  3. On the Choose Action page, select Convert > Next.
  4. If you need to convert from VHDX, select VHD > Next.
  5. If you need to convert from a dynamically expanding disk, select Fixed size > Next.
  6. Locate and select a path to save the new VHD file to.
  7. Select Finish.

Vhd To Vmware Virtual Machine

Note

If physical media is available, just create the bootable flash drive, and copy the files. Download bootrec for windows 7.

Use an elevated PowerShell session to run the commands in this article.

Use PowerShell to convert the disk

You can convert a virtual disk by using the Convert-VHD command in Windows PowerShell. Select Run as administrator when you start PowerShell.

The following example command converts the disk from VHDX to VHD. The command also converts the disk from a dynamically expanding disk to a fixed-size disk.

In this command, replace the value for -Path with the path to the virtual hard disk that you want to convert. Replace the value for -DestinationPath with the new path and name of the converted disk.

Convert from VMware VMDK disk format

If you have a Windows VM image in the VMDK file format, use the Microsoft Virtual Machine Converter to convert it to VHD format. For more information, see How to convert a VMware VMDK to Hyper-V VHD.

Set Windows configurations for Azure

On the VM that you plan to upload to Azure, run the following commands from an elevated command prompt window:

  1. Remove any static persistent route on the routing table:

    • To view the route table, run route print at the command prompt.
    • Check the Persistence Routes sections. If there's a persistent route, use the route delete command to remove it.
  2. Remove the WinHTTP proxy:

    If the VM needs to work with a specific proxy, add a proxy exception to the Azure IP address (168.63.129.16) so the VM can connect to Azure:

  3. Set the disk SAN policy to Onlineall:

    In the open command prompt window, type the following commands:

  4. Set Coordinated Universal Time (UTC) time for Windows. Also set the startup type of the Windows time service (w32time) to Automatic:

  5. Set the power profile to high performance:

  6. Make sure the environmental variables TEMP and TMP are set to their default values:

Check the Windows services

Make sure that each of the following Windows services is set to the Windows default values. These services are the minimum that must be set up to ensure VM connectivity. To reset the startup settings, run the following commands:

Update remote-desktop registry settings

Make sure the following settings are configured correctly for remote access:

Note

You might receive an error message when you run Set-ItemProperty -Path 'HKLM:SOFTWAREPoliciesMicrosoftWindows NTTerminal Services -name <object name> -value <value>. You can safely ignore this message. It means only that the domain isn't pushing that configuration through a Group Policy Object.

  1. Remote Desktop Protocol (RDP) is enabled:

  2. The RDP port is set up correctly. The default port is 3389:

    When you deploy a VM, the default rules are created against port 3389. If you want to change the port number, do that after the VM is deployed in Azure.

  3. The listener is listening in every network interface:

  4. Configure the network-level authentication (NLA) mode for the RDP connections:

  5. Set the keep-alive value:

  6. Reconnect:

  7. Limit the number of concurrent connections:

  8. Remove any self-signed certificates tied to the RDP listener:

    This code ensures that you can connect at the beginning when you deploy the VM. If you need to review this later, you can do so after the VM is deployed in Azure.

  9. If the VM will be part of a domain, check the following policies to make sure the former settings aren't reverted.

    GoalPolicyValue
    RDP is enabledComputer ConfigurationPoliciesWindows SettingsAdministrative TemplatesComponentsRemote Desktop ServicesRemote Desktop Session HostConnectionsAllow users to connect remotely by using Remote Desktop
    NLA group policySettingsAdministrative TemplatesComponentsRemote Desktop ServicesRemote Desktop Session HostSecurityRequire user authentication for remote access by using NLA
    Keep-alive settingsComputer ConfigurationPoliciesWindows SettingsAdministrative TemplatesWindows ComponentsRemote Desktop ServicesRemote Desktop Session HostConnectionsConfigure keep-alive connection interval
    Reconnect settingsComputer ConfigurationPoliciesWindows SettingsAdministrative TemplatesWindows ComponentsRemote Desktop ServicesRemote Desktop Session HostConnectionsReconnect automatically
    Limited number of connection settingsComputer ConfigurationPoliciesWindows SettingsAdministrative TemplatesWindows ComponentsRemote Desktop ServicesRemote Desktop Session HostConnectionsLimit number of connections

Configure Windows Firewall rules

  1. Turn on Windows Firewall on the three profiles (domain, standard, and public):

  2. Run the following command in PowerShell to allow WinRM through the three firewall profiles (domain, private, and public), and enable the PowerShell remote service:

  3. Enable the following firewall rules to allow the RDP traffic:

  4. Enable the rule for file and printer sharing so the VM can respond to a ping command inside the virtual network:

  5. If the VM will be part of a domain, check the following Azure AD policies to make sure the former settings aren't reverted.

    GoalPolicyValue
    Enable the Windows Firewall profilesComputer ConfigurationPoliciesWindows SettingsAdministrative TemplatesNetworkNetwork ConnectionWindows FirewallDomain ProfileWindows FirewallProtect all network connections
    Enable RDPComputer ConfigurationPoliciesWindows SettingsAdministrative TemplatesNetworkNetwork ConnectionWindows FirewallDomain ProfileWindows FirewallAllow inbound Remote Desktop exceptions
    Computer ConfigurationPoliciesWindows SettingsAdministrative TemplatesNetworkNetwork ConnectionWindows FirewallStandard ProfileWindows FirewallAllow inbound Remote Desktop exceptions
    Enable ICMP-V4Computer ConfigurationPoliciesWindows SettingsAdministrative TemplatesNetworkNetwork ConnectionWindows FirewallDomain ProfileWindows FirewallAllow ICMP exceptions
    Computer ConfigurationPoliciesWindows SettingsAdministrative TemplatesNetworkNetwork ConnectionWindows FirewallStandard ProfileWindows FirewallAllow ICMP exceptions

Verify the VM

Make sure the VM is healthy, secure, and RDP accessible:

  1. To make sure the disk is healthy and consistent, check the disk at the next VM restart:

    Make sure the report shows a clean and healthy disk.

  2. Set the Boot Configuration Data (BCD) settings.

    Note

    Use an elevated PowerShell window to run these commands.

  3. The dump log can be helpful in troubleshooting Windows crash issues. Enable the dump log collection:

  4. Verify that the Windows Management Instrumentation (WMI) repository is consistent:

    If the repository is corrupted, see WMI: Repository corruption or not.

  5. Make sure no other application is using port 3389. This port is used for the RDP service in Azure. To see which ports are used on the VM, run netstat -anob:

  6. To upload a Windows VHD that's a domain controller:

    • Follow these extra steps to prepare the disk.

    • Make sure you know the Directory Services Restore Mode (DSRM) password in case you have to start the VM in DSRM at some point. For more information, see Set a DSRM password.

  7. Make sure you know the built-in administrator account and password. You might want to reset the current local administrator password and make sure you can use this account to sign in to Windows through the RDP connection. This access permission is controlled by the 'Allow log on through Remote Desktop Services' Group Policy Object. View this object in the Local Group Policy Editor here:

    Computer ConfigurationWindows SettingsSecurity SettingsLocal PoliciesUser Rights Assignment

  8. Check the following Azure AD policies to make sure you're not blocking your RDP access through RDP or from the network:

    • Computer ConfigurationWindows SettingsSecurity SettingsLocal PoliciesUser Rights AssignmentDeny access to this computer from the network

    • Computer ConfigurationWindows SettingsSecurity SettingsLocal PoliciesUser Rights AssignmentDeny log on through Remote Desktop Services

  9. Check the following Azure AD policy to make sure you're not removing any of the required access accounts:

    • Computer ConfigurationWindows SettingsSecurity SettingsLocal PoliciesUser Rights AssignmentAccess this computer from the network

    The policy should list the following groups:

    • Administrators

    • Backup Operators

    • Everyone

    • Users

  10. Restart the VM to make sure that Windows is still healthy and can be reached through the RDP connection. At this point, you might want to create a VM in your local Hyper-V to make sure the VM starts completely. Then test to make sure you can reach the VM through RDP.

  11. Remove any extra Transport Driver Interface (TDI) filters. For example, remove software that analyzes TCP packets or extra firewalls. If you need to review this later, you can do so after the VM is deployed in Azure.

  12. Flash player free download windows 7. Uninstall any other third-party software or driver that's related to physical components or any other virtualization technology.

Install Windows updates

Ideally, you should keep the machine updated at the patch level. If this isn't possible, make sure the following updates are installed:

ComponentBinaryWindows 7 SP1, Windows Server 2008 R2 SP1Windows 8, Windows Server 2012Windows 8.1, Windows Server 2012 R2Windows 10 v1607, Windows Server 2016 v1607Windows 10 v1703Windows 10 v1709, Windows Server 2016 v1709Windows 10 v1803, Windows Server 2016 v1803
Storagedisk.sys6.1.7601.23403 - KB31255746.2.9200.17638 / 6.2.9200.21757 - KB31370616.3.9600.18203 - KB3137061----
storport.sys6.1.7601.23403 - KB31255746.2.9200.17188 / 6.2.9200.21306 - KB30184896.3.9600.18573 - KB402272610.0.14393.1358 - KB402271510.0.15063.332--
ntfs.sys6.1.7601.23403 - KB31255746.2.9200.17623 / 6.2.9200.21743 - KB31212556.3.9600.18654 - KB402272610.0.14393.1198 - KB402271510.0.15063.447--
Iologmsg.dll6.1.7601.23403 - KB31255746.2.9200.16384 - KB2995387-----
Classpnp.sys6.1.7601.23403 - KB31255746.2.9200.17061 / 6.2.9200.21180 - KB29953876.3.9600.18334 - KB317261410.0.14393.953 - KB4022715---
Volsnap.sys6.1.7601.23403 - KB31255746.2.9200.17047 / 6.2.9200.21165 - KB29753316.3.9600.18265 - KB3145384-10.0.15063.0--
partmgr.sys6.1.7601.23403 - KB31255746.2.9200.16681 - KB28771146.3.9600.17401 - KB300085010.0.14393.953 - KB402271510.0.15063.0--
volmgr.sys10.0.15063.0--
Volmgrx.sys6.1.7601.23403 - KB3125574---10.0.15063.0--
Msiscsi.sys6.1.7601.23403 - KB31255746.2.9200.21006 - KB29551636.3.9600.18624 - KB402272610.0.14393.1066 - KB402271510.0.15063.447--
Msdsm.sys6.1.7601.23403 - KB31255746.2.9200.21474 - KB30461016.3.9600.18592 - KB4022726----
Mpio.sys6.1.7601.23403 - KB31255746.2.9200.21190 - KB30461016.3.9600.18616 - KB402272610.0.14393.1198 - KB4022715---
vmstorfl.sys6.3.9600.18907 - KB40726506.3.9600.18080 - KB30631096.3.9600.18907 - KB407265010.0.14393.2007 - KB434541810.0.15063.850 - KB434541910.0.16299.371 - KB4345420-
Fveapi.dll6.1.7601.23311 - KB31255746.2.9200.20930 - KB29302446.3.9600.18294 - KB317261410.0.14393.576 - KB4022715---
Fveapibase.dll6.1.7601.23403 - KB31255746.2.9200.20930 - KB29302446.3.9600.17415 - KB317261410.0.14393.206 - KB4022715---
Networknetvsc.sys---10.0.14393.1198 - KB402271510.0.15063.250 - KB4020001--
mrxsmb10.sys6.1.7601.23816 - KB40227226.2.9200.22108 - KB40227246.3.9600.18603 - KB402272610.0.14393.479 - KB402271510.0.15063.483--
mrxsmb20.sys6.1.7601.23816 - KB40227226.2.9200.21548 - KB40227246.3.9600.18586 - KB402272610.0.14393.953 - KB402271510.0.15063.483--
mrxsmb.sys6.1.7601.23816 - KB40227226.2.9200.22074 - KB40227246.3.9600.18586 - KB402272610.0.14393.953 - KB402271510.0.15063.0--
tcpip.sys6.1.7601.23761 - KB40227226.2.9200.22070 - KB40227246.3.9600.18478 - KB402272610.0.14393.1358 - KB402271510.0.15063.447--
http.sys6.1.7601.23403 - KB31255746.2.9200.17285 - KB30425536.3.9600.18574 - KB402272610.0.14393.251 - KB402271510.0.15063.483--
vmswitch.sys6.1.7601.23727 - KB40227196.2.9200.22117 - KB40227246.3.9600.18654 - KB402272610.0.14393.1358 - KB402271510.0.15063.138--
Corentoskrnl.exe6.1.7601.23807 - KB40227196.2.9200.22170 - KB40227186.3.9600.18696 - KB402272610.0.14393.1358 - KB402271510.0.15063.483--
Remote Desktop Servicesrdpcorets.dll6.2.9200.21506 - KB40227196.2.9200.22104 - KB40227246.3.9600.18619 - KB402272610.0.14393.1198 - KB402271510.0.15063.0--
termsrv.dll6.1.7601.23403 - KB31255746.2.9200.17048 - KB29735016.3.9600.17415 - KB300085010.0.14393.0 - KB402271510.0.15063.0--
termdd.sys6.1.7601.23403 - KB3125574------
win32k.sys6.1.7601.23807 - KB40227196.2.9200.22168 - KB40227186.3.9600.18698 - KB402272610.0.14393.594 - KB4022715---
rdpdd.dll6.1.7601.23403 - KB3125574------
rdpwd.sys6.1.7601.23403 - KB3125574------
SecurityMS17-010KB4012212KB4012213KB4012213KB4012606KB4012606--
KB4012216KB4013198KB4013198--
KB4012215KB4012214KB4012216KB4013429KB4013429--
KB4012217KB4013429KB4013429--
CVE-2018-0886KB4103718KB4103730KB4103725KB4103723KB4103731KB4103727KB4103721
KB4103712KB4103726KB4103715

Determine when to use Sysprep

System Preparation Tool (Sysprep) is a process you can run to reset a Windows installation. Sysprep provides an 'out of the box' experience by removing all personal data and resetting several components.

You typically run Sysprep to create a template from which you can deploy several other VMs that have a specific configuration. The template is called a generalized image.

If you want to create only one VM from one disk, you don’t have to use Sysprep. Instead, you can create the VM from a specialized image. For information about how to create a VM from a specialized disk, see:

Virtual Machine Vhd Windows 7

If you want to create a generalized image, you need to run Sysprep. For more information, see How to use Sysprep: An introduction.

Not every role or application that's installed on a Windows-based computer supports generalized images. So before you run this procedure, make sure Sysprep supports the role of the computer. For more information, see Sysprep support for server roles.

Generalize a VHD

Note

After you run sysprep.exe in the following steps, turn off the VM. Don't turn it back on until you create an image from it in Azure.

  1. Sign in to the Windows VM.

  2. Run Command Prompt as an administrator.

  3. Change the directory to %windir%system32sysprep. Then run sysprep.exe.

  4. In the System Preparation Tool dialog box, select Enter System Out-of-Box Experience (OOBE), and make sure that the Generalize check box is selected.

  5. In Shutdown Options, select Shutdown.

  6. Select OK.

  7. When Sysprep finishes, shut down the VM. Don't use Restart to shut down the VM.

Now the VHD is ready to be uploaded. For more information about how to create a VM from a generalized disk, see Upload a generalized VHD and use it to create a new VM in Azure.

Note

Create A Vhd Backup

A custom unattend.xml file is not supported. Although we do support the additionalUnattendContent property, that provides only limited support for adding microsoft-windows-shell-setup options into the unattend.xml file that the Azure provisioning agent uses. You can use, for example, additionalUnattendContent to add FirstLogonCommands and LogonCommands. For more information, see additionalUnattendContent FirstLogonCommands example.

Complete the recommended configurations

The following settings don't affect VHD uploading. However, we strongly recommend that you configured them.

Windows Xp Vhd Virtual Machine

  • Install the Azure Virtual Machine Agent. Then you can enable VM extensions. The VM extensions implement most of the critical functionality that you might want to use with your VMs. You'll need the extensions, for example, to reset passwords or configure RDP. For more information, see Azure Virtual Machine Agent overview.

  • After you create the VM in Azure, we recommend that you put the page file on the temporal drive volume to improve performance. You can set up the file placement as follows:

    If a data disk is attached to the VM, the temporal drive volume's letter is typically D. This designation could be different, depending on your settings and the number of available drives.

    • We recommend disabling script blockers that might be provided by anti-virus software. They might interfer and block the Windows Provisioning Agent scripts executed when you deploy a new VM from your image.

Shared Vhdx Between Virtual Machines

Next steps