Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VMWare setup over headless SSH connection is broken #255

Open
M-Davies opened this issue Jul 22, 2024 · 1 comment
Open

VMWare setup over headless SSH connection is broken #255

M-Davies opened this issue Jul 22, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@M-Davies
Copy link
Contributor

M-Davies commented Jul 22, 2024

There is an issue with the setup script for vmware where if you're running it from a headless console session (e.g. SSH), the script will fail due to the lack of a display driver:

$ ./goad.sh -t install -l GOAD -p vmware -m docker
[✓] Task: install
[✓] Lab: GOAD
[✓] Provider: vmware
[✓] Method: docker
[✓] folder ad/GOAD/providers/vmware found
[✓] Launch installation for: GOAD / vmware / docker
[✓] launch vagrant
Bringing machine 'GOAD-DC01' up with 'vmware_desktop' provider...
Bringing machine 'GOAD-DC02' up with 'vmware_desktop' provider...
Bringing machine 'GOAD-DC03' up with 'vmware_desktop' provider...
Bringing machine 'GOAD-SRV02' up with 'vmware_desktop' provider...
Bringing machine 'GOAD-SRV03' up with 'vmware_desktop' provider...
==> GOAD-DC01: Cloning VMware VM: 'StefanScherer/windows_2019'. This can take some time...
==> GOAD-DC01: Checking if box 'StefanScherer/windows_2019' version '2021.05.15' is up to date...
==> GOAD-DC01: Verifying vmnet devices are healthy...
==> GOAD-DC01: Preparing network adapters...
==> GOAD-DC01: Starting the VMware VM...
An error occurred while executing `vmrun`, a utility for controlling
VMware machines. The command and output are below:

Command: ["-T", "ws", "start", "/mnt/hdd1/GOAD/ad/GOAD/providers/vmware/.vagrant/machines/GOAD-DC01/vmware_desktop/1e52492e-3c35-4847-8060-e8cbfc586631/WindowsServer2019.vmx", "gui", {:notify=>[:stdout, :stderr], :timeout=>45}]

Stdout: Error: Cannot launch the UI because no display server is present in the current environment

Stderr: XDG_RUNTIME_DIR (/run/user/0) is not owned by us (uid 13015), but by uid 0! (This could e.g. happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
Warning: program compiled against libxml 210 using older 209
/home/user/GOAD
[!] vagrant finish with error abort

If I connect via RDP and run the same script it works fine. There probably should be a change to the script (or a warning in the documentation) that tells people to make sure they're running it with GUI support.

@Mayfly277 Mayfly277 added the enhancement New feature or request label Oct 20, 2024
@Mayfly277
Copy link
Collaborator

i keep it as an enhancement to remember to add an option in goad-v3 to enable/disable vmware gui

for your error just comment the gui = true in the vagrantfile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants