RHEV: How to run rhevm-shell in cron
Issue
Trying to automate a rhevm-shell script in cron is failing with:
OSError: [Errno 6] No such device or address: '/dev/tty'
This solution describes a workaround to the problem, which was reported in "Invoking rhevm-shell commands from non-interactive shell gives error as OSError: [Errno 6] No such device or address: '/dev/tty'". As stated in that solution:
- rhevm-shell presently doesn't have cli invocation capabilities, so without an interactive shell it is not possible to execute the rhevm-shell.
- An RFE is filed to get cli invocation capabilities for rhevm, see Bug#823515
However, if running rhevm-shell from crontab is a requirement now, the following steps will allow rhevm-shell to be successfully run from cron.
Environment
- Red Hat Enterprise Virtualization (RHEV) 3.x
- Red Hat Enterprise Linux (RHEL) 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
