Skip to content

Commit

Permalink
add ovt_verify_install support for freebsd
Browse files Browse the repository at this point in the history
Signed-off-by: linhuali <lli@vmware.com>
  • Loading branch information
linhuali committed Jan 30, 2024
1 parent 40331ec commit d361621
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion desktop_hypervisor/common/dh_get_guest_vmtools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

- name: Set fact of tools version and build number
ansible.builtin.set_fact:
vmtools_info_from_vmtoolsd: "{{ vmtools_version_build.stdout_lines[0] }}"
vmtools_info_from_vmtoolsd: "{{ vmtools_version_build.stdout_lines[0] | default('') }}"

- name: "Print VMware Tools version and build"
ansible.builtin.debug: var=vmtools_info_from_vmtoolsd
1 change: 0 additions & 1 deletion desktop_hypervisor/common/dh_test_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,6 @@
- dh_guest_id is not match('.*(W|w)in.*')
- dh_guest_id is not match('.*rhel(5|6).*')
- dh_guest_id is not match('.*other.*linux.*')
- dh_guest_id is not match('.*freebsd.*')

- name: "Skip test case"
include_tasks: ../../common/skip_test_case.yml
Expand Down
6 changes: 6 additions & 0 deletions desktop_hypervisor/linux/dh_deploy_vm/deploy_vm_from_iso.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,12 @@
- name: "Get Guest VM IP"
include_tasks: ../../common/dh_host_get_guest_ip.yml

- name: "Get VMTools version"
include_tasks: ../../common/dh_get_guest_vmtools.yml

- name: "Get VM guest info including detailed data"
include_tasks: ../../common/dh_get_guest_info.yml

- name: "Take a VM screenshot after autoinstall"
ansible.builtin.shell: "vncdo -v -s {{ host_machine_hostname }}::{{ dh_vm_vnc_port }} capture {{ current_test_log_folder }}/vm_screenshot_after_autoinstall.png"
register: vncdo_take_screenshot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
skip_reason: "Not Supported"
when: >
dh_guest_id is match('.*other.*linux.*') or
dh_guest_id is match('.*rhel(5|6).*') or
dh_guest_id is match('.*freebsd.*')
dh_guest_id is match('.*rhel(5|6).*')
- name: "Set update VMware tools by default"
ansible.builtin.set_fact:
Expand Down
8 changes: 6 additions & 2 deletions desktop_hypervisor/linux/utils/get_linux_tools_version.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# Copyright 2023 VMware, Inc.
# SPDX-License-Identifier: BSD-2-Clause
---
- name: "Get the guestID"
include_tasks: ../../common/dh_get_guestid.yml
when: dh_guest_id is undefined or not dh_guest_id

- name: "Initialize the file paths"
ansible.builtin.set_fact:
vmtools_log_path: "{{ dh_host_download_path }}/vmtools.txt"
vmtools_cmd_path: |-
{%- if guest_os_family == 'FreeBSD' -%}vmware-guestd
{%- elif guest_os_family in ['Debian', 'Astra Linux (Orel)'] -%}open-vm-tools
{%- if dh_guest_id is match('.*free(bsd|BSD).*') -%}vmware-guestd
{%- elif dh_guest_id is match('.*debian.*') -%}open-vm-tools
{%- else -%}vmtoolsd
{%- endif -%}
Expand Down

0 comments on commit d361621

Please sign in to comment.