Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
868f55d
adding dv iso image json and automated scripts
smitesh-sutaria Jul 24, 2025
2b90aa0
adding readme
smitesh-sutaria Jul 24, 2025
f4f44dd
refactor readme
smitesh-sutaria Jul 24, 2025
277aac6
adding the wget of the idv json
smitesh-sutaria Jul 24, 2025
3f0f0a3
adding copyright info and notes on proxy usage
smitesh-sutaria Jul 24, 2025
52f7ed3
adding the standalone automation script readme
smitesh-sutaria Jul 24, 2025
d4240b0
Adding the demo video
smitesh-sutaria Jul 24, 2025
ac67c52
adding the table of contents and other formatting refactor
smitesh-sutaria Jul 25, 2025
7f35284
adding idv-services to the image
smitesh-sutaria Jul 25, 2025
4b81a47
few enhancements in build script
smitesh-sutaria Jul 25, 2025
2d77247
creating build function, to modularize operations
smitesh-sutaria Jul 25, 2025
a602a87
making the script executable
smitesh-sutaria Jul 25, 2025
c3480db
fix the errors
smitesh-sutaria Jul 25, 2025
04a4987
adding few enhancements
smitesh-sutaria Jul 25, 2025
6e97f3f
enhancements done.
smitesh-sutaria Jul 25, 2025
0bbf8c5
adding command line argument option
smitesh-sutaria Jul 25, 2025
6a9a648
readme additions to include the optional command line arguments.
smitesh-sutaria Jul 25, 2025
97ede63
adding build details
smitesh-sutaria Jul 25, 2025
c83e2be
Create idv-iso-builder
smitesh-sutaria Jul 26, 2025
c1b27e9
Rename idv-iso-builder to idv-iso-builder.yaml
smitesh-sutaria Jul 26, 2025
6c66df1
Update idv-iso-builder.yaml
smitesh-sutaria Jul 26, 2025
d3dd970
Update idv-iso-builder.yaml
smitesh-sutaria Jul 26, 2025
d9aea38
Update idv-iso-builder.yaml
smitesh-sutaria Jul 26, 2025
23f098d
Update idv-iso-builder.yaml
smitesh-sutaria Jul 26, 2025
91bcdfe
Update idv-iso-builder.yaml
smitesh-sutaria Jul 26, 2025
b79a61c
Update idv-iso-builder.yaml
smitesh-sutaria Jul 26, 2025
91f03f6
Update idv-iso-builder.yaml
smitesh-sutaria Jul 26, 2025
49f8ee4
Update idv-iso-builder.yaml
smitesh-sutaria Jul 26, 2025
6b223bd
Update idv-iso-builder.yaml
smitesh-sutaria Jul 26, 2025
805ce5f
Update idv-iso-builder.yaml
smitesh-sutaria Jul 26, 2025
bf6c11e
Update idv-iso-builder.yaml
smitesh-sutaria Jul 26, 2025
4962b62
Update idv-iso-builder.yaml
smitesh-sutaria Jul 26, 2025
bd26d53
few enchancements
smitesh-sutaria Jul 26, 2025
1041042
upating the links in readme
smitesh-sutaria Jul 26, 2025
5f41289
review comments taken care
smitesh-sutaria Jul 26, 2025
9b6dc29
adding link for available release tags
smitesh-sutaria Jul 26, 2025
089d40b
refactor readme
smitesh-sutaria Jul 26, 2025
2217f32
editing name of the build
smitesh-sutaria Jul 26, 2025
76443bc
refactor readme
smitesh-sutaria Jul 26, 2025
570b0ae
adding workflow option
smitesh-sutaria Jul 27, 2025
a29c49a
Update README.md
smitesh-sutaria Jul 27, 2025
c615e90
adding emt-dv-iso branch link
smitesh-sutaria Jul 27, 2025
e4de24f
Update README.md
smitesh-sutaria Jul 27, 2025
e8ec91a
Emt dv iso test (#66)
smitesh-sutaria Jul 31, 2025
af7395e
adding wifi related package: wpa_supplicant (#67)
smitesh-sutaria Jul 31, 2025
c90c119
Emt idv iso update build tag (#69)
smitesh-sutaria Aug 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/idv-iso-builder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
# SPDX-FileCopyrightText: (C) 2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

# This is a workflow that is triggered to build EMT desktop virtualization (IDV) ISO
name: EMT IDV ISO Builder
permissions:
contents: read
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
push:
branches:
- emt-dv-iso
- main
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
tag:
# description to be shown in the UI
description: 'release tag to be build'
# Default value if no value is explicitly provided
default: '3.0.20250806'
# Input has to be provided for the workflow to run
required: true
# The data type of the input
type: string

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
build-idv-iso:
# The type of runner that the job will run on
runs-on: ubuntu-24.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Runs a single command using the runners shell
- name: Build EMT IDV ISO
run: |
wget https://raw.githubusercontent.com/open-edge-platform/edge-desktop-virtualization/refs/heads/emt-dv-iso/emt-dv-iso/build_idv_iso.sh
chmod a+x build_idv_iso.sh
if [[ -z "${{ inputs.myInput }}" ]]; then

Check warning

Code scanning / zizmor

code injection via template expansion Warning

code injection via template expansion
./build_idv_iso.sh
else
./build_idv_iso.sh -t "${{ inputs.myInput }}"

Check warning

Code scanning / zizmor

code injection via template expansion Warning

code injection via template expansion
fi
ls -lrt
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.6.2
with:
# Artifact name
name: emt-idv-iso
# A file, directory or wildcard pattern that describes what to upload
path: idv*.iso
122 changes: 122 additions & 0 deletions emt-dv-iso/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
<!-- Copyright (C) 2025 Intel Corporation -->
# Building EMT ISO with Desktop Virtualization (graphics SR-IOV)

- [Building EMT ISO with Desktop Virtualization (graphics SR-IOV)](#building-emt-iso-with-desktop-virtualization-graphics-sr-iov)
- [Option-1 : Standalone (One-click) Build Script](#option-1--standalone-one-click-build-script)
- [Run the script with default parameters](#run-the-script-with-default-parameters)
- [Run the scripts with custom parameters](#run-the-scripts-with-custom-parameters)
- [ISO file will be generated in the same path](#iso-file-will-be-generated-in-the-same-path)
- [Demo : One-click EMT IDV ISO build script](#demo--one-click-emt-idv-iso-build-script)
- [Option-2 : Manual Steps](#option-2--manual-steps)
- [Pre-requisite](#pre-requisite)
- [Step 1: clone the EMT repo](#step-1-clone-the-emt-repo)
- [Step 2: Checkout the tag](#step-2-checkout-the-tag)
- [Step 3: Copy the idv.json to edge-microvisor-toolkit/toolkit/imageconfigs/](#step-3-copy-the-idvjson-to-edge-microvisor-toolkittoolkitimageconfigs)
- [Step 4: Build the tools](#step-4-build-the-tools)
- [Step 5: Build the ISO for desktop virtualization (IDV)](#step-5-build-the-iso-for-desktop-virtualization-idv)
- [Troubleshoot](#troubleshoot)
- [Clean build](#clean-build)
- [Working with Proxies](#working-with-proxies)
- [Option-3 : Github Actions](#option-3--github-actions)
- [Demo : EMT IDV ISO generation as part of github actions/workflow](#demo--emt-idv-iso-generation-as-part-of-github-actionsworkflow)

## Option-1 : Standalone (One-click) Build Script

> **Prerequisite** : Ubuntu 22.04 or Ubuntu 24.04

### Run the script with default parameters
```sh
sudo ./build_idv_iso.sh
```
Command line arguments are optional. Below default values will be used :
- Latest emt release tag : [3.0.20250718](https://github.com/open-edge-platform/edge-microvisor-toolkit/releases/tag/3.0.20250718)
- [idv.json](https://github.com/open-edge-platform/edge-desktop-virtualization/blob/emt-dv-iso/emt-dv-iso/idv.json)

### Run the scripts with custom parameters

Build script supports 2 custom parameters (optional):
1. [-t *tag-name*] : This is the git release tag-name against which build should run.
2. [-f *image-config-json-file*] : This is the emt image config .json file. One can generate the custom images using this config file.

For ex:
```sh
sudo ./build_idv_iso.sh -t 3.0.20250718 -f ./idv.json
```

### ISO file will be generated in the same path

<img width="736" height="175" alt="emt-idv-iso-out" src="https://github.com/user-attachments/assets/6666543c-1fa3-4517-93ba-82350b55be2b" />

### Demo : One-click EMT IDV ISO build script

https://github.com/user-attachments/assets/8e3f609b-9632-4ea6-807d-1560856a20db

## Option-2 : Manual Steps

The image configuration is part of this repo [here](./idv.json)

### Pre-requisite

[Build Requirements](https://github.com/open-edge-platform/edge-microvisor-toolkit/blob/3.0/toolkit/docs/building/prerequisites-ubuntu.md#build-requirements-on-ubuntu)

> The steps and build requirements are common across ubuntu-24.04 and ubuntu-22.04
> It is recommended to built against a stable/release tag.


### Step 1: clone the EMT repo
```sh
git clone https://github.com/open-edge-platform/edge-microvisor-toolkit
```
### Step 2: Checkout the tag
```sh
cd edge-microvisor-toolkit
git checkout tags/<tag_name>
```
> The release tags can be found [here](https://github.com/open-edge-platform/edge-microvisor-toolkit/releases)

### Step 3: Copy the idv.json to edge-microvisor-toolkit/toolkit/imageconfigs/
```sh
wget https://raw.githubusercontent.com/open-edge-platform/edge-desktop-virtualization/refs/heads/emt-dv-iso/emt-dv-iso/idv.json
cp idv.json toolkit/imageconfigs/
```
> One can copy any custom idv.json file as per the requirement.

### Step 4: Build the tools
```sh
cd toolkit
sudo make toolchain REBUILD_TOOLS=y
```
### Step 5: Build the ISO for desktop virtualization (IDV)
```sh
sudo make iso -j8 REBUILD_TOOLS=y REBUILD_PACKAGES=n CONFIG_FILE=./imageconfigs/idv.json
```
> ISO file will be generated @ 'edge-microvisor-toolkit/out/images'

### Troubleshoot

#### Clean build

For re-building with any other tags, its recommended to start clean and repeat above Steps 1 to 5.
```sh
cd edge-microvisor-toolkit
sudo make -C toolkit clean
```

#### Working with Proxies

If you are behind proxies and have them set, use -E option with all make commands
For ex :
```
sudo -E make toolchain REBUILD_TOOLS=y
sudo -E make iso -j8 REBUILD_TOOLS=y REBUILD_PACKAGES=n CONFIG_FILE=./imageconfigs/idv.json
```

## Option-3 : Github Actions

Generation of EMT IDV ISO can be part of github actions/workflow.

[Reference workflow file](https://raw.githubusercontent.com/open-edge-platform/edge-desktop-virtualization/refs/heads/emt-dv-iso/.github/workflows/idv-iso-builder.yaml)

### Demo : EMT IDV ISO generation as part of github actions/workflow

https://github.com/user-attachments/assets/66f508a0-c9c8-4f4e-9be7-f60a42a995fb
135 changes: 135 additions & 0 deletions emt-dv-iso/build_idv_iso.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
#!/bin/bash

# Copyright (C) 2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

set -eE
start_time=$(date +%s)
# Define color variables for readability
RED='\e[31m'
GREEN='\e[32m'
BLUE='\e[34m'
ENDCOLOR='\e[0m' # Reset to default color

# ------------------- Default Values ------------------------------

# Default tag. This will be the latest EMT release tag.
DEFAULT_TAG=3.0.20250806

# Default image config .json file. If this is NULL, default will be fetched from the repo.
DEFAULT_IDV_JSON_PATH=""
# This will be used only if above is NULL
DEFAULT_IDV_JSON_GIT_FETCH="https://raw.githubusercontent.com/open-edge-platform/edge-desktop-virtualization/refs/heads/emt-dv-iso/emt-dv-iso/idv.json"

# ------------------- Global Variables ----------------------------

# Git repo to build against. This can be any forked repo of EMT as well.
GIT_REPO=https://github.com/open-edge-platform/edge-microvisor-toolkit.git

# Full path of the image config JSON.
IDV_JSON_PATH=$DEFAULT_IDV_JSON_PATH

# If no TAG is provided by user, lets use the default tag
TAG=$DEFAULT_TAG

# Register the current directory
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

function launch_build() {
echo -e "${RED}------------------------- Build Details -----------------------------------${ENDCOLOR}"
echo -e "${BLUE}Current working directory : ${GREEN}$DIR ${ENDCOLOR}"
echo -e "${BLUE}No. of CPUs on the system : ${GREEN}$(nproc)${ENDCOLOR}"
echo -e "${BLUE}git repo to be used : ${GREEN}$GIT_REPO ${ENDCOLOR}"
echo -e "${BLUE}tag (a release tag) : ${GREEN}$TAG ${ENDCOLOR}"
echo -e "${BLUE}image config Json Path : ${GREEN}$IDV_JSON_PATH ${ENDCOLOR}"
echo -e "${BLUE}Json git fetch path (if above Json Path is NULL) : ${GREEN}$DEFAULT_IDV_JSON_GIT_FETCH ${ENDCOLOR}"
echo -e "${RED}--------------------------------------------------------------------------${ENDCOLOR}"

# clone the emt repo
echo -e "${BLUE}Cloning the EMT repo @${GREEN}${GIT_REPO}${ENDCOLOR}"
git clone $GIT_REPO
cd edge-microvisor-toolkit

# checkout the required TAG
echo -e "${BLUE}Checkout tag : ${GREEN}${TAG}${ENDCOLOR}"
git checkout $TAG

# pre-requisites
echo -e "${BLUE}Installing all the pre-requisites${ENDCOLOR}"
sudo ./toolkit/docs/building/prerequisites-ubuntu.sh
sudo ln -vsf /usr/lib/go-1.21/bin/go /usr/bin/go
sudo ln -vsf /usr/lib/go-1.21/bin/gofmt /usr/bin/gofmt
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER

# build the toolkit
cd toolkit
if [[ -z "$IDV_JSON_PATH" ]]; then
echo -e "${BLUE}JSON input not provided. Hence download the default one.${ENDCOLOR}"
wget $DEFAULT_IDV_JSON_GIT_FETCH
cp idv.json ./imageconfigs
else
echo -e "${BLUE}JSON input provided is : ${GREEN}$IDV_JSON_PATH${ENDCOLOR}"
cp $IDV_JSON_PATH ./imageconfigs/idv.json
fi
sudo make -j$(nproc) toolchain REBUILD_TOOLS=y VALIDATE_TOOLCHAIN_GPG=n

# build the iso image
sudo make iso -j$(nproc) REBUILD_TOOLS=y REBUILD_PACKAGES=n VALIDATE_TOOLCHAIN_GPG=n CONFIG_FILE=./imageconfigs/idv.json

# copy the generated iso to same parent folder
cp ../out/images/idv/*.iso ../../.

echo -e ${GREEN}"Build Successful!"
echo -e "${BLUE}Generated ISO available at : ${GREEN}$DIR${ENDCOLOR}"
echo -e ${BLUE}"Available ISO Files : " ${GREEN} $DIR/*.iso ${ENDCOLOR}
}

function cleanup() {
echo -e "${GREEN}Performing cleanup ${ENDCOLOR}"
cd $DIR
sudo rm -rf edge-microvisor-toolkit
end_time=$(date +%s)
runtime=$((end_time - start_time))
echo -e ${BLUE}"Total Build runtime: ${GREEN}$runtime seconds"${ENDCOLOR}
}

while getopts ':t:f:h' opt; do
case "$opt" in
t)
tag_arg="$OPTARG"
TAG=$tag_arg
echo "Processing option 't' with '${TAG}' argument"
;;

f)
file_arg="$OPTARG"
IDV_JSON_PATH=$(realpath "$file_arg")
echo "Processing option 'f' with '${IDV_JSON_PATH}' argument"
;;

h)
echo "Usage: $(basename $0) [-t tag-name] [-f image-config-json-file]"
exit 0
;;

:)
echo -e "option requires an argument.\nUsage: $(basename $0) [-t tag-name] [-f image-config-json-file]"
exit 1
;;

?)
echo -e "Invalid command option.\nUsage: $(basename $0) [-t tag-name] [-f image-config-json-file]"
exit 1
;;
esac
done
shift "$(($OPTIND -1))"

trap cleanup EXIT
trap cleanup ERR

#---------------------- main ------------------------

launch_build
Binary file added emt-dv-iso/docs/emt-idv-iso-out.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions emt-dv-iso/idv.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"SystemConfigs": [
{
"Name": "EMT-Desktop-Virtualization",
"PackageLists": [
"packagelists/grub2-mkconfig.json",
"packagelists/developer-packages.json",
"packagelists/virtualization-host-full-packages.json",
"packagelists/core-packages-image.json",
"packagelists/core-tools-packages.json",
"packagelists/ssh-server.json",
"packagelists/qemu-guest-packages.json",
"packagelists/xorg-x11-packages.json",
"packagelists/selinux-full.json",
"packagelists/intel-gpu-base.json",
"packagelists/drtm.json",
"packagelists/virt-guest-packages.json",
"packagelists/intel-wireless.json"
],
"Packages": [
"lsb-release",
"nbd",
"ntfs-3g",
"ntfs-3g-system-compression",
"ntfs-3g-libs",
"wpa_supplicant",
"igt-gpu-tools"
],
"KernelCommandLine": {
"ExtraCommandLine": "udmabuf.list_limit=8192 i915.enable_guc=3 i915.max_vfs=7 intel_iommu=on i915.force_probe=*",
"SELinux": "permissive"
},
"KernelOptions": {
"default": "kernel"
},
"AdditionalFiles": {
"additionalconfigs/99-dhcp-en.network": "/etc/systemd/network/99-dhcp-en.network"
},
"PostInstallScripts": [
{
"Path": "additionalconfigs/configure-systemd-networkd-client-identifier.sh"
}
]
}
]
}
Loading