logo
Alauda Container Platform
logo
Alauda Container Platform
Navigation

Overview

Architecture
Release Notes

Install

Overview

Prepare for Installation

Prerequisites
Download
Node Preprocessing
Installing
Global Cluster Disaster Recovery

Upgrade

Overview
Pre-Upgrade Preparation
Upgrade the global cluster
Upgrade Workload Clusters

User Interface

Web Console

Overview
Accessing the Web Console
Customizing the Web Console
Customizing the Left Navigation

CLI Tools

ACP CLI (ac)

Getting Started with ACP CLI
Configuring ACP CLI
Usage of ac and kubectl Commands
Managing CLI Profiles
Extending ACP CLI with Plugins
AC CLI Developer Command Reference
AC CLI Administrator Command Reference
violet CLI

Configure

Feature Gate

Clusters

Overview
Immutable Infrastructure

Node Management

Overview
Add Nodes to On-Premises Clusters
Manage Nodes
Node Monitoring

Managed Clusters

overview

Import Clusters

Overview
Import Standard Kubernetes Cluster
Import OpenShift Cluster
Import Amazon EKS Cluster
Import GKE Cluster
Import Huawei Cloud CCE Cluster (Public Cloud)
Import Azure AKS Cluster
Import Alibaba Cloud ACK Cluster
Import Tencent Cloud TKE Cluster
Register Cluster

Public Cloud Cluster Initialization

Network Initialization

AWS EKS Cluster Network Initialization Configuration
AWS EKS Supplementary Information
Huawei Cloud CCE Cluster Network Initialization Configuration
Azure AKS Cluster Network Initialization Configuration
Google GKE Cluster Network Initialization Configuration

Storage Initialization

Overview
AWS EKS Cluster Storage Initialization Configuration
Huawei Cloud CCE Cluster Storage Initialization Configuration
Azure AKS Cluster Storage Initialization Configuration
Google GKE Cluster Storage Initialization Configuration

How to

Network Configuration for Import Clusters
Fetch import cluster information
Trust an insecure image registry
Collect Network Data from Custom Named Network Cards
Creating an On-Premise Cluster
Hosted Control Plane
Cluster Node Planning
etcd Encryption

How to

Add External Address for Built-in Registry
Choosing a Container Runtime
Updating Public Repository Credentials

Backup and Recovery

Overview
Install
Backup repository

Backup Management

ETCD Backup
Create an application backup schedule
Hooks

Recovery Management

Run an Application Restore Task
Image Registry Replacement

Networking

Introduction

Architecture

Understanding Kube-OVN
Understanding ALB
Understanding MetalLB

Concepts

ALB with Ingress-NGINX Annotation Compatibility
Comparison Among Service, Ingress, Gateway API, and ALB Rule
GatewayAPI

Guides

Creating Services
Creating Ingresses
Creating a Domain Name
Creating Certificates
Creating External IP Address Pool
Creating BGP Peers
Configure Subnets
Configure Network Policies
Creating Admin Network Policies
Configuring Kube-OVN Network to Support Pod Multi-Network Interfaces (Alpha)
Configure Cluster Network Policies
Configure Egress Gateway
Network Observability
Configure ALB Rules
Cluster Interconnection (Alpha)
Endpoint Health Checker
NodeLocal DNSCache

How To

Preparing Kube-OVN Underlay Physical Network
Soft Data Center LB Solution (Alpha)
Automatic Interconnection of Underlay and Overlay Subnets
Install Ingress-Nginx via Cluster Plugin
Install Ingress-Nginx via Ingress Nginx Operator
Tasks for Ingress-Nginx

ALB

Auth
Deploy High Available VIP for ALB
Header Modification
HTTP Redirect
L4/L7 Timeout
ModSecurity
TCP/HTTP Keepalive
Use OAuth Proxy with ALB
Configure GatewayApi Gateway via ALB
Bind NIC in ALB
Decision‑Making for ALB Performance Selection
Deploy ALB
Forwarding IPv6 Traffic to IPv4 Addresses within the Cluster via ALB
OTel
ALB Monitoring
CORS
Load Balancing Session Affinity Policy in ALB
URL Rewrite
Calico Network Supports WireGuard Encryption
Kube-OVN Overlay Network Supports IPsec Encryption
DeepFlow User Guide

Trouble Shooting

How to Solve Inter-node Communication Issues in ARM Environments?
Find Who Cause the Error

Storage

Introduction

Concepts

Core Concepts
Persistent Volume
Access Modes and Volume Modes

Guides

Creating CephFS File Storage Type Storage Class
Creating CephRBD Block Storage Class
Create TopoLVM Local Storage Class
Creating an NFS Shared Storage Class
Deploy Volume Snapshot Component
Creating a PV
Creating PVCs
Using Volume Snapshots

How To

Generic ephemeral volumes
Using an emptyDir
Configuring Persistent Storage Using NFS
Third‑Party Storage Capability Annotation Guide

Troubleshooting

Recover From PVC Expansion Failure
Machine Configuration

Scalability and Performance

Evaluating Resources for Global Cluster
Evaluating Resources for Workload Cluster
Improving Kubernetes Stability for Large-Scale Clusters
Disk Configuration

Storage

Ceph Distributed Storage

Introduction

Install

Create Standard Type Cluster
Create Stretch Type Cluster
Architecture

Concepts

Core Concepts

Guides

Accessing Storage Services
Managing Storage Pools
Node-specific Component Deployment
Adding Devices/Device Classes
Monitoring and Alerts

How To

Configure a Dedicated Cluster for Distributed Storage
Cleanup Distributed Storage

Disaster Recovery

File Storage Disaster Recovery
Block Storage Disaster Recovery
Object Storage Disaster Recovery
Update the optimization parameters
Create Ceph Object Store User

MinIO Object Storage

Introduction
Install
Architecture

Concepts

Core Concepts

Guides

Adding a Storage Pool
Monitoring & Alerts

How To

Data Disaster Recovery

TopoLVM Local Storage

Introduction
Install

Guides

Device Management
Monitoring and Alerting

How To

Backup and Restore TopoLVM Filesystem PVCs with Velero

Security

Alauda Container Security

Security and Compliance

Compliance

Introduction
Install Alauda Container Platform Compliance with Kyverno

HowTo

Private Registry Access Configuration
Image Signature Verification Policy
Image Signature Verification Policy with Secrets
Image Registry Validation Policy
Container Escape Prevention Policy
Security Context Enforcement Policy
Network Security Policy
Volume Security Policy

API Refiner

Introduction
Install Alauda Container Platform API Refiner
About Alauda Container Platform Compliance Service

Users and Roles

User

Introduction

Guides

Manage User Roles
Create User
User Management

Group

Introduction

Guides

Manage User Group Roles
Create Local User Group
Manage Local User Group Membership

Role

Introduction

Guides

Create Role
Manage Custom Roles

IDP

Introduction

Guides

LDAP Management
OIDC Management

Troubleshooting

Delete User

User Policy

Introduction

Multitenancy(Project)

Introduction

Guides

Create Project
Manage Project Quotas
Manage Project
Manage Project Cluster
Manage Project Members

Audit

Introduction

Telemetry

Install

Certificates

Automated Kubernetes Certificate Rotation
cert-manager
OLM Certificates
Certificate Monitoring
Rotate TLS Certs of Platform Access Addresses

Virtualization

Virtualization

Overview

Introduction
Install

Images

Introduction

Guides

Adding Virtual Machine Images
Update/Delete Virtual Machine Images
Update/Delete Image Credentials

How To

Creating Windows Images Based on ISO using KubeVirt
Creating Linux Images Based on ISO Using KubeVirt
Exporting Virtual Machine Images
Permissions

Virtual Machine

Introduction

Guides

Creating Virtual Machines/Virtual Machine Groups
Batch Operations on Virtual Machines
Logging into the Virtual Machine using VNC
Managing Key Pairs
Managing Virtual Machines
Monitoring and Alerts
Quick Location of Virtual Machines

How To

Configuring USB host passthrough
Virtual Machine Hot Migration
Virtual Machine Recovery
Clone Virtual Machines on KubeVirt
Physical GPU Passthrough Environment Preparation
Configuring High Availability for Virtual Machines
Create a VM Template from an Existing Virtual Machine

Troubleshooting

Pod Migration and Recovery from Abnormal Shutdown of Virtual Machine Nodes
Hot Migration Error Messages and Solutions

Network

Introduction

Guides

Configure Network

How To

Control Virtual Machine Network Requests Through Network Policy
Configuring SR-IOV
Configuring Virtual Machines to Use Network Binding Mode for IPv6 Support

Storage

Introduction

Guides

Managing Virtual Disks

Backup and Recovery

Introduction

Guides

Using Snapshots

Developer

Overview

Quick Start

Creating a simple application via image

Building Applications

Build application architecture

Concepts

Application Types
Custom Applications
Workload Types
Understanding Parameters
Understanding Environment Variables
Understanding Startup Commands
Resource Unit Description

Namespaces

Creating Namespaces
Importing Namespaces
Resource Quota
Limit Range
Pod Security Admission
UID/GID Assignment
Overcommit Ratio
Managing Namespace Members
Updating Namespaces
Deleting/Removing Namespaces

Creating Applications

Creating applications from Image
Creating applications from Chart
Creating applications from YAML
Creating applications from Code
Creating applications from Operator Backed
Creating applications by using CLI

Operation and Maintaining Applications

Application Rollout

Installing Alauda Container Platform Argo Rollouts
Application Blue Green Deployment
Application Canary Deployment
Status Description

KEDA(Kubernetes Event-driven Autoscaling)

KEDA Overview
Installing KEDA

How To

Integrating ACP Monitoring with Prometheus Plugin
Pausing Autoscaling in KEDA
Configuring HPA
Starting and Stopping Applications
Configuring VerticalPodAutoscaler (VPA)
Configuring CronHPA
Updating Applications
Exporting Applications
Updating and deleting Chart Applications
Version Management for Applications
Deleting Applications
Handling Out of Resource Errors
Health Checks

Workloads

Deployments
DaemonSets
StatefulSets
CronJobs
Jobs
Pods
Containers
Working with Helm charts

Configurations

Configuring ConfigMap
Configuring Secrets

Application Observability

Monitoring Dashboards
Logs
Events

How To

Setting Scheduled Task Trigger Rules

Images

Overview of images

How To

Creating images
Managing images

Registry

Introduction

Install

Install Via YAML
Install Via Web UI

How To

Common CLI Command Operations
Using Alauda Container Platform Registry in Kubernetes Clusters

Source to Image

Overview

Introduction
Architecture
Release Notes
Lifecycle Policy

Install

Installing Alauda Container Platform Builds

Upgrade

Upgrading Alauda Container Platform Builds

Guides

Managing applications created from Code

How To

Creating an application from Code

Node Isolation Strategy

Introduction
Architecture

Concepts

Core Concepts

Guides

Create Node Isolation Strategy
Permissions
FAQ

GitOps

Introduction

Install

Installing Alauda Build of Argo CD
Installing Alauda Container Platform GitOps

Upgrade

Upgrading Alauda Container Platform GitOps
Architecture

Concepts

GitOps

Argo CD Concept

Introduction
Application
ApplicationSet
Tool
Helm
Kustomize
Directory
Sync
Health

Alauda Container Platform GitOps Concepts

Introduction
Alauda Container Platform GitOps Sync and Health Status

Guides

Creating GitOps Application

Creating GitOps Application
Creating GitOps ApplicationSet

GitOps Observability

Argo CD Component Monitoring
GitOps Applications Ops

How To

Integrating Code Repositories via Argo CD dashboard
Creating an Argo CD Application via Argo CD dashboard
Creating an Argo CD Application via the web console
How to Obtain Argo CD Access Information
Troubleshooting

Extend

Overview
Operator
Cluster Plugin
Chart Repository
Upload Packages

Observability

Overview

Monitoring

Introduction
Install

Architecture

Monitoring Module Architecture
Monitoring Component Selection Guide
Monitor Component Capacity Planning
Concepts

Guides

Management of Metrics
Management of Alert
Management of Notification
Management of Monitoring Dashboards
Management of Probe

How To

Backup and Restore of Prometheus Monitoring Data
VictoriaMetrics Backup and Recovery of Monitoring Data
Collect Network Data from Custom-Named Network Interfaces

Distributed Tracing

Introduction
Install
Architecture
Concepts

Guides

Query Tracing
Query Trace Logs

How To

Non-Intrusive Integration of Tracing in Java Applications
Business Log Associated with the TraceID

Troubleshooting

Unable to Query the Required Tracing
Incomplete Tracing Data

Logs

Introduction
Install

Architecture

Log Module Architecture
Log Component Selection Guide
Log Component Capacity Planning
Concepts

Guides

Logs

How To

How to Archive Logs to Third-Party Storage
How to Interface with External ES Storage Clusters

Events

Introduction
Events

Inspection

Introduction
Architecture

Guides

Inspection
Component Health Status

Hardware accelerators

About Alauda Build of Hami
About Alauda Build of NVIDIA GPU Device Plugin

Alauda Service Mesh

Service Mesh 1.x
Service Mesh 2.x

Alauda AI

About Alauda AI

Alauda DevOps

About Alauda DevOps

Alauda Cost Management

About Alauda Cost Management

Alauda Application Services

Overview

Introduction
Architecture
Install
Upgrade

Alauda Database Service for MySQL

About Alauda Database Service for MySQL-MGR
About Alauda Database Service for MySQL-PXC

Alauda Cache Service for Redis OSS

About Alauda Cache Service for Redis OSS

Alauda Streaming Service for Kafka

About Alauda Streaming Service for Kafka

Alauda Streaming Service for RabbitMQ

About Alauda Streaming Service for RabbitMQ

Alauda support for PostgreSQL

About Alauda support for PostgreSQL

Operations Management

Introduction

Parameter Template Management

Introduction

Guides

Parameter Template Management

Backup Management

Introduction

Guides

External S3 Storage
Backup Management

Inspection Management

Introduction

Guides

Create Inspection Task
Exec Inspection Task
Update and Delete Inspection Tasks

How To

How to set Inspection scheduling?

Inspection Optimization Recommendations

MySQL

MySQL IO Load Optimization
MySQL Memory Usage Optimization
MySQL Storage Space Optimization
MySQL Active Thread Count Optimization
MySQL Row Lock Optimization

Redis

Redis BigKey
High CPU Usage in Redis
High Memory Usage in Redis

Kafka

High CPU Utilization in Kafka
Kafka Rebalance Optimization
Kafka Memory Usage Optimization
Kafka Storage Space Optimization

RabbitMQ

RabbitMQ Mnesia Database Exception Handling

Alert Management

Introduction

Guides

Relationship with Platform Capabilities

Upgrade Management

Introduction

Guides

Instance Upgrade

API Reference

Overview

Introduction
Kubernetes API Usage Guide

Advanced APIs

Alert APIs

Alert [v1beta1]
AlertHistories [v1]
AlertHistoryMessages [v1]
AlertStatus [v2]
Silence [v1beta1]
SilenceStatus [v2]

Event APIs

Search

Log APIs

Aggregation
Archive
Context
Search

Monitoring APIs

Indicators [monitoring.alauda.io/v1beta1]
Metrics [monitoring.alauda.io/v1beta1]
Variables [monitoring.alauda.io/v1beta1]

RBAC APIs

UserBinding [auth.alauda.io/v1]

Token APIs

AccessToken [v1]

User APIs

Pubkey [v1]
User [v1]

Kubernetes APIs

Alert APIs

AlertTemplate [alerttemplates.aiops.alauda.io/v1beta1]
PrometheusRule [prometheusrules.monitoring.coreos.com/v1]

AutoScaling APIs

HorizontalPodAutoscaler [autoscaling/v2]

Configuration APIs

ConfigMap [v1]
Secret [v1]

Connector APIs

Connector [dex.coreos.com/v1]

Event APIs

Event [v1]

Inspection APIs

Inspection [inspections.ait.alauda.io/v1alpha1]

MachineConfiguration APIs

MachineConfig [machineconfiguration.alauda.io/v1alpha1]
MachineConfigPool [machineconfiguration.alauda.io/v1alpha1]
MachineConfiguration [machineconfiguration.alauda.io/v1alpha1]

Metric APIs

Metrics Node [v1beta1]
Metrics Pod [v1beta1]

ModulePlugin APIs

ModuleConfig [moduleconfigs.cluster.alauda.io/v1alpha1]
ModuleInfo [moduleinfoes.cluster.alauda.io/v1alpha1]
ModulePlugin [moduleplugins.cluster.alauda.io/v1alpha1]

Namespace APIs

LimitRange [v1]
Namespace [v1]
ResourceQuota [v1]

Networking APIs

HTTPRoute [httproutes.gateway.networking.k8s.io/v1]
Service [v1]
VpcEgressGateway [vpc-egress-gateways.kubeovn.io/v1]
Vpc [vpcs.kubeovn.io/v1]

Node APIs

Node [v1]

Notification APIs

Notification [notifications.ait.alauda.io/v1beta1]
NotificationGroup [notificationgroups.ait.alauda.io/v1beta1]
NotificationTemplate [notificationtemplates.ait.alauda.io/v1beta1]

Operator APIs

Operator [operators.operators.coreos.com/v1]

Project APIs

Project [auth.alauda.io/v1]

RBAC APIs

ClusterRole [rbac.authorization.k8s.io/v1]
ClusterRoleBinding [rbac.authorization.k8s.io/v1]
Role [rbac.authorization.k8s.io/v1]
RoleBinding [rbac.authorization.k8s.io/v1]
RoleTemplate [auth.alauda.io/v1beta1]

ServiceAccount APIs

ServiceAccount [v1]
TokenRequest [authentication.k8s.io/v1]

Storage APIs

PersistentVolume [v1]
PersistentVolumeClaim [v1]

Token APIs

AccessTokenInfo [auth.alauda.io/v1]

User APIs

User [auth.alauda.io/v1]

Workload APIs

Cronjob [batch/v1]
DameonSet [apps/v1]
Deployment [apps/v1]
Job [batch/v1]
Pod [v1]
Replicaset [apps/v1]
ReplicationController [v1]
Statefulset [apps/v1]
📝 Edit this page on GitHub
Previous PageHow To
Next PageCreating Linux Images Based on ISO Using KubeVirt

View full docs as PDF

#Creating Windows Images Based on ISO using KubeVirt

This document discusses a virtual machine solution based on the open-source component KubeVirt, using KubeVirt virtualization technology to create a Windows operating system image through an ISO image file.

#TOC

#Prerequisites

  • All components in the cluster are functioning correctly.

  • Please prepare the Windows image and the latest virtio-win-tools in advance.

  • Please prepare the repository for storing the image. This document takes the build-harbor.example.cn repository as an example, and please replace it according to your actual environment.

#Constraints and Limitations

  • When starting KubeVirt, the size of the custom image's filesystem will affect the speed of writing the image to the disk in PVC. If the filesystem is too large, it may result in extended creation times.

  • It is recommended to keep the Linux root partition or Windows C drive below 100G to minimize the initial size. Subsequent expansion can be done through cloud-init (for Windows systems, it must be expanded manually after creation).

#Procedure

#Create Image

Create a Docker image from the prepared Windows and virtio-win ISO images, and push it to the repository. This document uses Windows Server 2019 as an example.

Create a Docker Image from the Windows ISO

  1. Navigate to the directory where the ISO image is stored, and execute the following command in the terminal to rename the ISO image to win.iso.

    mv <ISO image name> win.iso # Replace <ISO image name> with the actual image name, e.g., mv en_windows_server_2019_x64_dvd_4cb967d8.iso win.iso
  2. Execute the following command to create a Dockerfile.

    touch Dockerfile
  3. Edit the Dockerfile, add the following content, and save it.

    FROM scratch
    ADD --chown=107:107 win.iso /disk/
  4. Execute the following command to build the Docker image.

    docker build -t build-harbor.example.cn/3rdparty/vmdisks/winiso:2019 . # Replace the repository according to your actual environment
  5. Execute the following command to push the image to the repository.

    docker push  build-harbor.example.cn/3rdparty/vmdisks/winiso:2019 # Replace the repository according to your actual environment

Create a Docker Image from the virtio-win ISO

  1. Navigate to the directory where the ISO image is stored, and execute the following command in the terminal to create a Dockerfile.

    touch Dockerfile
  2. Edit the Dockerfile, add the following content, and save it.

    FROM scratch
    ADD --chown=107:107 virtio-win.iso  /disk/
  3. Execute the following command to build the Docker image.

    docker build -t build-harbor.example.cn/3rdparty/vmdisks/win-virtio:latest . # Replace the repository according to your actual environment
  4. Execute the following command to push the image to the repository.

    docker push  build-harbor.example.cn/3rdparty/vmdisks/win-virtio:latest # Replace the repository according to your actual environment

#Create Virtual Machine

  1. Access the Container Platform.

  2. In the left navigation bar, click on Virtualization > Virtual Machines.

  3. Click on Create Virtual Machine.

  4. Fill in the necessary parameters such as Name, Image, etc., in the form page. For detailed parameters and configuration, please refer to Create Virtual Machine.

  5. Switch to YAML.

  6. Replace the configuration under the spec.template.spec.domain.devices.disks field with the following content.

      domain:
        devices:
          disks:
            - disk:
                bus: virtio
              name: cloudinitdisk
            - bootOrder: 1
              cdrom:
                bus: sata
              name: containerdisk
            - cdrom:
                bus: sata
              name: virtio
            - disk:
                bus: sata
              name: rootfs
              bootOrder: 10
  7. Add the following content under the spec.template.spec.volumes field.

            - containerDisk:
                image: registry.example.cn:60070/3rdparty/vmdisks/winiso:2019 # Replace the image according to your actual environment
              name: containerdisk
            - containerDisk:
                image: registry.example.cn:60070/3rdparty/vmdisks/win-virtio # Replace the image according to your actual environment
              name: virtio
  8. Check the YAML file. The complete YAML after finishing the configuration is as follows.

    apiVersion: kubevirt.io/v1alpha3
    kind: VirtualMachine
    metadata:
      annotations:
        cpaas.io/creator: test@example.io
        cpaas.io/display-name: ""
        cpaas.io/updated-at: 2024-09-01T14:57:55Z
        kubevirt.io/latest-observed-api-version: v1
        kubevirt.io/storage-observed-api-version: v1
      generation: 16
      labels:
        virtualization.cpaas.io/image-name: debian-2120-x86
        virtualization.cpaas.io/image-os-arch: amd64
        virtualization.cpaas.io/image-os-type: debian
        virtualization.cpaas.io/image-supply-by: public
        vm.cpaas.io/name: aa-test
      name: aa-test
      namespace: acp-service-self
    spec:
      dataVolumeTemplates:
        - metadata:
            creationTimestamp: null
            labels:
              vm.cpaas.io/reclaim-policy: Delete
              vm.cpaas.io/used-by: aa-test
            name: aa-test-rootfs
          spec:
            pvc:
              accessModes:
                - ReadWriteOnce
              resources:
                requests:
                  storage: 100Gi
              storageClassName: vm-cephrbd
              volumeMode: Block
            source:
              http:
                url: http://192.168.254.12/kube-debian-12.2.0-x86-out.qcow2
      running: true
      template:
        metadata:
          annotations:
            cpaas.io/creator: test@example.io
            cpaas.io/display-name: ""
            cpaas.io/updated-at: 2024-09-01T14:55:44Z
            kubevirt.io/latest-observed-api-version: v1
            kubevirt.io/storage-observed-api-version: v1
          creationTimestamp: null
          labels:
            virtualization.cpaas.io/image-name: debian-2120-x86
            virtualization.cpaas.io/image-os-arch: amd64
            virtualization.cpaas.io/image-os-type: debian
            virtualization.cpaas.io/image-supply-by: public
            vm.cpaas.io/name: aa-test
        spec:
          affinity:
            nodeAffinity: {}
          architecture: amd64
          domain:
            devices:
              disks:
                - disk:
                    bus: virtio
                  name: cloudinitdisk
                - bootOrder: 1
                  cdrom:
                    bus: sata
                  name: containerdisk
                - cdrom:
                    bus: sata
                  name: virtio
                - disk:
                    bus: sata
                  name: rootfs
                  bootOrder: 10
               interfaces:
                - bridge: {}
                  name: default
            machine:
              type: q35
            resources:
              limits:
                cpu: "4"
                memory: 8Gi
              requests:
                cpu: "4"
                memory: 8Gi
          networks:
            - name: default
              pod: {}
          nodeSelector:
            kubernetes.io/arch: amd64
            vm.cpaas.io/baremetal: "true"
          volumes:
            - cloudInitConfigDrive:
                userData: >-
                  #cloud-config
                  disable_root: false
                  ssh_pwauth: true
                  users:
                    - default
                    - name: root
                      lock_passwd: false
                      hashed_passwd: $6$0vlhl57e$0rawYwaeu9jL6hBf3XP9lk6XXaMUS9/W6LPbWRinUoXujo39lP3l98VOcOObtr.LDoAv/ylm85FLQmxwNlWFe/
              name: cloudinitdisk
            - containerDisk:
                image: registry.example.cn:60070/3rdparty/vmdisks/winiso:2019 # Replace the image according to your actual environment
              name: containerdisk
              - containerDisk
                 image: registry.example.cn:60070/3rdparty/vmdisks/win-virtio # Replace the image according to your actual environment
               name: virtio
             - dataVolume:
                name: aa-test-rootfs
              name: rootfs
  9. Click Create.

  10. Click Actions > VNC Login.

  11. When the prompt press any key boot from CD or DVD appears, press any key to enter the Windows installation program; if you do not see the prompt, click on Send Remote Command in the top left of the page, then select Ctrl-Alt-Delete from the dropdown menu to restart the server.

    Note: If a message appears at the top of the virtual machine details page stating The current virtual machine has configuration changes that require a restart to take effect, please restart, this message can be ignored; no restart is necessary.

#Install Windows Operating System

  1. Follow the installation instructions to install the system after entering the installation page.

    Note: During the partition selection step, the bus must be sata for the disk to be correctly recognized. Therefore, you need to select each partition in turn and click Delete to remove all partitions, allowing the system to handle it automatically.

  2. After configuring the administrator account password, click Send Remote Command in the top left of the page, then select Ctrl-Alt-Delete from the dropdown menu.

  3. When prompted The Ctrl+Alt+Delete combination will restart the server, confirm to restart, click OK.

  4. Enter the password to access the Windows system desktop; at this point, the Windows operating system installation is complete.

#Install virtio-win-tools

This tool primarily contains the necessary drivers.

  1. Open File Explorer.

  2. Double-click CD Drive(E:) virtio-win-<version>, run the virtio-win-guest-tools directory to enter the installation page, and follow the installation instructions. The <version> part should be based on the actual situation.

  3. After the installation is complete, power off the Windows system.

#Export Custom Windows Image

Please refer to Export Virtual Machine Image for the specific operation.

#Use Windows Image

  1. Access the Container Platform.

  2. In the left navigation bar, click on Virtualization > Virtual Machines.

  3. Click on Create Virtual Machine.

  4. Fill in the necessary parameters on the form page. For the image, select the exported Windows image. For detailed parameters and configuration, please refer to Create Virtual Machine.

  5. (Optional) If using a newer operating system, such as Windows 11, enable features like clock, UEFI, TPM, etc. Switch to YAML and replace the original YAML file with the following YAML file.

    apiVersion: kubevirt.io/v1
    kind: VirtualMachineInstance
    metadata:
      labels:
        special: vmi-windows
      name: vmi-windows
    spec:
      domain:
        clock:
          timer:
            hpet:
              present: false
            hyperv: {}
            pit:
              tickPolicy: delay
            rtc:
              tickPolicy: catchup
          utc: {}
        cpu:
          cores: 2
        devices:
          disks:
          - disk:
              bus: sata
            name: pvcdisk
          interfaces:
          - masquerade: {}
            model: e1000
            name: default
          tpm: {}
        features:
          acpi: {}
          apic: {}
          hyperv:
            relaxed: {}
            spinlocks:
              spinlocks: 8191
            vapic: {}
          smm: {}
        firmware:
          bootloader:
            efi:
              secureBoot: true
          uuid: 5d307ca9-b3ef-428c-8861-06e72d69f223
        resources:
          requests:
            memory: 4Gi
      networks:
      - name: default
        pod: {}
      terminationGracePeriodSeconds: 0
      volumes:
      - name: pvcdisk
        persistentVolumeClaim:
          claimName: disk-windows
      - name: winiso
        persistentVolumeClaim:
          claimName: win11cd-pvc
  6. Click Create.

#Add Internal Route

By configuring a NodePort type internal route, expose the port for remote desktop connections.

  1. Access the Container Platform.

  2. In the left navigation bar, click on Virtualization > Virtual Machines.

  3. Click on the virtual machine name created with the Windows image in the list to enter the details page.

  4. Click on the Add icon next to Internal Route in the Login Information area.

  5. Configure parameters according to the following instructions.

    ParameterDescription
    TypeSelect NodePort.
    Port
    • Protocol: Select TCP.
    • Service Port: Use 3389.
    • Virtual Machine Port: Use 3389.
    • Service Port Name: Use rdp.
  6. Click OK to return to the details page.

  7. Click on the Internal Route link in the Login Information area.

  8. Save the Virtual IP information in the basic information area and the Host Port information in the port area.

#Remote Access

This document discusses using the Windows operating system for remote connection as an example. Other operating systems can use software that supports the RDP protocol for connection.

  1. Open Remote Desktop Connection.

  2. Enter the saved Virtual IP and Host Port from the Add Internal Route step, formatted as Virtual IP:Host Port, for example: 192.1.1.1:3389 .

  3. Click Connect.