学习
路无止境!

没有伞的孩子要学会努力奔跑!


  • 首页

  • 归档

  • 关于我

  • 公益404

  • 搜索

VMware Horizon 8 设置 Linux 桌面

概述

在配置 Linux 桌面时,必须根据要在虚拟机上安装 2D 图形还是 3D 图形来按照不同的步骤序列进行操作。 官方文档给出了其步骤。

  • 对于 2D 图形,执行以下步骤: 1.查看设置 Linux 桌面部署的系统要求。 2.在 vSphere 中创建一个虚拟机并安装 Linux 操作系统。 3.准备客户机操作系统以在 VMware Horizon 环境中将其部署为桌面。 4.配置 Linux 客户机操作系统以使用 Active Directory 进行身份验证。此步骤是根据您的环境要求使用第三方软件执行的。 5.在 Linux 虚拟机上安装 Horizon Agent。 6.基于配置的 Linux 虚拟机创建桌面池。

  • 3D 图形 - 配置步骤 必须先在 Linux 虚拟机上完成 NVIDIA GRID vGPU 配置,然后再在计算机上安装 Horizon Agent,并在 Horizon Console 中部署桌面池。 1.查看在 VMware Horizon 环境中设置 Linux 桌面部署的系统要求。 2.在 vSphere 中创建一个虚拟机并安装 Linux 操作系统。 3.准备客户机操作系统以在 VMware Horizon 环境中将其部署为桌面。 4.配置 Linux 客户机操作系统以使用 Active Directory 进行身份验证。此步骤是根据您的环境要求使用第三方软件执行的。 5.在 ESXi 主机和 Linux 虚拟机上配置 3D 功能。 6.在 Linux 虚拟机上安装 Horizon Agent。 7.基于配置的 Linux 虚拟机创建桌面池。

本实验环境没有GPU卡,选择2D图形的方式。

实验环境

软件参数

项目版本备注
Windows20169718765Harizon Connection Server
CentOS 7.92009桌面池模板
Horizon8 Connection Server20128.1.0-17351278
Horizon8 Agent20122012-8.1.0-17336770
vCenter7.0u2

IP地址分配

项目地址备注
vCenter192.168.110.22vcsa-01a.corp.tanzu
CS-Windows2016172.100.0.101cs8-01.corp.tanzu
AD192.168.110.10controlcenter.corp.tanzu
VDI client172.100.0.201-253相应网段已部署DHCP服务

实验步骤

Linux 桌面部署的系统要求

参考官方文档:Horizon Agent for Linux 的系统要求

安装 Linux 虚拟机

选择CentOS 7.9,安装过程(略)

准备客户机操作系统

  1. 修改主机名,并在 /etc/hosts 文件中,将 Linux 计算机的主机名映射到 127.0.0.1;修改Selinux到disabled。
  2. 检查在 vSphere Client 中,禁用虚拟机上的“vApp 选项”设置。
  3. 确认已禁用 virbr0。

[root@centos79 ~]# virsh net-destroy default Network default destroyed [root@centos79 ~]# virsh net-undefine default Network default has been undefined [root@centos79 ~]# systemctl restart libvirtd

如果virsh命令不存在,需要安装libvirt

  1. 确保容器中的 Horizon Connection Server实例可以通过 DNS 解析。本实验为:controlcenter.corp.tanzu 192.168.110.10
  2. 将 Linux 计算机配置为默认情况下以图形模式运行。

[root@centos79 ~]# systemctl set-default graphical.target

  1. 要准备虚拟机以将其用作场中的多会话主机,安装所需的软件包

[root@centos79 ~]# yum install http://mirror.centos.org/centos/7/os/x86_64/Packages/cpptest-1.1.1-9.el7.x86_64.rpm Loaded plugins: fastestmirror, langpacks cpptest-1.1.1-9.el7.x86_64.rpm | 47 kB 00:00:00 Examining /var/tmp/yum-root-SsySDJ/cpptest-1.1.1-9.el7.x86_64.rpm: cpptest-1.1.1-9.el7.x86_64 Marking /var/tmp/yum-root-SsySDJ/cpptest-1.1.1-9.el7.x86_64.rpm to be installed Resolving Dependencies –> Running transaction check —> Package cpptest.x86_64 0:1.1.1-9.el7 will be installed –> Finished Dependency Resolution …… Install 1 Package Total size: 117 k Installed size: 117 k Is this ok [y/d/N]: y Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : cpptest-1.1.1-9.el7.x86_64 1/1 Verifying : cpptest-1.1.1-9.el7.x86_64 1/1 Installed: cpptest.x86_64 0:1.1.1-9.el7 Complete!

[root@centos79 ~]# yum install https://rpmfind.net/linux/centos/7.9.2009/os/x86_64/Packages/uriparser-0.7.5-10.el7.x86_64.rpm Loaded plugins: fastestmirror, langpacks uriparser-0.7.5-10.el7.x86_64.rpm | 108 kB 00:00:00 Examining /var/tmp/yum-root-SsySDJ/uriparser-0.7.5-10.el7.x86_64.rpm: uriparser-0.7.5-10.el7.x86_64 Marking /var/tmp/yum-root-SsySDJ/uriparser-0.7.5-10.el7.x86_64.rpm to be installed Resolving Dependencies –> Running transaction check —> Package uriparser.x86_64 0:0.7.5-10.el7 will be installed –> Finished Dependency Resolution …… Total size: 487 k Installed size: 487 k Is this ok [y/d/N]: y Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : uriparser-0.7.5-10.el7.x86_64 1/1 Verifying : uriparser-0.7.5-10.el7.x86_64 1/1 Installed: uriparser.x86_64 0:0.7.5-10.el7 Complete!

注意:到https://rpmfind.net/linux/centos/找到匹配到版本

Linux 客户机使用 Active Directory 进行身份验证

官方文档在为 Linux 桌面设置 Active Directory 集成和用户身份验证功能。这里面给出了四种方式,我们选用设置针对 Microsoft Active Directory 的 SSSD LDAP 身份验证方式。

  1. 与AD时间同步

[root@centos79 ~]# ntpdate 192.168.110.10 20 Jul 03:40:20 ntpdate[4430]: step time server 192.168.110.10 offset 219.292078 sec

  1. 安装 sssd,realm等软件包

[root@centos-01a ~]# yum install sssd realmd oddjob oddjob-mkhomedir adcli samba-common samba-common-tools krb5-workstation openldap-clients policycoreutils-pythonyum install sssd realmd oddjob oddjob-mkhomedir adcli samba-common samba-common-tools krb5-workstation openldap-clients policycoreutils-python …… Total download size: 13 M Is this ok [y/d/N]: Exiting on user command Your transaction was saved, rerun it with: yum load-transaction /tmp/yum_save_tx.2021-07-21.10-31.6dRR7n.yumtx

  1. 查找域控制服务器

[root@centos-01a ~]# realm discover controlcenter.corp.tanzu corp.tanzu type: kerberos realm-name: CORP.TANZU domain-name: corp.tanzu configured: no server-software: active-directory client-software: sssd required-package: oddjob required-package: oddjob-mkhomedir required-package: sssd required-package: adcli required-package: samba-common-tools

4.加入AD域

[root@centos-01a ~]# realm join –user=administrator controlcenter.corp.tanzu Password for administrator:

  1. 使用AD域账号验证是否加入成功

[root@centos-01a ~]# id zyi@corp.tanzu uid=1070411625(zyi@corp.tanzu) gid=1070400513(domain users@corp.tanzu) groups=1070400513(domain users@corp.tanzu)

  1. 在/etc/sssd/sssd.conf改变parameters:

#from: use_fully_qualified_names = True fallback_homedir = /home/%u@%d

#to: use_fully_qualified_names = False fallback_homedir = /home/%u

Restart sssd 服务

[root@centos-01a ~]# systemctl restart sssd [root@centos-01a ~]# systemctl daemon-reload

可以直接查ID

[root@centos-01a ~]# id zyi uid=1000(zyi) gid=1000(zyi) groups=1000(zyi),1070400513(domain users)

  1. Sudo rights for AD users

[root@centos-01a ~]# echo “%sudoers ALL=(ALL) ALL” »/etc/sudoers.d/sudoers [root@centos-01a ~]# cat /etc/sudoers.d/sudoers %sudoers ALL=(ALL) ALL

在 Linux 虚拟机上安装 Horizon Agent

  1. 从 VMware 下载站点 https://my.vmware.com/web/vmware/downloads 下载 Horizon Agent for Linux 安装程序文件
  2. 解压缩所用 的Linux 分发包

[root@centos-01a ~]# tar -zxvf VMware-horizonagent-linux-x86_64-2012-8.1.0-17336770.tar.gz VMware-horizonagent-linux-x86_64-2012-8.1.0-17336770/ VMware-horizonagent-linux-x86_64-2012-8.1.0-17336770/sso/ VMware-horizonagent-linux-x86_64-2012-8.1.0-17336770/sso/sled11/ VMware-horizonagent-linux-x86_64-2012-8.1.0-17336770/sso/sled11/greeter.tar.manifest VMware-horizonagent-linux-x86_64-2012-8.1.0-17336770/sso/sled11/gdm-vmwcred VMware-horizonagent-linux-x86_64-2012-8.1.0-17336770/sso/sled11/gdm.orig VMware-horizonagent-linux-x86_64-2012-8.1.0-17336770/sso/sled11/pam_vmw_cred_sled11.so VMware-horizonagent-linux-x86_64-2012-8.1.0-17336770/sso/sled11/greeter.tar.patterns ……

  1. 安装依赖 libappindicator-gtk3

[root@centos-01a ~]# yum install -y libappindicator-gtk3 Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile base: mirror.arizona.edu extras: repos-lax.psychz.net updates: mirrors.cat.pdx.edu Resolving Dependencies –> Running transaction check —> Package libappindicator-gtk3.x86_64 0:12.10.0-13.el7 will be installed –> Processing Dependency: libindicator3.so.7()(64bit) for package: libappindicator-gtk3-12.10.0-13.el7.x86_64 ……

4.进入解压文件夹,以超级用户身份运行 install_viewagent.sh 脚本

[root@centos-01a VMware-horizonagent-linux-x86_64-2012-8.1.0-17336770]# ./install_viewagent.sh -A yes The installation will install VMware Horizon Agent on your computer. Installation Start … If you have any questions or issues regarding Linux VDI, please start a discussion at https://communities.vmware.com/community/vmtn/horizon/vmware-horizon-for-linux, and we will respond to you as soon as possible. You must restart your system for the configuration changes made to the VMware Horizon Agent to take effect. Installation done

  1. 修改/etc/vmware/viewagent-custom.conf 的参数(可选,自动桌面池这一步一定要做)
OfflineJoinDomain=sssd

完成以后关机,制作快照。

生产桌面池

采用自动桌面池,过程略 请添加图片描述 授权给zyi用户

Horizon Client端测试

请添加图片描述 请添加图片描述 请添加图片描述 成功!

  • 文章目录
  • 站点概览
Etaon

Etaon

Kepp Going!

80 日志
15 分类
43 标签
GitHub CSDN
友情链接
  • Kubernetes
  • Cisco
  • W3School
  • 廖雪峰
标签云
  • Mysql
  • Aws
  • Dql
  • Hadoop
  • Kubernetes
  • Nsx t
  • Redis
  • Azure
  • Cicd
  • Git
  • 概述
  • 实验环境
    • 软件参数
    • IP地址分配
  • 实验步骤
    • Linux 桌面部署的系统要求
    • 安装 Linux 虚拟机
    • 准备客户机操作系统
    • Linux 客户机使用 Active Directory 进行身份验证
    • 在 Linux 虚拟机上安装 Horizon Agent
    • 生产桌面池
    • Horizon Client端测试
© 2010 - 2023 路无止境!
Powered by - Hugo v0.101.0 / Theme by - NexT
/
Storage by Azure static web apps /
0%