VM Tips and Tricks?

Page 1 of 3 123 LastLast

  1. Posts : 66
    Windows 10 Pro
       #1

    VM Tips and Tricks?


    Hello,

    When I purchased my recent laptop, I had it come downgraded to Windows 7 Pro on a junk drive. So I essentially had a Windows 7 key and 8 key. I replaced the junk drive with an SSD and installed Windows 8 using the key in the BIOS. Today, the laptop is on Windows 10 Pro.

    I'm now setting up a VM inside of the Windows 10 using Hyper-V, and created a Windows 7 Pro VM using the key that came with the junk drive.

    Some questions:

    Can I make repeated VMs using the same key? I thought about getting a base VM configured, and then saving that off, and then just importing that base VM additional times if needed. For example, 1 VM for 1 customer and other for a different customer, etc. Furthermore, is it possible to upgrade the base VM to Windows 10 and accomplish the same duplication?

    I thought I had seen a tutorial or post about that here ...

    Thanks!!
      My Computer


  2. Posts : 234
    Windows 10 Pro (x64)
       #2

    No. That is not possible. Having multiple activated copies running at the same time will get flagged.
      My Computer


  3. Posts : 66
    Windows 10 Pro
    Thread Starter
       #3

    Thanks. I wish I could find that thread now - I thought I read something different :)
      My Computer


  4. Posts : 66
    Windows 10 Pro
    Thread Starter
       #4

    Question. I'd like to save off the VM in it's initial state. Is it better to just make a copy of the vmcx, vmrs, and vhdx? Or is better to do Export?

    The win 7 key wouldn't activate. I can only guess it's because it was an OEM. Technically, two keys were in the BIOS with the laptop (Win 7 and Win 8), but I suppose I can really only have 1 activated at a time. I ended up activating the Win 8 key.

    Anyway, I have another Win 8 key I can use. I created a VM with it and Windows activated. I'd like to update it to Win 10, and then save off that state of the VM, in case I ever need to go back to it - accessing it from the same laptop.

    Any suggestions or ideas on what people turn off on their VMs? I turned off OneDrive, because I don't want it syncing all the files. I can get access to the OneDrive directory on the host machine when I remote desktop into the VM.

    Thanks for any suggestions you might have :)
      My Computer


  5. Posts : 5,478
    2004
       #5

    Assuming you are using Hyper-V then export is easiest - it will put all the files it needs together in one folder. When you import it take the option to keep the same ID (either restore or register in place but not copy) and you'll not have any problems with activation. If you are using VirtualBox just copy the whole folder and if you are using VMWare copy the whole folder and say "I moved it" not "I copied it" when you start up the copy.

    If you want multiple activated VM's on one key you can export to different places. You could make a base install and export it, install one set of programs and export it somewhere else. Import the base and install other things... You can only run one at a time though.

    If you use VHDX you can also boot it as VM and as Native boot and both will be activated as the native boot will pick up the HWID of your underlying OS.

    In most VMs I uninstall all Windows Apps (except for store and calculator) and delete their packages from C:\Program Files\WindowsApps. I leave OneDrive because I use it.

    You can further reduce size by setting Compact /CompactOS:always and compacting "Program Files" and "Program Files (x86), turning off system protection and reducing size of page file to 400 MB. This makes my base Windows 10 install VHDX about 7GB - 4.1GB when zipped up which is pretty easy to store away.
      My Computer


  6. Posts : 66
    Windows 10 Pro
    Thread Starter
       #6

    Yes, I'm using Hyper-V. Thanks for this info. It's really helpful! I may have more questions :)
      My Computer


  7. Posts : 5,478
    2004
       #7

    If you wanted VMs for different customers you could make a folder structure like:

    D:\Hyper-V\Base
    D:\Hyper-V\Customer-1
    D:\Hyper-V\Customer-2

    and export the machine to the relevant place.

    Then if you wanted to load up a specific one just delete the one you have, go to import and say register in place. As it doesn't copy the VHDX it takes seconds and it is always activated as the machine is always the same - only the contents of the disk are changing.

    i.e.

    VM Tips and Tricks?-capture0.png

    VM Tips and Tricks?-capture.png
      My Computer


  8. Posts : 66
    Windows 10 Pro
    Thread Starter
       #8

    Thanks for the info. I'm hoping I understand this correctly.

    Create Base VM
    Install Apps A for Customer A, Export
    Delete existing VM
    Import Base VM
    Install Apps B for Customer B, Export
    etc. ...

    But when importing, keep in mind to Register in Place. Additionally, I can only run on VM at time.

    Thanks!
      My Computer


  9. Posts : 5,478
    2004
       #9

    I just tested this and the delete option deletes the machine so this is not a good solution. I have exported lots of copies but I keep them on backup drive and copy the folder to my SSD when I want them so I didn't really notice.

    For your situation a better solution would be to delete and then restore the VM (second option in the screenshot above - not register in place). This will copy it to the default Hyper-V location and when you delete it you have the original exported copy to restore next time.

    Another option is to do this:

    • Create base VM with disk called Windows.vhdx, export (this is for safe keeping). Shut down machine.
    • Copy Windows.vhdx file to Windows-Customer-A.vhdx and change the disk in Hyper-V settings. Install Apps etc.
    • Copy Windows.vhdx file to Windows-Customer-B.vhdx and change the disk in Hyper-V settings. Install Apps etc.


    Then to swap between them just do to settings and change the attached disk only. The machine ID will stay the same so activation will persist.

    VM Tips and Tricks?-capture.png

    The only advantage of doing this over the import restore method is you don't need to copy it so it is quicker, conversely you'll need the local disk space for all your copies. If you use them rarely you might find it better to export them to external drive and just import the one you want.

    Either way you can only run one copy at a time (per valid key) as if you run 2 instances concurrently your key may be blocked. Hyper-V will not let you register 2 VMs simultaneously with the same hardware ID anyway so you needn't worry.
      My Computer


  10. Posts : 17,661
    Windows 10 Pro
       #10

    GatsbyGlen said:
    Question. I'd like to save off the VM in it's initial state. Is it better to just make a copy of the vmcx, vmrs, and vhdx? Or is better to do Export?
    I am a fan of Hyper-V checkpoints, see the tutorial: Hyper-V Checkpoints - Create and Use in Windows 10 - Windows 10 Forums

    This is how I do when installing new OS on a Hyper-V vm:

    • Install, create the initial user, boot to desktop
    • Create a Checkpoint
    • Install Software, add other users
    • Create a checkpoint

    And so on. Always when making any changes to the vm, I create a checkpoint. Now I can always go back to any of my Checkpoints simply by applying it.

    VM Tips and Tricks?-2015_09_27_11_01_181.png
    (Click to enlarge.)

    GatsbyGlen said:
    Anyway, I have another Win 8 key I can use. I created a VM with it and Windows activated. I'd like to update it to Win 10, and then save off that state of the VM, in case I ever need to go back to it - accessing it from the same laptop.
    That won't work. You can go back to Windows 8 the first 30 days after upgrading to Windows 10. If done later, the Windows 8 product key is already used and reserved for the upgrade and won't activate anymore.

    This is how it works:
    • You activate your Windows 8 vm
    • You upgrade to Windows 10, the Windows 8 product key is reserved
    • Withing the first 30 days after the upgrade you can launch the vm and select going back to Windows 8, in which case the Windows 8 product key will be released and you can use it to reinstall Windows 8
    • After 30 days the Windows 8 product key is forever gone. You can reinstall Windows 10 clean and it will be activated but trying to use the original Windows 8 key for reinstall will no longer work as the key is seen as used


    Kari
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 08:52.
Find Us




Windows 10 Forums