I have installed vagrant and virtual box on my Mac. I have created a Windows10 VM and it's configured with winrm.
I am able to run commands on Windows VM through vagrant. However I am not able to see any GUI on the VM.
For example, if I open command prompt in Windows VM and issue command "start chrome.exe", it launches the chrome browser and browser ui is displayed. However if I type the same command through winrm vagrant winrm -c "start chrome.exe"
, it launches the browser, but ui is not displayed in VM.Same issue happens if I run commands through shell provisioner.
Is there any way, I can run commands from vagrant and the application will be launched in GUI mode in VM?
Is there any way, I can run commands from vagrant and the application will be launched in GUI mode in VM?
No.
From https://msdn.microsoft.com/en-us/library/aa384426(v=vs.85).aspx :
You can use WinRM scripting objects, the WinRM command-line tool, or the Windows Remote Shell command line tool WinRS to obtain management data from local and remote computers ...
winrm is used for Remote Management and does not forward the X window, so no you cannot launch a program like chrome and forward the UI somewhere else.
Your best options to run UI program from your VM :