• 0

How to copy VMs and add folders in Hyper-V


Go to solution Solved by The_Observer,

Question

sinetheo

I am studying for my MCSE and I am new to Hyper-V as I used VMWare Workstation for years previous for web development and self study.

 

I have a few questions?

 

In VMWare Workstation I could create folders in the Virtual Machines List so I could have Base Images, Domain A, bla.com, etc. What I would do is copy a virtual hard disk from the Base Images folder to another another and create another VM and link it to the VM. Viola I know copied the base Server2008 base image to A-DC1 domain controller etc.

 

Hyper V is confusing as I am trying to do the same. I tried export VM and then import VM and all it did was create 3 virtual machines?? One during the export and re-importing it forked it again as the virtual disk needed to be a different ID if correct? Also it gave it the same name. I want not only a different VM name, but also folder, disk, etc so I do not get confused

 

My question is how do I:

1. Create a folder in the Virtual Machines list as I have a ton of base images and plan to create several domains that can get large as I add more services in my lab

2. Copy or easily import/export a VM for my existing base images and have them appear in my virtual machines list without 3 different variations.

 

I figured I am just doing something wrong

Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0
The_Observer

A question?

 

Can I use the same copied virtual hard disks between different VM's or do I have to link to a read-only parent and set a diff for each VM to do this? 

 

Each VM would use the same Parent Read Only VHD file and each VM would create a new VHD with new data. You cant copy the and VM hard drive without Sysprep cause WIndows Server SSID (i think that is correct)

  • Like 1
Link to post
Share on other sites
  • 0
The_Observer

Cant create folders on Hyper-V Manager Tool (I know sucks!) - Just have to name them correctly

 

Use Differencing Disks (http://blogs.technet.com/b/canitpro/archive/2013/05/29/step-by-step-creating-differencing-disks.aspx) - Create Baseline VM, sysprep it, delete VM out off Hyper-V (But don't delete the disk) and then create new New VM within Hyper-V Manager Tool with no new hard drive, when done, open the settings on the VM and add a new harddrive but use the option "Differencing disk".

 

So your base line disk is used as a starting point but a new disk is created and anything new is put into this. Saves alot of time, FYI use a SSD if you can for the Baseline VHD file.

Link to post
Share on other sites
  • 0
sinetheo

Cant create folders on Hyper-V Manager Tool (I know sucks!) - Just have to name them correctly

Use Differencing Disks (http://blogs.technet.com/b/canitpro/archive/2013/05/29/step-by-step-creating-differencing-disks.aspx) - Create Baseline VM, sysprep it, delete VM out off Hyper-V (But don't delete the disk) and then create new New VM within Hyper-V Manager Tool with no new hard drive, when done, open the settings on the VM and add a new harddrive but use the option "Differencing disk".

So your base line disk is used as a starting point but a new disk is created and anything new is put into this. Saves alot of time, FYI use a SSD if you can for the Baseline VHD file.

Wouldn't it be easier if there was a cloning function?

Even the free virtualbox has this. So far I an disappointed in hyper-v but I am glad I am switching to it to learn as these quirks help me pass the exams.

I will read up and see if I can use your suggestion of a half way done sysprep. It would be great if any new vm would oob experience upon startup :-)

Link to post
Share on other sites
  • 0
Intersect

Wouldn't it be easier if there was a cloning function?

Even the free virtualbox has this. So far I an disappointed in hyper-v but I am glad I am switching to it to learn as these quirks help me pass the exams.

I will read up and see if I can use your suggestion of a half way done sysprep. It would be great if any new vm would oob experience upon startup :-)

it would but hyper-v's clone funciton is implimented by the user using ye old Copy and Paste method :(

Link to post
Share on other sites
  • 0
sinetheo

Cant create folders on Hyper-V Manager Tool (I know sucks!) - Just have to name them correctly

 

Use Differencing Disks (http://blogs.technet.com/b/canitpro/archive/2013/05/29/step-by-step-creating-differencing-disks.aspx) - Create Baseline VM, sysprep it, delete VM out off Hyper-V (But don't delete the disk) and then create new New VM within Hyper-V Manager Tool with no new hard drive, when done, open the settings on the VM and add a new harddrive but use the option "Differencing disk".

 

So your base line disk is used as a starting point but a new disk is created and anything new is put into this. Saves alot of time, FYI use a SSD if you can for the Baseline VHD file.

 

A question?

 

Can I use the same copied virtual hard disks between different VM's or do I have to link to a read-only parent and set a diff for each VM to do this? 

Link to post
Share on other sites
  • 0
jamieakers

Each VM would use the same Parent Read Only VHD file and each VM would create a new VHD with new data. You cant copy the and VM hard drive without Sysprep cause WIndows Server SSID (i think that is correct)

 

I call shenanigans on this.  Provided the computer isn't domain joined you can copy the VHD file and create as many VM's as you want from it.  I'd obviously recommend renaming them afterwards and ensuring you're using DHCP.

 

Source: Senior software tester on the Hyper-V project at Hitachi.  We do this for hundreds of VM's in test labs with no ill effects.  Secondary source: Mark Russinovich debunking the SID myth.

Link to post
Share on other sites
  • 0
The_Observer

I call shenanigans on this.  Provided the computer isn't domain joined you can copy the VHD file and create as many VM's as you want from it.  I'd obviously recommend renaming them afterwards and ensuring you're using DHCP.

 

Source: Senior software tester on the Hyper-V project at Hitachi.  We do this for hundreds of VM's in test labs with no ill effects.  Secondary source: Mark Russinovich debunking the SID myth.

 

interesting, BUT For the DC you want to create from a clone, create a unique installation or run Sysprep. - Mark Russinovich. OP is studying for MSCE so he will want or need to create labs with DCs so sysprep would be needed. 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Rich Woods
      Windows 10 build 19624 is now available as an ARM64 VHDX
      by Rich Woods



      Back in February, Microsoft introduced Hyper-V support for ARM64 PCs, something that was one of the key limitations at the time of Windows on ARM's launch. The only problem was that there was no way to actually spin up a Windows 10 virtual machine, because Microsoft doesn't make ARM64 images available.

      Now, that's changing, at least for virtual machines. The firm released Windows 10 Insider Preview build 19624 as a VHDX for ARM64 PCs today, as the Windows Insider team teased yesterday. It probably goes without saying, but you cannot use this with x64 hardware.

      There are also some prerequisites. Obviously, the use of Hyper-V means that you'll need to be running Windows 10 Pro or Enterprise. This is worth noting since pretty much every Windows on ARM PC has shipped with Home, other than the old Snapdragon 835 PCs, and the Surface Pro X for Business. That brings us to the next limitation, which is that Snapdragon 835 PCs are not supported. According to the download page, you need a Snapdragon 850, Snapdragon 8cx, or Microsoft SQ1. Presumably, the Snapdragon 8c will be added to this list whenever it comes to market.

      Once you've got that done, you can download the VHDX here. If you upgrade your PC from Windows 10 Home to Pro in order to do this, make sure to activate Hyper-V in Settings.

    • By Rich Woods
      Microsoft might release a Windows 10 VHDX for Hyper-V on ARM64 PCs
      by Rich Woods



      Microsoft has been dealing with some limitations with Windows on ARM since the platform was introduced a few years ago. One of those limitations was the lack of Hyper-V support, something that was recently added in Windows Insider Preview builds, although likely won't ship until about a year from now. There's only one problem though, which is that you actually can't use Hyper-V to create a Windows 10 VM, because there's no ARM64 installation media.

      That might be changing though, as was confirmed during the Windows Insider team's webcast today. Microsoft might end up releasing a VHDX that can be used for virtual machines. Of course, the team would only say that it "might" do it, since things that aren't announced rarely get confirmed. But if it happens, it will happen soon.

      According to WZor, it's going to be build 19624, which is the Fast ring build from two weeks ago.

      If you're looking for a plain-old ISO, that's not as simple of a task as it sounds. Due to the SoC nature of ARM processors, it makes it harder to have built-in drivers in the installation process. If you have something like a Surface Pro X or another ARM64, you'll still need to get installation media from the hardware vendor.

    • By StrikedOut
      Hi All.

      I am new to QNAP devices and not needed to use a NAS device in this manner so this is quite new to me. We recently purchased a TS-883XU-RP to use as our mass storage for our company. The plan is for our Hyper-V server (HP DL385p Gen8) to be the host and connect to the NAS via iSCSI. I have done this and during testing, had no issues at all including being able to copy mass data (~4TB) with no issues at all. However, now it is connected to the live system, I have teamed the NICs and configured the switch for 802.3ad dynamic as per https://kb.netgear.com/000053559/How-do-I-set-up-an-LACP-LAG-between-a-Smart-Managed-Plus-switch-and-a-QNAP-NAS and this seems to work fine.

      My issues arise when I try to copy the data from the existing servers to the new VM (although this could be a coincidence). The iSCSI connector drops and cant reconnect due to the Hyper-V host not being able to access servers outside of the vSwitch. Once I regain the connection, I will leave the servers to run with no data transfer to see if the connection drops. To add a little extra info, the other VM's that are held on the Hyper-V server can be connected without issue when I have the problem.

      My question is that are there steps that I have missed that can be causing this issue? Is there a best practice that I need to follow and where can i find it?

      Thanks.
       
      Edit: Also, the NAS is accessible through the WEB GUI when I have the issue. I am investigating the server to see if htere is a setting I have missed or is incorrect for its NIC teaming/switch config.
    • By The Dark Knight
      New home server build! Low power, whisper quiet and powered on 24/7. 
       
      AMD Athlon 200GE based system, 8GB DDR4 RAM, 60GB SSD, 1.65TB HDD storage (1TB + 650GB), Corsair 450W power supply. Onboard LAN plus additional TP-Link NIC, both Realtek chipsets.
       
      Running Windows 10 Pro. Didn't want Linux as a base as I'm just a beginner in Linux. Windows, I know. If anything goes wrong, I can deal with it easily.
      Hyper-V configured with 3 VM's as of now - OPNsense for my router, OpenMediaVault for file access and sharing across network and Ubuntu Server. Still figuring out what to run on Ubuntu. Might start with migrating Pi-hole over to this VM from my RPi so that I can use that Pi for something else. Also serving music to my RPi based music player in the living room and any other device via Samba shares. I had initially planned to also host my personal website from home, but after reading about the risks (DDoS especially) I've decided not to and continue paying for professional hosting.

      Shout out to @BudMan through whom I got to know about pfSense. Otherwise I would have never known that it was even possible to basically make your own router! I finally went with OPNsense though (fork of pfSense) as I simply love the GUI. Mouth opened and fell to the floor looking at the feature set of these router operating systems! Correctly configured, they can seriously blow the pants off any commercially available home router!
       
      In all my research on the router OS I did see practically everyone recommending Intel network cards as they work very well with FreeBSD (the base OS of pfSense and OPNsense). But so far, I have had zero issues with my Realtek based NIC's. I've yet to stress test the network though, so will then see how these NIC's fare compared to Intel. But currently, only me and my wife are pushing gig on the LAN, other family members usage is very low.
    • By indospot
      Microsoft updates the Windows 10 SDK with support for WinUI, XAML Islands, and more
      by João Carrasqueira



      Microsoft announced a series of new features and capabilities for Windows developers at Build 2018, some of which are specifically related to Fluent Design and UWP. Now, those features are finally making their way to developers with the latest update to the Windows 10 SDK. The latest version comes as part of Visual Studio 15.9.1, and it includes a host of new capabilities.

      One of those is the Windows UI Library (WinUI), which means developers can access XAML controls and elements through NuGet packages. This means that apps can use modern controls and Fluent Design elements in versions of Windows that didn't originally support them, all the way back to the Windows 10 Anniversary Update. WinUI was made available in preview back in the summer, but it's now out of the testing phase.

      UWP XAML Islands are also now available for apps that aren't built on the Universal Windows Platform (UWP), including WinForms, Win32, and C/C++, albeit in preview stage. The feature was announced back in April during Build, and it essentially allows developers to use UI elements from UWP in apps built on older technologies, giving them a more modern look without changing the underlying technology significantly.

      This release of the Windows 10 SDK also includes support for Adaptive Cards 1.1, bringing new features such as Media Element and Action Icons, as well as a new visual designer. Adaptive Cards are meant to present dynamic and interactive content in messages, and they were added to Outlook and Teams back in May.

      Hyper-V also now allows developers to run an Android emulator with all the latest APIs right inside Windows, though it requires the April 2018 Update (version 1803) or later. Graph Notifications are also now available in preview, offering a cross-platform system for notifications powered by Microsoft Graph. Developers can also now use Project Ink Analysis to create apps that are capable of recognizing ink and making it "more productive".

      Lastly, the Windows Machine Learning API is now easier to use because it's the same for both Win32 and UWP apps. It also now has new capabilities including support for ONNX v.1.2.2 models, the ability to convert FP32 datatypes in ONNX models to use FP16, support for Windows Server 2019, and more.