Jump to content
Monthly Subscriptions Are Here Read more... ×
thomas_n

Windows Agent on Hyper V

Recommended Posts

thomas_n

I have just switched an installation from a separate device with the agent to a VM on a Windows 10 computer acting as a home server.

 

What I don't like about the setup is that it uses Virtualbox which runs only when a user is logged on. Secondly, I don't want to use Virualbox for my other VM's. So, here's how I did it:

  1. Installed and ran the Domotz agent for a first time, linking it to my account.
  2. Stop the VM and export it from within Virutalbox to the ovf 2.0 format, this also creates a VMDK file
  3. Use any tool to convert this to a vdk file (I used Starwind V2V)
  4. Create a virtual switch in Hyper V connected to the external network
  5. Create a new VM in Hyper V with the correct settings (copy the ones from Virutalbox) and use the vmdk file for the harddisk
  6. Start the VM
  7. (Optionally) set the VM to autostart when the computer starts

 

If you follow these steps, you now have a VM with Domotz running in Hyper V as soon as the computer is started. You can then proceed to unistall Virtualbox and the Domotz Agent Manager.

 

Honestly, I don't understand why the agent is not made available as a VM, rather than the complete package with the agent manager. It seems too complicated for the purpose to me.

 

Disclaimer: not sure how this will survive any software upgrades by the Domotz team, use at your own risk.

  • Like 1

Share this post


Link to post
Share on other sites
Giancarlo

Hi Thomas,

 

thanks a lot for this guide and your feedback with the package. 

 

Definitely the Domotz Windows Agent Manager is not supposed to be hosted on an already virtualized Windows environment.

 

Best would be to get directly the image installed by the Domtoz Windows Agent Manager. The current image (OVA format that you can convert in OVF or VMDK) is publicly available at:

https://s3-eu-west-1.amazonaws.com/domotz-vm-images-temp/domotzpro-ubuntu-18.04.1-amd64-1.0.3-b003.ova

MD5: e87e9cedee648ebdf9cb8ba16e7a0134

 

Note: we are going to upgrade that soon. You can check the latest version released here:

https://portal.domotz.com/assets/ubuntu-domotz-agent.json

 

The image is based on Ubuntu 18.04 and it provides automatic upgrade to the Domotz Agent (packaged in a SNAP format). I hope these details will help for the self configuration of a Virtual Machine with the latest Domotz Agent version. 

 

We are also upgrading the Domtoz Windows Agent Manager, so that it will overcome the following limitation:

"What I don't like about the setup is that it uses Virtualbox which runs only when a user is logged on"

 

This new version (will be marked as the first production one, since the current one is in Beta Mode) will be available in around 1 week.

 

I hope this helps clarifying. 

Share this post


Link to post
Share on other sites
thomas_n

Thanks for this clarification. Unfortunately after installing the VM as you suggested I find that it won't accept my login credentials.

  • First I thought it might not be connected to the internet, but I see it on my network.
  • Secondly I thought it might be due to two factor auth on my account, so I disabled that but it changed nothing.

So, I'm not sure what I am doing wrong but at this moment I don't see how I can get this to work so I'll have to stick with my hack for now...

Share this post


Link to post
Share on other sites
thomas_n

Update: actually, I can't log into my hacked VM either. But I never needed to do that as I used the Agent Manager to link it to my account.

Share this post


Link to post
Share on other sites
Giancarlo

Well, once started, just connect to port 3000 of that VM via a Web Browser. In that way you can configure the Domotz Agent running within that VM. For example if you get the IP by scanning the network (using Fing for example) or from the Router information, just connect to:

 

http://<IP_of_VM>:3000 

 

If you want to login via SSH to the VM, use domotz/domotz for the credentials.

Share this post


Link to post
Share on other sites
thomas_n

Ah, yes, that makes sense. I actually scanned the VM with Fing, but port 3000 showed up as something other than http so I did not bother to try that. But all is well now and I am successfully using the "official" image in a first installation. Looking forward to roll this out further.

 

Thomas

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×