Showing posts with label VMware. Show all posts
Showing posts with label VMware. Show all posts

Sunday, May 26, 2024

Sunday, October 2, 2022

Ansible playbook for Ubuntu automated customization

Setting up Linux as a virtual desktop for VMware Horizon could be a painful and very time consuming procedure. Few years ago VMware have published a prebuilt Ubuntu 18.04 virtual appliance with a shell script to automate multiple routine tasks to prepare a virtual desktop. You can download the script separately from the repository on GitHub: https://github.com/thatvirtualboy/horizon-linux-vm

Unfortunately, this project has not been updated for many years, and it is not suitable for the new versions of Ubuntu 20.04 and Ubuntu 22.04 without modifications.

So I prepared a small playbook for Ansible to automate Ubuntu 18.04 / 20.04 / 22.04 configuration for Horizon: https://github.com/omnimod/linux-optimize4vdi

Linux-optimize4vdi is a simple Ansible playbook which performs basic configuration steps like updating OS, uninstalling/installing packages, setting GNOME desktop parameters, etc. Current version supports Ubuntu 22.04.

Automated features

This playbook performs multiple optimizations:
  1. Remove unnecessary Ubuntu apps (games, usb creator utility and transmission app).
  2. Update and upgrade packages with apt update && apt upgrade.
  3. Update installed apps with snap refresh.
  4. Install the latest version of Open-VM-Tools.
  5. Install new apps via apt (chromium, 7zip, vlc, telegram desktop client, and zoom client).
  6. Disable apt automatic updates and upgrades.
  7. Enable GRUB quiet boot.
  8. Disable system hibernation and sleep.
  9. Disable unnecessary services (bluetooth, thunderbolt, firmware update service).
  10. Join to the domain.
  11. Compile VHCI driver for Horizon USB redirection.
  12. Compile V4L2Loopback driver for Horizon RTAV.
  13. Install Horizon Agent with Audio redirection, USB redirection, and RTAV.
  14. Enable SSO for Horizon.
  15. Optimize GNOME desktop (disable animation, set default background to single color).
  16. Clean bash history.
  17. Reboot the virtual desktop.

How to use

Install Ubuntu 22.04 Guest OS on the virtual desktop VM with default parameters. Set the default user account with 'user' as username and sudoer permissions. If you user another username, please modify configuration steps and ansible.cfg accordingly.

Install OpenSSH server on the virtual desktop:
sudo apt get install openssh-server
Install Ansible on your workstation / client computer.

Generate ssh keys on your workstation with default settings:
ssh-keygen
Copy public key from your workstation to the virtual desktop:
ssh-copy-id -i ~/id_rsa.pub user@virtual_desktop_ip_address
Modify inventory file and specify virtual desktop IP address and modify required variables.

Download and place required installation packages and archives to the files folder.

Run Ansible playbook with:
ansible-playbook --ask-become-pass optimize.yml

Tags

If you want to run only certain optimization you can run ansible-playbook with --tags "tag1, tag2, tag3" parameter. Currently this playbook supports tags:
  • horizon - install and configure VMware Horizon Agent on the virtual desktop.
  • domain - join to the domain with the parameters specified in inventory files.
  • gnome - perform GNOME desktop tweaks and optimizations.
  • reboot - reboot the virtual desktop after completing optimizations.
For example to run playbook with horizon and domain join optimization only enter:
ansible-playbook --ask-become-pass --tags "horizon, domain" optimize.yml

Variables

Inventory file contains variables, which are necessary to run the playbook:
  • horizon_agent - archive name with the horizon_agent installation package
  • vhci_driver - vhci driver archive name
  • v4l2loopback_driver - archive name with the v4l2loopback driver
  • domain_name - domain name to join
  • domain_user - domain account name to join to the domain
  • domain_password - password for domain-entry account
  • debug - set to True to display extended information from the commands that have been executed

Saturday, March 24, 2018

Self-preparation questions for VCP7-DTM exam

Recently I have passed the 2V0-751 exam to receive the certified status VMware Certified Professional 7 - Desktop & Mobility

To help prepare for the exam, I wrote down a pool of test questions for self-preparation (70 questions).

Some sample questions:

Question 1.7 Which optional components are selected by default during Horizon View Agent installation? (Select three)
A. USB Redirection
B. Real-Time Audio-Video
C. VMware Horizon View Composer
D. VMware Horizon Instant Clone
E. Client Drive Redirection
F. Scanner Redirection

Question 1.12 Which statement is true related to Instant Clones?
A. VMware Horizon Instant Clone component is required
B. View Composer is required
C. Datastore with VAAI is required
D. vSphere 5.5 or later is required

Question 2.9 An administrator is planning to upgrade desktops to the Windows 10 via Mirage Windows OS Migration feature. Which USMT file version must be imported?
A. USMT 4
B. USMT 5
C. USMT 6.3
D. USMT 10.0

Question 3.9 Which authentication profiles are supported for Web applications published through the Identity Manager? (Select three)
A. Kerberos 5
B. OAuth 1.0
C. OpenID 2.0
D. SAML 1.1
E. SAML 2.0
F. WS-Federation 1.2

Question 4.8 Which Machine Manager types are supported by App Volumes? (Select three)
A. VMware vCenter Server
B. ESXi Host
C. Citrix XenApp Farm
D. VMware Identity Manager
E. Horizon Published Apps
F. VHD In-Guest Services

Question 5.2 Which components are selected by default during User Environment Manager installation? (Select three)
A. FlexEngine
B. FlexMigrate
C. FlexProfilesSelfSupport
D. FlexManagementConsole
E. SyncTool
F. Helpdesk Support Tool

Question 6.2 An administrator is planning to configure vROps for Horizon to monitor View Connection Servers. What should the administrator install on View Connection Servers?
A. Install Horizon adapter on every View Connection Server in the Pod Federation.
B. Install Horizon adapter on one View Connection Server in every Pod.
C. Install broker agent on every View Connection Server in the Pod Federation.
D. Install broker agent on one View Connection Server in every Pod.

You could download the full document via the link: https://drive.google.com/open?id=1-tqA6Ke_suTjN8NRra0yUK88_6r0a-Lt