Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contribution: Vmware Esxi model #3137

Open
marmack95 opened this issue Apr 25, 2024 · 0 comments
Open

Contribution: Vmware Esxi model #3137

marmack95 opened this issue Apr 25, 2024 · 0 comments

Comments

@marmack95
Copy link

Hello,
I know oxidized was developped for network device, but it's usefull to backup some others devices types, as in my case Vmware ESXi.

It's seems that oxidized does not support multiple input (example: make a first connection in ssh and a second in http).
#709

So I create un model in 2 parts, to make it works.

Important: To use it, you must enable ssh and authorize on firewall ssh connection from oxidized server on each ESXi.

The 1st model: connect in ssh, generate the local backup (could not choose folder/name), and create un static download link.
NB: the backup is deleted after 5 min by ESXi.

The 2nd model: retrieve the configuration file using the static download link.

On Oxidized config, i ...

  • enable "keyboard-interactive" (except if you use publickey)
  • disable dns resolve
  • add some variables:
vars:
  copyby2ndmodel: true
  selfcopy: false

On my device list, i create 2 lines per device:

#device:ip:group:model:input
myserver.log:192.168.0.10:vmware_esxi_p1:mygroup
myserver.tgz:192.168.0.10:vmware_esxi_p2:mygroup:http

The 1st model will create the file myserver.log (which can be removed) and the 2nd model will create the file myserver.tgz .

NB:

  • this solution don't use Vmware software but native cli
  • on ESXi, SCP command don't accept to script it with password, but it's possible using a ssh key (if you enable 'ssh client' on Esxi firewall). Lines to use SCP are commented in model.
  • you can rewrite the 2nd model, if you prefer retrieve configuration with SCP (input added in oxidized 0.30.1) instead of HTTP. I've not test it.

Tested on ESXi 7.x (should work on ESXi 6.x) with Oxidized 0.30.1-14-g2bfd3f2 (docker version).

vmwareesxi_p1.txt
vmwareesxi_p2.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant