Using xargs to speed up XenServer operations

Posted: August 13, 2010 in How To - XenServer

Performing many tasks can take some time, and we know that XenServer can deal with a few of these operations at once. I had some issues, but finally have a one-liner that is suitable (using xargs again :-))

xe vm-list is-control-domain=false power-state=running --minimal | 
    tr -d [:cntrl:] | 
    xargs -d, -n1 -P5 -I '{}' xe vm-param-list uuid='{}'

You notice that I strip all control characters out with tr. This is to get rid of a strange line break that xargs will process even when running -r.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s