Virtual Machine Farm

General discussions and questions.
Post Reply
blakewj
Posts: 2
Joined: Tue Oct 09, 2018 4:17 am

Virtual Machine Farm

Post by blakewj »

Hello all,

i've been tinkering with Afanasy for a while now and am having some trouble working out the best methodology for rendering on a Linux (centos.7) KVM's.
so i have a few virtual machines (win7) running in linux at the moment using kvm and i can have each on communicate to the server so everything from here back seems fin,
the problem i face is naming of the hosts so that when they join the server they take the next available name?

I read some info about overwriting the host name using AF_HOSTNAME. which i haven't had any luck with. i am wondering if there is something i am missing or a more autonomous way of doing this?

thanks :D
-blake
User avatar
timurhai
Site Admin
Posts: 910
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Virtual Machine Farm

Post by timurhai »

Hi.
When afrender starts, it gets a local host name. When it registers on server, it tells server that name.
If some online render with the same name exists, server rejects registration.

On start, afrender tries to read AF_HOSTNAME environment variable, and uses it, it is exists.
Also it lowers letters case:
https://github.com/CGRU/cgru/blob/maste ... t.cpp#L533

But i did not got your problem.
Your virtual machines on boot always get new hostname or what?
( i do not remember any issues with hostnames, on virtual machines or not )
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
blakewj
Posts: 2
Joined: Tue Oct 09, 2018 4:17 am

Re: Virtual Machine Farm

Post by blakewj »

thanks for getting back to me so quickly
sorry if I came across unclear
I am having problems with the hostname.

which file must it be defined in?
afanasy/config.json?
/config.json
afanasy/farm.json?
or is it the config file stored in my roaming appdata folder(win)?

and another question,
is this all done client side? so the hostnames are determined by the clients, not the server?

thanks in advance
-blake
User avatar
timurhai
Site Admin
Posts: 910
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Virtual Machine Farm

Post by timurhai »

Yes, hostname detects only on client side.
JSON config files does not affect environment variables.
You can define environment variable anywhere in your own way.
https://en.wikipedia.org/wiki/Environment_variable
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
Post Reply