Booting
October 31, 2023 ยท View on GitHub
The following guide walks through booting images and ISOs on Windows using Hyper-V.
Use Hyper-V to Boot Your ISO Installer
Copy ISO Image to Your VM Host Machine
Copy your binary image(s) to your VM Host Machine using your preferred technique.
Create VHD(X) Virtual Machine with Hyper-V
- From Hyper-V Select Action->New->Virtual Machine.
- Provide a name for your VM and press Next >.
- Select Generation 1 (VHD) or Generation 2 (VHDX), then press Next >.
- Change Memory size if desired, then press Next >.
- Select a virtual switch, then press Next >.
- Select Create a virtual hard disk, choose a location for your VHD(X) and set your desired disk Size. Then press Next >.
- Select Install an operating system from a bootable image file and browse to your demo ISO.
- Press Finish.
[Gen2/VHDX Only] Fix Boot Options
- Right click your virtual machine from Hyper-V Manager
- Select Settings...
- Select Security and under Template: select Microsoft UEFI Certificate Authority.
- Select Firmware and adjust the boot order so DVD is first and Hard Drive is second.
- Select Apply to apply all changes.
Disable Secure Boot
Note: If you followed any of the previous tutorials in Working with packages, the kernel is no longer signed and secure boot must be disabled in order to boot your VHD(X) image.
- Right click your virtual machine from Hyper-V Manager
- Select Settings...
- Select Security and uncheck the "Enable Secure Boot" box
Disable Dynamic Memory
Note: Having Dynamic Memory enabled may lead your app to crash due to integration with the Hyper-V Memory Ballooning driver. To avoid this, dynamic memory must be disabled.
- Right click your virtual machine from Hyper-V Manager
- Select Settings...
- Select Memory and uncheck the "Enable Dynamic Memory" box
Boot ISO
- Right click your VM and select Connect....
- Select Start.
- Follow the Installer Prompts to Install your image
- When installation completes, select restart to reboot the machine. The installation ISO will be automatically ejected.
- When prompted sign in to your CBL-Mariner system using the user name and password provisioned through the Installer.
Use Hyper-V to Boot Your Offline Image
Copy your demo VHD or VHDX image to your Windows Machine and boot it with Hyper-V.
Create VHD(X) Virtual Machine with Hyper-V
- From Hyper-V Select Action->New->Virtual Machine.
- Provide a name for your VM and press Next >.
- For VHD select
Generation 1. For VHDX selectGeneration 2, then press Next >. - Change Memory size if desired, then press Next >.
- Select a virtual switch, then press Next >.
- Select Use an existing virtual hard disk, then browse and select your VHD(X) file.
- Press Finish.
[Gen2/VHDX Only] Fix Boot Options
- Right click your virtual machine from Hyper-V Manager
- Select Settings...
- Select Security and under Template: select Microsoft UEFI Certificate Authority.
Disable Secure Boot
Note: If you followed any of the previous tutorials in Working with packages, the kernel is no longer signed and secure boot must be disabled in order to boot your VHD(X) image.
- Right click your virtual machine from Hyper-V Manager
- Select Settings...
- Select Security and uncheck the "Enable Secure Boot" box
Disable Dynamic Memory**
Note: Having Dynamic Memory enabled may lead your app to crash due to integration with the Hyper-V Memory Ballooning driver. To avoid this, dynamic memory must be disabled.
- Right click your virtual machine from Hyper-V Manager
- Select Settings...
- Select Memory and uncheck the "Enable Dynamic Memory" box
[Images Without Pre-Set Users Only] Build and Mount the Meta-User-Data.Iso Image
Note: If you followed any of the previous tutorials to build custom images in Working with packages, your image will have a user provisioned. This step is only needed if you are booting an image without a pre-defined user.
- Build
the meta-user.isofile via the instructions for using the meta-user.iso cloud init image - Right click your virtual machine from Hyper-V Manager
- Select Settings.... choose DVD Drive and press Add.
- Select the DVD Drive. For Gen1/VHD Images, this is nested under IDE Controller 1. For Gen2/VHDX Images, this is nested under SCSI Controller.
- Select Image File: and browse to the meta-user-data.iso file.
- Select Apply to apply all changes.
Boot and Sign-In to Your VHD(X) Image
- Right click your VM and select Connect....
- Select Start.
- Wait for CBL-Mariner to boot to the login prompt, then sign in with the credentials you provisioned in the meta-user-data.iso file (username/password or username/sshkey pair).