To add an OpenStack image for use with a Horizon Cloud on OpenStack Edge, you must first add an image in your Private Cloud Director or define an image by using your OpenStack open-source solution. The Horizon Cloud Image Management System (IMS) is not currently available for Horizon Cloud on OpenStack.
Note: Horizon Cloud on OpenStack is currently available in Limited Availability (LA) mode only.
This example procedure assumes the use of a Platform9 Private Cloud Director (PCD) host environment, rather than that of an OpenStack open-source solution provider. The sample screens are provided for flow guidance only as you work through the steps.
Step 1 - Upload Windows and VirtIO ISO files
-
Obtain your Windows Desktop .iso.
-
Obtain the KVM VirtIO Drivers .iso for Windows. For details, see Creating Windows virtual machines using virtIO drivers in Fedora documentation.
-
Log in to your Private Cloud Director console and click Virtual Machines > Images > Add Image.

-
Select the .iso file, give it a name, and select iso as the Disk format. Select Add Image to start the upload process.

-
Repeat the above steps for the VirtIO Windows Drivers .iso file.
Step 2 - Create attachable Volumes for Windows and VirtIO .iso files
-
In the Private Cloud Director console, click Storage > Volumes and then select Create New Volume.

-
Select Image as the source and then search for and select your uploaded Windows .iso file.

-
Give the new volume a name and ensure its size is slightly larger than the .iso. Also ensure that you mark this volume as bootable so that it can be used to boot the Windows Setup.

-
Repeat the above steps for the VirtIO Windows Drivers .iso. Note that you do not need to mark the VirtIO Volume as bootable.
Step 3 - Create a Windows Virtual Machine via Command Line
-
Ensure that the OpenStack Client CLI tools are installed on your system. See Install the OpenStack command-line clients in OpenStack product documentation.
-
To obtain the required environment variables, select the cog/gear icon in the top right corner of the PCD console and then select API Access.

-
Copy the environment variables to a temporary text file. You will need to copy and paste these shortly.

-
Ensure that you have direct network connectivity (VPN or LAN) to the Infrastructure Hosts.
In the next steps you will create the Virtual Machine in PCD. You must complete these next steps using the CLI. Creating a Virtual Machine with the required parameters is not available using the UI.
-
Begin the process of creating the VM by opening a terminal on your device. Paste the environment variables that you copied from the previous step into the terminal. Be sure to update environment variable values such as
OS_USERNAMEandOS_PASSWORDwith your specific values.
Sample environment variable commands are as below:
export OS_USERNAME=MyName@companyname.com export OS_PASSWORD=MySecretPassword export OS_AUTH_URL=https://hcs-regionone.app.staging-pcd.platform9.com/keystone/v3 export OS_AUTH_TYPE=password export OS_IDENTITY_API_VERSION=3 export OS_REGION_NAME=RegionOne export OS_USER_DOMAIN_NAME=Default export OS_PROJECT_DOMAIN_NAME=Default export OS_PROJECT_NAME=service export OS_INTERFACE=public -
Add two new environment variables for
Virtual Machine Volume NameandVirtual Machine Nameas below.export VM_VOL_NAME=APM-W11-Vol1 export VM_NAME=APM-W11-MasterImage -
Create a new Volume (Virtual Hard Disk for C:) for the VM. A sample command line is shown below that uses the $VM_VOL_NAME variable that you just created.
openstack volume create --size 80 -- bootable $VM_VOL_NAME -
Copy the ID of the newly created volume and create a new variable for the Volume ID. A sample command and reference image is shown below.
export VM_VOL_ID=3df9859e-e10f-438b-88b1-8ef109f8a1d6
-
In the same terminal window, set the required parameters on the Volume for Windows. Sample commands are shown below:
openstack volume set \ --image-property hw_boot_menu=true \ --image-property hw_firmware_type=uefi \ --image-property hw_machine_type=q35 \ --image-property hw_tpm_model=tpm-crb \ --image-property hw_tpm_version=2.0 \ --image-property hw_cdrom_bus=sata \ --image-property hw_disk_bus=scsi \ --image-property hw_scsi_model=virtio-scsi \ --image-property os_secure_boot=required \ --image-property os_type=windows \ $VM_VOL_NAME -
Locate the Volume ID for your Windows .iso Volume.
openstack volume list -
Copy the ID of the Windows .iso Volume and create a new variable for the Windows .iso Volume.
export WINISO_VOL_ID=de8c8727-b77d-4335-be7f-7d580046c82f -
Copy the ID of the VirtIO .iso Volume and create a new variable for the VirtIO .iso Volume.
export VIRTIO_VOL_ID=d1f6b83a-512a-41b9-a59c-52643adf87e -
Identify the ID of the Network for the Virtual Machine.
openstack network list -
Create the Virtual Machine. Note that Server is the terminology for a VM in OpenStack.
Note: Ensure that
$WINISO_VOL_IDis set asboot_index=2so that it boots initially when there is no OS, so that the Windows Volume will be first to boot when installed.openstack server create \ --flavor m1.medium \ --network $NETWORK_ID \ --block-device source_type=volume,uuid=$VM_VOL_ID,destination_type=volume,device_type=disk,boot_index=0 \ --block-device source_type=volume,uuid=$WINISO_VOL_ID,destination_type=volume,device_type=cdrom,boot_index=1 \ --block-device source_type=volume,uuid=$VIRTIO_VOL_ID,destination_type=volume,device_type=cdrom,boot_index=2 \ $VM_NAME
Step 4 - Install Windows in the Virtual Machine
-
In the PCD console, click Virtual Machine in the left pane navigation and click the Virtual Machines tab to locate and select your VM (for example, APM-W11-MasterImage).
-
Click Console to view the VM's console window.
-
Continue through the setup procedure until you are prompted for an install location.
-
When prompted to select the location to install Windows 11, click Load Driver.
There are no drivers natively available for a KVM VM disk. You must use the VirtIO .iso to install the driver to continue.
-
Locate the
virtio-winmounted .iso and select theE:\amd64\w11folder. This folder contains the driver for the VirtIO Disk Controller.
-
Proceed to install Windows as normal.
-
When prompted Is this the right country or region?, enter Audit Mode by pressing Ctrl+Shift+F3 as prompted.
-
When Windows reboots, locate the virtio-win mounted .iso and install the VirtIO-Win-Drivers from the disk.

-
After installing the drivers, reboot the VM to prepare for the next steps.
Step 5 - Download and Install Horizon Agents
-
Log in to your Omnissa Customer Connect account and download the latest Horizon Agents Installer (HAI) at Horizon Agents Installer 64-Bit.
-
Accept the default install parameters (you can optionally enable additional checkboxes), select the Automatically restart system on successful completion checkbox, and click Proceed with installation.
Step 6 - Install and Configure Cloudbase-Init
-
Download Cloudbase-Init. See Cloudbase-Init.
You do not need to specify any details to download the installer. Scroll down the page until you see a link that says No, just show me the downloads and click that link.
-
Select Run Cloudbase-Init services as LocalSystem.
-
After Cloudbase-Init is installed, go to
C:\Program Files\Cloudbase Solutions\Cloudbase-Init\confand opencloudbase-init.conf. -
Replace the entire contents of
cloudbase-init.confwith the following entries and then save the file.[DEFAULT] verbose=true debug=true log_dir=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\log\ log_file=cloudbase-init.log default_log_levels=comtypes=INFO,suds=INFO,iso8601=WARN,requests=WARN mtu_use_dhcp_config=true ntp_use_dhcp_config=true local_scripts_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\LocalScripts\ check_latest_version=false metadata_services=cloudbaseinit.metadata.services.httpservice.HttpService plugins=cloudbaseinit.plugins.common.sethostname.SetHostNamePlugin,cloudbaseinit.plugins.common.userdata.UserDataPlugin allow_reboot=false -
Prepare the Guest OS as described at Prepare a Guest Windows Operating System for Remote Desktop Deployment in Horizon product documentation with the following exceptions:
- Ignore the steps that direct you to install Omnissa Tools.
- Do not add the Virtual Machine to the domain.
- Do not generalize with Sysprep at this stage.
- Ignore the steps that direct you to install Omnissa Tools.
Step 7 - Download and Run the Windows OS Optimization Tool for Horizon
-
Download the most recent OS Optimization Tool from Omnissa Customer Connect at Download OS Optimization Tool.
-
From the OS Optimization Tool (OSOT) top bar menu, select Optimize to run the optimization phase of the Windows OS Optimization Tool phase.

-
Click the Analyze button and then click the Optimize button to specify the selected optimizations for the VM.


-
From the same OSOT top bar menu where you selected Optimize previously, select Generalize to run the generalize phase of the Windows OS Optimization Tool.
-
On the resultant Instructions page, leave the administrator Password field blank, ensure that the Automatic Restart checkbox is enabled, and then click Generalize.
After the VM reboots, it will no longer be in Audit Mode and the VM will automatically log in as the Administrator account.
Potential issue and workaround: If generalization fails and the VM does not automatically reboot, review the log files at
C:\Windows\System32\Sysprep\Panther. If you see log entry content that is similar to the following:BiUpdateEfiEntry failed c000000d BiExportBcdObjects failed c000000d BiExportStoreAlterationsToEfi failed c000000d Failed to export alterations to firmware. Status: c000000dAfterwards, try the following workaround on the VM:
- Go to Start > Run >
tpm.msc. - Select Clear TPM on the right side panel.
- When prompted to reboot, select OK and the machine should then proceed as expected.
- Go to Start > Run >
-
Create a backup Local Administrator account on the VM Tto provide a way to log into the machine when disabling the built-in Administrator account.

-
For security purposes, set a password on the Administrator account.
-
From the same OSOT top bar menu where you selected Generalize previously, select Finalize to run the finalization phase of the Windows OS Optimization Tool.
-
From the resultant page, accept the default checkbox selections and click Finalize.
This action will take several minutes to complete. Allow this phase of the optimization tool to complete before proceeding.
Step 8 - Finalize the Snapshot VM Configuration for Deployment
-
In the Private Cloud Director console, power off the virtual machine by selecting the VM (for example, APM-GoldenImage-v1) and clicking Power Actions > Stop. THe Power Actions menu is available by clicking the 3 vertical dots on the far right of the UI.
-
From the same 3 vertical dots on the far right of the UI as above, click Other Actions > Manage Volumes.
-
Detach the VirtIO and Windows Installer volumes only. A sample screen is shown below.

-
Edit the snapshot VM and set the
block_device_mappingproperties to set"delete_on_termination": true. -
In the left pane navigation, click Virtual Machines > Images. Select the VM Snapshots tab and select your snapshot.
-
Select Edit Properties and locate the
block_device_mappingproperty. In its value field, find the key nameddelete_on_termination, change its value fromfalsetotrue, and click Update Properties.
Was deze pagina nuttig?