GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Join GitHub today
Sign up
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking âSign up for GitHubâ, you agree to our terms of service and privacy statement. Weâll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
commented Jul 3, 2017
Packer provides the enable_secure_boot parameter to turn on secure boot, this works if the guest OS is Windows, but if it's another Secure Boot supported OS such as Ubuntu it does not work. The reason why is that the SecureBootTemplate has to be changed from the default one to MicrosoftUEFICertificateAuthority.
I would like to see support for choosing the SecureBootTemplate along with the choice of enabling Secure Boot. Changing the template is easy, and can be done in the same Power Shell command as turning on SB:
Set-VMFirmware -VMName dtlinux -EnableSecureBoot On -SecureBootTemplate 'MicrosoftUEFICertificateAuthority'
Good source for more info: http://www.altaro.com/hyper-v/hyper-v-2016-support-linux-secure-boot/
|
added builder/hypervenhancement labels Jul 3, 2017
commented Jul 12, 2017
Yes I would like a PR for this. I am assuming that if we would have 1 parameter in Packer.
If its not a empty it would add
-EnableSecureBoot On
|
commented Jan 1, 2018
@shirgall Do you have any feedback on this? Do you have a list of which distros work with
MicrosoftUEFICertificateAuthority and secure boot?
|
commented Jan 2, 2018
All the major enterprise distributions support secure boot with the latest releases. The odd ones out are Debian and CentOS.
|
referenced this issue Feb 10, 2018
MergedAdds config option to specify hyper-v secure boot template #5883
commented Feb 10, 2018
I actually need this functionality in a current project, so I thought I'll give it a try. I've added an additional property called 'secure_boot_template' which can be used to specify the secure boot template.
First I looked in to changing the 'enable_secure_boot' property to a string, which would allow you to just specify the template and if you specify something here, it would enable secure boot implicitly. I think having a second field gives more control. For example, with two options it is possible to disable secure boot and still pre-configure the correct template for a Linux template, in case a user enables it later.
|
commented May 3, 2018
+1
|
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment
How to See if Hyper-V Virtual Machine is Generation 1 or Generation 2
Hyper-V enables running virtualized computer systems on top of a physical host. These virtualized systems (aka: guests) can be used and managed just as if they were physical computer systems, however they exist in a virtualized and isolated environment.
When you create a new virtual machine (VM) in Hyper-V, you must choose the generation of this VM to be either generation 1 or
Generation 1 (MBR / Legacy BIOS) = This virtual machine generation supports 32-bit and 64-bit guest operating systems and provides virtual hardware which has been available in all previous versions of Hyper-V.
Generation 2 (GPT / UEFI) = This virtual machine generation provides support for newer virtualization features listed below, and requires 64-bit guest operating system.
- PXE boot by using a standard network adapter
- Boot from a SCSI virtual hard disk
- Boot from a SCSI virtual DVD
- Secure Boot (enabled by default)
- UEFI firmware support
Once a virtual machine has been created, you cannot change its generation.
This tutorial will show you how to quickly see if your Hyper-V virtual machines are generation 1 or generation 2.
- Option One: To See Generation of a Hyper-V Virtual Machine in Hyper-V Manager
- Option Two: To See Generation of All Hyper-V Virtual Machines in PowerShell
EXAMPLE: Generation 1 or Generation 2 for New Hyper-V Virtual Machine
To See Generation of Hyper-V Virtual Machine in Hyper-V Manager
1. Open Hyper-V Manager.
2. Select a Hyper-V virtual machine at the top of the middle pane you want to see what generation it is. (see screenshots below)
It doesn't matter if the virtual machine is off or running.
3. You will now see what generation this Hyper-V virtual machine is at the bottom of the middle pane.
To See Generation of All Hyper-V Virtual Machines in PowerShell
1. Open an elevated PowerShell.
2. Copy and paste the command below into the elevated PowerShell, and press Enter. (see screenshot below)
3. You will now see all your Hyper-V virtual machines listed by name with what generation they are.
That's it,
Shawn
In this blog post, I will show you how to install and setup Fedora Workstation 29 in Hyper-V. Since Hyper V comes shipped with Windows OS (Except Home Edition), chances are that you already have Hyper V available in your system, ready to be used.
Please note that â Fedora is not supported on Hyper-V. As such, installation has some issues. For example, after the installation completes, you will be asked to restart the VM. You will see that the process gets stuck at âStarting GNOME Sessionâ. Luckily, there is a way to get around this issue as explained from step 15 on wards to fix issue
And yes, Druid's Den is still technically a WIP (notably potion display is coming) but I adore it. Skyrim se home mods.
Download Fedora Workstation
You can download Fedora Workstation from here. Default option is to create installation media using media creation tool.
But I prefer to download the ISO file, link to which is available under Other Options section on the download page. Choose 64 bit version for Hyper-V.
What is Hyper-V
Hyper V is a virtualization software from Microsoft which allows you to run multiple Operating system on your Windows Machine. Hyper V is exactly like VMware Workstation or Oracle VirtualBox, except that Hyper V is from Microsoft and is available for free for almost all the versions of Windows except Home version.
Which Windows Version Supports Hyper V and how to Enable it
Since Hyper V is a part of Windows OS, separate installation is not required. But Hyper-V is not enabled by default and to use it, it needs to be enabled. To enable Hyper V, the following requirements must be met.
- Windows 10 Enterprise, Professional, or Education
- 64-bit Processor with Second Level Address Translation (SLAT)
- CPU support for VM Monitor Mode Extension (VT-c on Intel CPUâs)
- Minimum of 4 GB memory.
- The Hyper-V role cannot be installed on Windows 10 Home.
For detailed discussion please go through my blog on how to enable Hyper V in Windows.
Enable Virtualization Technology either Intel VT-x or AMD-V
To enable Hyper V, system must have Virtualization Technology Enabled in BIOS. For AMD processors, Virtualization is enabled by default, but in the case of Intel, VT-x may not be enabled by default. So, there are steps to be followed to enabled Intel VT in BIOS or UEFI. Please follow my post on Step by step guide to enable Intel VT-x or AMD-V in BIOS or UEFI in Windows 10 and Windows 8.
Eve ng connect to real network download. Before you start installing Kali Linux, we will have to create network connection switch first. Please follow the steps below
- Open Hyper-V Manager
- Click Virtual Switch Manager under action on the right pane in Hyper-V Manger screen
Hyper V- Virtual Switch Manager
- Select External and click on create virtual switch.
- In the Virtual Switch properties dialog box, specify the name of your choice of the virtual switch and under Connection Type -> External Network, select your system Ethernet card and not your WiFi card. Click on OK to complete the process.
Hyper V Manger â Virtual Switch Properties
Once you have Hyper V setup successfully, Please follow the below steps to Install Fedora Workstation 29
Step 1 â Open Hyper V Manager
First step is to open Hyper V manager. If you have setup everything correctly, you can search for Hyper-V Manager in Taskbar or you can find the shortcut in Start Menu under Windows Administrative tools.
On the right hand side you will see New-> Virtual Machine. Click on Virtual Machine to launch New Virtual Machine Wizard and click Next.
Hyper-V Manager â New Virtual Machine Wizard Screenshot
Step 2 â New Virtual Machine Wizard â Specify Name and Location
In this dialog box, please enter the name of the Virtual Machine. In Our case, we can name our Virtual machine as Kali Linux. But you can specify anything according to your preference. There is a checkbox to chnage the location where the Virtual Machine Files will be created. If you leave this unchecked, default location will be used. Else Check the box to change the location. I normally leave it as default. But if you have disk space constraints, it better to specify the location in a different disk drive.
Hyper-V Manager â New Virtual Machine Wizard â Specify Name and Location Screenshot
Step 3 â New Virtual Machine Wizard â Specify Generation
These days you can create two versions(Generation) of Virtual Machines. The latest one is Generation 2. Before generation 2 type virtual machines came into existence, there was nothing like generation 1 virtual machines. All virtual machines were the same. But from generation 2 virtual machines, older virtual machines were called generation one virtual machines. Generation one virtual machines supports legacy hardware. Generation 2 Provides the following new functionality on a virtual machine:
- PXE boot by using a standard network adapter
- Boot from a SCSI virtual hard disk
- Boot from a SCSI virtual DVD
- Secure Boot (enabled by default)
- UEFI firmware support
We will be creating Generation 2 virtual machine. Select Generation 2 and click next.
Hyper-V Manager â New Virtual Machine Wizard â Specify Generation dialog box Screenshot
Step 4 â New Virtual Machine Wizard â Assign Memory
In this dialog box you will have to specify the amount of RAM you want to allocate to the virtual machine once the virtual machine is turned on. By default it is 1GB(1024 MB), but I normally prefer 2GB(2048 MB). Also, check Use Dynamic Memory for this Virtual Machine. This will allow Hyper V to adjust RAM according to the requirement of the Virtual machine.
Hyper V Manager â New Virtual machine Wizard â Assign Memory dialog box screenshot
Step 5 â New Virtual Machine Wizard â Configure Network
For virtual machines to be be able to communicate with other virtual machines or internet, it should have a network adapter. In this dialog box you will have to specify the network adapter. Please choose connection(external virtual virtual switch) from the drop down menu and click on next.
Hyper V Manager â New Virtual machine Wizard â Configure Network dialog box screenshot
Step 6 â New Virtual Machine Wizard â Connect Virtual Hard Disk
Virtual Machines require hard disk space. This is the place where you decide how much disk space you want to allocate to the virtual machine. For Kali, its recommended to select around 60 GB of disk space. Give Virtual disk a name of your choice. Please note that, not all of the allocated disk space will be used during the installation process. It is dynamically created, that is it will expand as the usage grows with the maximum limit of what you specify as the virtual disk size. Give the name of the virtual hard disk, specify the disk space and click next.
Hyper V Manager â New Virtual machine Wizard â Connect Virtual hard Disk dialog box screenshot
Step 7 â New Virtual Machine Wizard â Installation Option
In this dialog box you will be asked to specify the setup media. Check Install an operating system from bootable CD/DVD-ROM -> Image File. Browse to the downloaded ISO image file and click next.
Hyper V Manager â New Virtual machine Wizard â Installation Options dialog box screenshot
Step 8 â New Virtual Machine Wizard â Completing the New Virtual Machine Wizard
This dialog box will show you the summary of the options you have selected. Click Finish to create the Virtual Machine. You will see the process for creating new virtual machine will begin. At the end end you will see Hyper-V Manager with the newly created virtual machine under Virtual Machine Box.
Hyper V Manager â New Virtual machine Wizard â Completing the New Virtual Machine Wizard dialog box screenshot
Step 9 â Hyper-V Manager- Virtual Machine Settings
After the virtual machine is created, you will see the name of the virtual machine listed under Virtual Machines.
Right click on the name of the virtual manager and click on settings to change Virtual machine Options. You will also see settings option on the right hand side, as shown in the screenshot below.
Hyper V_manager â Virtual Machine settings
You can change the following most common virtual machine startup settings such as memory, network, CPU and so onâ¦
-
Change Allocated Memory
here you can specify the memory with which the Virtual machine will start or boot. I normally choose 2048 MB(2 GB) and always check Enable Dynamic Memory. -
Change the number of Virtual processor
Here you can specify the number of Virtual processors. Normally I set it to 2. It depends on the actual CPU your system has. Since I have i7 CPU (Which has 8 cores), I Normally allocate 2 core to the Virtual Machine.Hyper V Manager â Specify Processors for Virtual machine -
Secure Boot
Since we are using Generation 2 VM, you will have to enable Secure boot. You will see Secure Boot option only if you have created Generation 2.Select the Template as âMicrosoft UEFI Certificate Authorityâ -
IDE Controller
Here you can create virtual Hard drives and DVD drives. By default, one Hard Disk and one DVD drive is created. If you want additional ones, you can create it here.Hyper V Manager â Virtual Machine Settings â IDE Controller -
Network Adapter
Here you can specify the network adapter to use for the Virtual machine.Hyper V Manager â Virtual machine Network Adapter settings -
Floppy Drive
Here you can specify the floppy drive. Floppy drives and things of the the past and almost extinct. You can leave it as default which is none.Hyper V Manager â Virtual machine Floppy Drive settings -
Enable RemoteFX 3D Video Adapter
Enabling RemoteFX 3D Video Adapter give you access to rich graphics such as enabling full screen mode. This step is optional, but recommended.
Go to settings and click on Add hardware. You will see RemoveFX 3D Video Adapter. Click on that and click Add.Make your selection from the drop down boxes and click OK.Hyper-V settings â RemoteFX 3D Video Adapter settings -
Change Virtual machine name
If you wish to change the name of the virtual machine, you can do it here.
Step 10 â Connect to virtual machine
Now lets get started with the installation process. Click on the Virtual machine name you have created and click on start. This will start the Fedora VM. If you donât see a new window popup, select click on connect. You will see the Virtual Machine window.
Hyper-V Manager â Fedora Workstation
You will see the below screen if you click on connect.
Once the VM starts, you will see the Fedora option. Hit enter to âStart Fedora-Workstation-Live 29â
Fedora Workstation 29 â Boot Option
You will see Fedora Startup process begin
Step 11 â Login to Fedora Live
You will see the Live Fedora Boot up
Fedora Workstation 29 Start Up screen
Click on the screen or hit enter, now you will see the Live System User login screen.
Click on LiveSystem User to login. You will see two options, Try Fedora and Install to Hard Disk. Click on Install to Hard Disk to start the installation process.
Fedora Workstation 29 â Install to Hard Disk
Step 12 â Select Language
In this screen you will be asked to enter your preferred language. I choose English and United States. You can use the arrow keys to make your preferred language selection. Click on Continue.
Fedora Workstation 29 Installation â Select Language
Step 13 â Installation Summary
In Installation summary, you will be asked to specify the Keyboard, Date and time and Installation destination.
- Keyboard Layout-
-
I always choose US â English Keyboard type. If you want to change it, click on Keyboard and you will see the keyboard options based on your selection of language earlier. Since I choose English, I can see English Keyboard Layout only here.If you see multiple keyboard options, use the arrow key to make your selection and click on Done to go back to the Installation Summary screen.Fedora Workstation 29 â Installation summary â Keyboard Setup
- Date/Time Setup
-
To change the Date/Time zone, click on Data/Time. You will see the world map. You can either select the time zone from the drop down list or by clinking on the map. Click on Done to make your selection and go back to the Installation summeryFedora Workstation 29 â Installation Summary â Date/Time setup
- Installation Destination
-
Here you will have to select the disk to use for installation. Click on Installation Destination and select the default disk listed under Local Standard Disk and click on done to go back to Installation summary.Fedora Workstation 29 Installation Summary â Installation Destination
Step 14 â Installation Summary â Begin Installation
Once you have specified the installation destination, you will can click on the Begin Installation button to start the installation process.
Fedora Workstation 29 â Installation Summary â Begin Installation
You will see that the installation process will begin. Wait for it to complete.
Step 15 â Installation Complete
Once installation is complete, you will be asked to Reboot the system. Click on Quit.
Hyper-v Secure Boot Ubuntu
After you click on quit, you will return to the Fedora Desktop.
Before restarting make sure that installation ISO has not been ejected. Go to Media -> DVD Drive -> Make sure that Fedora Workstation DVD is present. Do not eject.
Fedora Workstation 29 â Installation Complete
Step 15 â Reboot
Now that you are in Fedora Desktop, Go ahead and reboot the system. In my case, it did not reboot automatically. So I had to reboot it manually by going to Action->Shut down and again Start.
The output format for the recorder can be pre-set. This program proves you can still get a decent CD-ripping application without spending any money. The user has to select WAV, WMA, MP3, or OGG file as the output and set the quality as desired. Its stylish main window is not only attractive, but also very functional, with large, clearly labeled icons for all actions.Still, we were glad to find the utility can rip files using the space-efficient VBR compression scheme. Audio rip. This program comes complete with powerful feature-rich recorder included in the package.
You will see this screen. Wait till you see the Fedora Screen.
Fedora Workstation 29
You will see Fedora Boot loader as before, login as Live System User and Click on Try Fedora. This will take to you the live Fedora Session.
Fedora Workstation 29 â Try Fedora
Step 16 â Open Terminal
Now open the terminal and run the following commands one after the other.
- Login as root â Enter
sudo su
or simplysu
and hit enter - Scan for Logical Volumes â
lvscan
and hit enter. You will see something âCTIVE â/dev/fedora/rootâ [50.00 GiB] inheritâ - Mount the volume is a two command process â To mount the /dev/fedora/root volume,
entermkdir /media/hd
, hit enter and again entermount /dev/fedora/root /media/hd
and hit enter. - Edit the file /media/hd/etc/gdm/custom.conf â To edit the file enter
vi /media/hd/etc/gdm/custom.conf
and hit enterYou will see the vi editor. Uncomment the line WaylandEnable=false by removing the # symbol as shown below.Fedora Workstation 29 â TerminalEnter :wq to save and exit. - Unmount the drive by entering the following commands
cd
umount /media/hd
rmdir /media/hd - Remove the ISO image from the drive â Before we restart, remove the ISO image from the VM by going to Media -> DVD Drive Eject
- Reboot â Reboot the VM as we did earlier
Step 17 â Installation Complete â create user
Thatâs it. After the VM restarts, you should see the Fedora Desktop.
On the first restart, after installation, you well see a welcome screen. Its self explanatory, click on next to continue to the next screen. After couple of screens, you will be asked to create user and password.
Complete the process and you will have your Fedora desktop for use.
Thanks for visiting my blog.
I've converted a VMWare VMDK to a VHDX. The guest is a Windows 8.1 VM.
When this is attached to a generation-1 Hyper-V VM as an IDE drive, it boots up fine.
When the same VHDX is attached to a generation 2 Hyper-V VM (forced to use SCSI), it fails to boot off the same disk (checked boot order, it fails disk and hits CDROM and network).
The Hyper-V host is a Windows Server 2012 R2 (+updates/patches).
Does anyone know how to get this working as a generation 2 Hyper-V VM. I'm hoping it's not a limitation that I must use IDE (flashback 90s) in order to order to do something as basic as .. boot!
DeepSpace101DeepSpace101
4575 gold badges10 silver badges24 bronze badges
1 Answer
You can't just take a boot disk from a generation 1 guest and have it boot in a generation 2 guest. Your generation 1 disk is likely still using the MBR, your generation 2 disk requires an GPT/EFI partition or converted to GPT/UEFI to boot.
Hyper-v Secure Boot Template
There are some documented manual and scripted methods to convert the virtual machine from generation 1 to generation 2, however these methods would be used at your own risk.
The first link from the manual method is actually from a series of articles on generation 1/generation 2 virtual machines and is a good read.
There is no way in Hyper-V to change the generation of a virtual machine. Neither is there a means to migrate a generation 1 virtual machine to a generation 2 virtual machine.
However, there is a longer answer which is supported in certain circumstances, due to the use of standard inbox tools and capabilities for deployment. Letâs rule out first what definitely cannot be migrated. The obvious categories are any virtual machine running a 32-bit guest operating system; any virtual machine not running Windows (although there may be other solutions Iâm not aware of); any virtual machine running a version of Windows prior to Windows 8/Windows Server 2012.
At a high level, the steps Iâm going to follow are:
- Disable the recovery environment
- Make a copy of the Windows image as installed
- Create a new VHDX
- Partition it in GPT format and make it bootable
- Put the copy of Windows we previously made onto the new disk
- Create a new generation 2 virtual machine and attach the new VHDX
- Fix up the recovery environment
7,4123 gold badges23 silver badges43 bronze badges