raymccoy's picture

How can i make a hyper-v 2016 gen 2 machine with turnkeylamp 15.0.

Can anybody explain the steps?

Forum: 
Jeremy Davis's picture

I don't have Hyper-V or access to it so I haven't tested it there and can't even be sure tht it will work. As far as I understand gen 2 VMs on Hyper-V require "secure boot" among other things and are generally more tightly integrated with the host machine (from what I've read anyway...). TurnKey definitely isn't compatible with "secure boot" but even with that disabled, I'm not 100% sure it will work.

If possible, can you try creating a gen 1 VM? I suspect that would work (the previous TurnKey versions worked as a gen 1 VM and v15.0 should be similar enough to that to still work). If not, then you could try fiddling with the secure boot options.

Also, if you can share a few more details about the exact error message you are getting, then perhaps I could do a bit more targeted research which might help us understand the issue?!

Jeremy Davis's picture

The following applies to Debian, which TurnKey is based on. It seems that there are a few specific conditions which need to be met for a Gen 2 Debian VM to work on Hyper-V:

  1. Secure boot disabled
  2. UEFI boot support (TurnKey ISO doesn't currently support this AFAIK)
  3. Partitioning using a GPT partition table (TurnKey installer use MBR)
  4. ext3 or ext4 filesystem (AFAIK TurnKey defaults to ext4 so we're good there).

#1 can be worked around via config, and we're good on #4, but AFAIK #2 & #3 are deal breakers currently. Debian (what TurnKey is based on) is able to support both #2 & #3 but we use our own minimalist installer which does not currently support UEFI and defaults to using MBR partitioning (without an option to use GPT).

If you are hell bent on running it as a Gen 2 VM then it may be possible, although I can not confirm 100%. You would need to install the ISO into a Gen 1 VM, then change the partitioning to GPT. Unless you are comfortable on the commandline, probably the easiest way to do that is with a GParted live ISO. AFAIK, that should be all that is required specific to TurnKey (UEFI boot support should already be possible via the installed system; AFAIK it's only our installer that doesn't support UEFI - but be warned that I could be wrong!).

Then the conversion from Gen 1 to Gen 2 should be consistent with any other Hyper-V Linux OS from Gen 1 to Gen 2. I found a tutorial (pt1, pt2 & pt3) which looks relevant, although I haven't fully read through it and again I haven't tested it...

If you do try, please share how things go. If you can confirm that it works, then that will give extra weight to us doing some work on our installer prior to v15.1! :)

Add new comment