Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

ExecuteInAllVEs

7 bytes removed, 15:23, 6 January 2008
no edit summary
I found myself often faced with a need to run the same command in all VEs, e.g. ''apachectl restart'' to restart all webservers or ''dmesg | tail'' to see the latest news from everybody.
At its core is just You can loop through all VEs and execute this simple tidbitthis easily: a for loop around vzlist.
<code>
for veid in `vzlist -Hoveid`; do vzctl exec $veid COMMAND; done
24
edits