Posts Tagged ‘Add new tag’

VMware ESXi: initiating backup script from another server

August 5th, 2009 juergens No comments

Because of the lack of the cronjobs in ESXi, a regular run of a script like backup the virtual machines is not possible without a second system. I use a linux to initiate the backup script located on the esx datastore.

Take the following steps:
1) create a keybundle on the linux server without passphrase

ssh-keygen -t dsa

2) copy the to the esxi server

scp /root/.ssh/ root@IP_ESXi:/.ssh/authorized_keys

3) at the first login, the key has to be accepted. the second one should work then.

ssh IP_ESXi

4) create a new file which includes the execution command

ssh IP_ESXi '/vmfs/volumes/datastore1/ /vmfs/volumes/datastore1/vmlist' 2&>1 /backup/ESXi.log

5) create a new cronjob

crontab -e

6) esxi will remove the .ssh directory after a reboot, so read my post before how to workaround this issue.

Categories: it Tags: