francwalter
Enthusiast
Enthusiast

Running a VM with GUI on a host without GUI

Jump to solution

Hallo

I want to install a simple Windows 7 for some little tasks where I need Windows on my Ubuntu 14.04 server. This server has no GUI (no X) and should not have it at all.

I already have installed the Windows VM on my Workstation 12, so I would just like to copy the vmdk to my linux server and run it, maybe set something in the vmx file.

But I don't know wether this is by any means possible.

Is it?

Is there any player or any vmware application for ubuntu when there is no X system available (on ubuntu), where I can run VMs with GUI in it?

Maybe another virtualization tool, not vmware?

I think this exact question is asked already somewhere but I only found a lot the question where the guest lacks a GUI, but not the host.

I need a guest-gui on a gui-less host (where I have only the terminal).

So maybe this is not possible at all, so please tell me a "No", so I wont hope anymore  Smiley Wink

Thank's

frank

EDIT: oh, this seems to be another unanswered question Smiley Sad Is it too difficult or too silly?

1 Solution

Accepted Solutions
wila
Immortal
Immortal

Hi Frank,

Now that would be silly, having a text installer and then not allow the VM to run. I think it should work, but you have to pass the nogui option.

From the vmrun help:

start

(Teams supported only on

Workstation.)

Starts a virtual machine (.vmx file) or team (.vmtm file).

The default gui option starts the machine interactively,

which is required to display a VMware user interface.

The nogui option suppresses the user interface,

including the startup dialog box, to allow noninteractive

scripting.

<path to .vmx or .vmtm file>

[ gui | nogui ]

see vmrun manual at: VIX API Documentation

edit: hmm.. I now see you tried the nogui option already. You might be able to install the libxinerama package, but it might drag in a lot of dependencies.

FWIW, vSphere is pretty much what you are describing for a non GUI system on which to run GUI guests, so it should not be a problem at all.

Unfortunately I do not have a linux host without X installed handy here, so can't test here without setting up a headless server myself.

You might also try to run the guest via the vmware command:

VMware Workstation 12 Pro Documentation Center

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva

View solution in original post

0 Kudos
8 Replies
wila
Immortal
Immortal

Hey Frank,

You can install VMware workstation on a headless Linux server, in that case the installer just falls back on an ncurses script.

You can run guests with or without GUI as long as you access the GUI interface remotely.

Starting the VMs would be done via the vmrun command.

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
francwalter
Enthusiast
Enthusiast

This sounds great!

Do you know if that is possible also with the pure and free Player?

0 Kudos
wila
Immortal
Immortal

Hi,

Sorry I don't know, but you can always try for yourself.

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
francwalter
Enthusiast
Enthusiast

OK, I tried the Workstation and indeed I was able to install it on a GUI-less Ubuntu 14.04 VM (on my Windows 8.1 Host with Workstation 12.1) where there is no X-Server.

As you said, the installer falls back to install it without GUI.

So now I have on my Windows 8.1 (64-Bit) PC, the Workstation 12.1, there I have Ubuntu 14.04 without any X-Server as VM, there inside I have installed VMware-Workstation-Full-12.1.0-3272444.x86_64.bundle (installation was successful).

Then I took one of my smaller VMs, an old Windows XP (with 3.5 GB vmdk-size only) where I disabled a lot of things (drives, usb, sound, shared folders) to have it very basic. This vm runs perfectly in my Workstation on my Windows PC.

I tried to start it with:

vmrun start /path/to/my/xp.vmx

but I get this error:

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

Hm, this was exact my doubt initially, if it is possible to run a virtual GUI OS in a environment without having any GUI in the host system.

I also tried with nogui option but then I get:

/usr/lib/wmware/bin/wmware-vmx: error while loading shared libraries: libXinerama.so.1: cannot open shared object file: No such file or directory

Error: Unknown error

I also tried to start the vmx with -T server (which I think is wrong anyway) but then I get the Error: The specified service provider was not found.

So did I do something wrong or is it just not possible and all my way down to here was in vain?

frank

0 Kudos
wila
Immortal
Immortal

Hi Frank,

Now that would be silly, having a text installer and then not allow the VM to run. I think it should work, but you have to pass the nogui option.

From the vmrun help:

start

(Teams supported only on

Workstation.)

Starts a virtual machine (.vmx file) or team (.vmtm file).

The default gui option starts the machine interactively,

which is required to display a VMware user interface.

The nogui option suppresses the user interface,

including the startup dialog box, to allow noninteractive

scripting.

<path to .vmx or .vmtm file>

[ gui | nogui ]

see vmrun manual at: VIX API Documentation

edit: hmm.. I now see you tried the nogui option already. You might be able to install the libxinerama package, but it might drag in a lot of dependencies.

FWIW, vSphere is pretty much what you are describing for a non GUI system on which to run GUI guests, so it should not be a problem at all.

Unfortunately I do not have a linux host without X installed handy here, so can't test here without setting up a headless server myself.

You might also try to run the guest via the vmware command:

VMware Workstation 12 Pro Documentation Center

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
francwalter
Enthusiast
Enthusiast

OK, after I installed some dependencies (after each install there was some new missing package for a while) to clear the error messages I could run it with nogui option.

I had to install a lot of x-stuff:

libpthread-stubs0-dev

libx11-dev

libx11-doc

libxau-dev

libxcb1-dev

libxcursor1

libxcursor-dev

libxdmcp-dev

libxext-dev

libxfixes3

libxfixes-dev

libxi6

libxi-dev

libxinerama1

libxinerama-dev

libxrender1

libxrender-dev

libxtst6

libxtst-dev

x11-common

x11proto-core-dev

x11proto-fixes-dev

x11proto-input-dev

x11proto-kb-dev

x11proto-record-dev

x11proto-render-dev

x11proto-xext-dev

x11proto-xinerama-dev

xorg-sgml-doctools

xtrans-dev

Now I can start the vm without any gui.

But I don't know if it has actually network access, there is no clue which IP to use to access it.

I tried some different things (with TeamViewer and an AutoHotkey script) to show if it is reachable but no sign of it.

But at least the vm runds, which is a good step Smiley Happy

I think to get network access it is a different story.

It didnt help a

arp -an

nor did it help to view the log, no clues about network of the guest.

This is my vmx file:

.encoding = "windows-1252"

config.version = "8"

virtualHW.version = "7"

scsi0.present = "TRUE"

memsize = "1024"

ide0:0.present = "TRUE"

ide0:0.fileName = "xp.vmdk"

ethernet0.present = "TRUE"

ethernet0.wakeOnPcktRcv = "FALSE"

usb.present = "FALSE"

mks.enable3d = "TRUE"

pciBridge0.present = "TRUE"

pciBridge4.present = "TRUE"

pciBridge4.virtualDev = "pcieRootPort"

pciBridge4.functions = "8"

pciBridge5.present = "TRUE"

pciBridge5.virtualDev = "pcieRootPort"

pciBridge5.functions = "8"

pciBridge6.present = "TRUE"

pciBridge6.virtualDev = "pcieRootPort"

pciBridge6.functions = "8"

pciBridge7.present = "TRUE"

pciBridge7.virtualDev = "pcieRootPort"

pciBridge7.functions = "8"

vmci0.present = "TRUE"

roamingVM.exitBehavior = "go"

displayName = "Windows XP Professional"

guestOS = "winxppro"

nvram = "xp.nvram"

virtualHW.productCompatibility = "hosted"

ft.secondary0.enabled = "TRUE"

tools.upgrade.policy = "useGlobal"

extendedConfigFile = "xp.vmxf"

ethernet0.addressType = "generated"

tools.syncTime = "FALSE"

uuid.location = "56 4d 6a 6e 60 f0 23 f3-79 62 81 10 1a d7 ee 8b"

uuid.bios = "56 4d 6a 6e 60 f0 23 f3-79 62 81 10 1a d7 ee 8b"

ide0:0.redo = ""

vmotion.checkpointFBSize = "134217728"

pciBridge0.pciSlotNumber = "17"

pciBridge4.pciSlotNumber = "21"

pciBridge5.pciSlotNumber = "22"

pciBridge6.pciSlotNumber = "23"

pciBridge7.pciSlotNumber = "24"

scsi0.pciSlotNumber = "16"

usb.pciSlotNumber = "-1"

ethernet0.pciSlotNumber = "33"

vmci0.pciSlotNumber = "36"

usb:1.present = "TRUE"

ethernet0.generatedAddress = "00:0c:29:d7:ee:8b"

ethernet0.generatedAddressOffset = "0"

vmci0.id = "1572232065"

usb:1.deviceType = "hub"

isolation.tools.hgfs.disable = "TRUE"

checkpoint.vmState = ""

sharedFolder.maxNum = "0"

hgfs.mapRootShare = "TRUE"

checkpoint.vmState.readOnly = "FALSE"

usb.autoConnect.device0 = ""

annotation = "2016-03-08 Updates, alle Snapshots gelöscht, auch Temp Ordner und Dateien, Defrag, Compact auf 3.5 GB."

cleanShutdown = "TRUE"

replay.supported = "FALSE"

replay.filename = ""

usb:1.speed = "2"

tools.remindInstall = "FALSE"

softPowerOff = "TRUE"

toolsInstallManager.updateCounter = "10"

RemoteDisplay.vnc.enabled = "TRUE"

gui.lastPoweredViewMode = "fullscreen"

monitor.phys_bits_used = "40"

ethernet0.connectionType = "nat"

numa.autosize.vcpu.maxPerVirtualNode = "1"

numa.autosize.cookie = "10001"

toolsInstallManager.lastInstallError = "0"

migrate.hostlog = ".\xp-b738c654.hlog"

usb:0.present = "TRUE"

usb:0.deviceType = "mouse"

usb:0.port = "0"

usb:0.parent = "-1"

gui.exitOnCLIHLT = "TRUE"

ide1:0.present = "FALSE"

ehci.present = "FALSE"

sound.present = "FALSE"

sharedFolder0.present = "FALSE"

sharedFolder1.present = "FALSE"

sharedFolder2.present = "FALSE"

sharedFolder3.present = "FALSE"

sharedFolder4.present = "FALSE"

sharedFolder5.present = "FALSE"

sharedFolder6.present = "FALSE"

floppy0.present = "FALSE"

0 Kudos
francwalter
Enthusiast
Enthusiast

I got it!!!

I switched network to bridge, dont know if this was it, but after a while after a reboot suddenly I got an email from my Autohotkey Skript, which was set up to send (with blat.exe) all 5 minutes the output of ipconfig /all to my email account Smiley Happy

So I saw the IP and I could connect with RDP, which I enabled previously as well. Important also: set a password for the admin account(s). Without password no connection possible.

With RD I noticed, that TeamViewer had a different ID and a the auto login to my TeamViewer account (which I had set before) was also not possible because the password was different. Might be this is a calculated hash so it changed somehow with change of (virtual) NIC.

But I could set it up correctly with RD and now I can connect through RD and TV.

This was only a test on my local VMware Workstation, the goal is to run it on my mail and webserver, which also is a virtual machine, but not vmware.

This will be the next thing, to run it there, install vmware workstation there to test if this will work. This will be more difficult as I must be cautious about virus and intrusion, which is not a problem hier in my local nat.

Maybe I will not do it Smiley Happy

The most important hint was the nogui and to anyway install all those dependencies, so thank you wila

0 Kudos
wila
Immortal
Immortal

Hi,

It's still a bit weird that you have to install pretty much all of x.org to get this to work, but I guess it isn't too bad as long as it works.

This was only a test on my local VMware Workstation, the goal is to run it on my mail and webserver, which also is a virtual machine, but not vmware.

Wait.. what? You want to install VMware Workstation (or Player) within a virtual machine and then run virtual machines within the virtual machine?

Umm.. the term for that is nested virtualisation and while VMware is capable of doing that, most -if not all- other virtualisation platforms do not currently support that.

Depending on host virtualisation software nested VMs might work, but I would not hold my breath on both performance as well as stability.

If you do want to test with that, then my suggestion is to first try with 32 bits guests as the chances are higher that that will work as 64 bits guests.

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos