ispear
Contributor
Contributor

Losing ownership of VM after autostart

Jump to solution

Hi Workstation users,

I have an Ubuntu VM running on Workstation 15.5.6 and I want this machine to start automatically when Windows starts (not when a user logs in). I am using this command in a scheduled task (on system start) "C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe" -T ws start {path to file vm.vmx}.

The task runs and the VM starts but after I login and open Workstation I cannot open the VM. The VM is running and it's services are available but when I click on the machine in my tree I get this message.

take_ownership.PNG

If I click "Take Ownership" it fails.

I'm close to what I want, I just need to be able to open the running VM after I logon to the host machine. Right now the only way to get to the VM is to stop it and restart it while I'm logged in.

Any help is appreciated! Thanks!!

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
wila
Leadership
Leadership

Hi,

This is expected with VMware Workstation 16 (and if I'm not mistaken for Workstation 15 too, possibly earlier versions as well).

The parent process in this case is vmrun and not vmware workstation and as such you can't take ownership of it.

The workaround is as follows:

- start with nogui (this is recommended anyways if you start before login as you won't have a desktop and cannot answer any questions that VMware might popup that would otherwise cause the VM to get stuck)

- the screen now shows up as black the moment you want to take over the screen. There is no direct way to get at the screen, however...

- when you want to take it over with workstation itself then suspend the VM and resume it in workstation (ugly workaround, but the only thing that works as far as I know)

Alternatively wait a bit until I have vimarun​ released. I have some ideas to cure the above, but not sure if that will make the very first release.

Also note that vimarun will not just autostart a VM, but also suspend the VM on shutdown which IMO is also pretty important.

edit: Saw on rereading that you are using Workstation 15.x.

The official way with Workstation 15 is to use "shared Virtual Machines", but beware that that feature has been removed in VMware Workstation 16.

Also note that shared virtual machines have certain limitations (http://kb.vmware.com/kb/2005585 ).

hope this helps,

--

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

12 Replies
continuum
Immortal
Immortal

I assume that your scheduled task is launched with administrator rights.

So you will also need to launch the GUI with admin rights if you want to take over control.

Do you need support with a recovery problem ? - send a message via skype "sanbarrow"
0 Kudos
wila
Leadership
Leadership

Hi,

This is expected with VMware Workstation 16 (and if I'm not mistaken for Workstation 15 too, possibly earlier versions as well).

The parent process in this case is vmrun and not vmware workstation and as such you can't take ownership of it.

The workaround is as follows:

- start with nogui (this is recommended anyways if you start before login as you won't have a desktop and cannot answer any questions that VMware might popup that would otherwise cause the VM to get stuck)

- the screen now shows up as black the moment you want to take over the screen. There is no direct way to get at the screen, however...

- when you want to take it over with workstation itself then suspend the VM and resume it in workstation (ugly workaround, but the only thing that works as far as I know)

Alternatively wait a bit until I have vimarun​ released. I have some ideas to cure the above, but not sure if that will make the very first release.

Also note that vimarun will not just autostart a VM, but also suspend the VM on shutdown which IMO is also pretty important.

edit: Saw on rereading that you are using Workstation 15.x.

The official way with Workstation 15 is to use "shared Virtual Machines", but beware that that feature has been removed in VMware Workstation 16.

Also note that shared virtual machines have certain limitations (http://kb.vmware.com/kb/2005585 ).

hope this helps,

--

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

ispear
Contributor
Contributor

Hi wila,

Thanks so much for the detailed response. I looked into shared VM's a little and saw that there was a rather mixed acceptance of these so luckily I didn't go down that road. Your vimarun sounds like the EXACT tool we're all looking for. I signed up for the beta. Good luck in the last portion of development!

0 Kudos
wila
Leadership
Leadership

Thanks, got your beta request.

With a bit of luck the beta will go out this week (depending on all the things that come on my path this week)

--

Wil

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

Wila,

can i ask what language you programmed vimalin in?

I'm currently using a very scripty python tool to accomplish the same task?

Obviously now I am running into this bug.

However, I have installed my python script/service as my user account.

I am wondering how reliable vimalin will be.

All I really need to make a backup to an external drive every 1 or 2 days.

Honestly, if I could find out what language the tool is programmed in, I would certainly be willing to contribute code or at least ideas for free.

I just need something that works.

I wish there was a way I could contribute code/ideas and not have access to proprietary ideas, like plugins.

0 Kudos
wila
Leadership
Leadership

Hi,

Do you mean vimarun or vimalin?

Vimarun is about running a VM at start of the host and vimalin is for making vm backups.

Both products are written in Delphi.
A bit of an odd choice, but it was chosen for vimalin years ago when I needed a cross platform solution.
The alternative would have been C++ and that seemed like more work than I bargained for.

Neither of these products is open source I'm afraid. There's plenty of open source projects that I either have made available or contributed to, but not in this case. Part of my business is based around OSS (see https://antwise.com )

For a backup product I need rock solid stability. If I have to test/validate & support other people's code then it would be harder for me to guarantee that. Not saying it can't work, just not expecting it would match this particular use case. Besides that I really do need to recover some of my costs and time spend. Providing support on a free product is another issue when going down that path.
Not everything can be free I'm afraid. I still think that these products are very reasonably priced (one time fee, no subscription, fast support - usually same day)

Vimarun shares a reasonable amount of source with vimalin, which helped a lot in getting it released fairly quickly.

Both are pretty reliable I think, or else I would have a lot of support requests. I do aim for happy users.
They are not using scheduled tasks. On Windows core functionality is written as windows services. This helps a lot for making these apps more reliable.

re. plugins. There's nothing for that right now, but I have a request open for adding support for scripting so that you can customize what happens before/after the backup. That feature will arrive, but not in the current version of vimalin.

Not sure what plugins could do for vimarun...

edit: forgot to mention.
You can test if either of these products fits your needs.

vimarun - has a trial of 60 days, after that you need to buy a license to continue using it.

vimalin - also has a trial of 60 days, after that you'll loose functionality for running things automatic and email support (there's a bit more, see the website). You can still use if after the trial runs out.

Hope this helps answering some of your questions,
--
Wil

 

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

Yes Vimalin,

I realize now it's the superior option for VMWare workstation.

I purchased it as soon as I tried it.

Although I have one question related to mixed storage locations.

I have a media server with mixed services.

The media server is kind of a throw away service (non-essential) but the others are not.

Running backups with Vimalin is my top priority right now, so I'm splitting the services apart.

Media server on one vm and essential services in another, so I'm guaranteed a backup of the important stuff.

I was wondering though, can I backup any media server vm if its split into two or more disks?

Is there anyway to do that where I can ignore the big data disk and backup the smaller operating system one?

 

 

0 Kudos
wila
Leadership
Leadership

Hi,

Thanks for the sales.

re. your question.

Vimalin will backup a VM with multiple disks.

At the moment there is no option to be able to ignore a disk, but it was logged as a feature request already.
I will add your name to that request.

As it has been asked a few times already, I have also bumped the priority on that ticket.

--
Wil

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

@wila

Thanks again, I recently had to reinstall Vimalin because maybe I was using the scheduled backup feature incorrectly or maybe something went wrong in the configs but I couldn't backup when using the weekly feature wherein all days of the week were selected and backups occurred at a specific time.

maniamscripty_1-1618918534324.png

 

Instead I changed the default schedule for my VMs to 'run at' 'repeated' infinitely wherein the vms are queuing backups at the same time during the night.

maniamscripty_0-1618918450807.png

 

I am not sure if it was a Windows Update or something else, but I could not seem to schedule backups using the Week type backup.

Either way, it's working again.

I also purchased Vimarun so when my computer reboots everything starts back up.

👍

Really good software. Still glad I purchased it.

0 Kudos
wila
Leadership
Leadership

Hi,

Interesting.. not sure if you removed the settings/database during uninstall, but if you did not, can you please email me the support bundle? (you can create it from the help menu)

Maybe I can figure out what happened.

--
Wil

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

I probably should have made a backup, but took the wrong route.

Most likely the database and related settings have been deleted as I did remove them during uninstall.

Sorry to disappoint.

0 Kudos
wila
Leadership
Leadership

No problem.

I still have some testing to do for the next release so will see if I can find a way to reproduce.

--
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