View all VMS and hosts after the corresponding host has the number of VM units------------------
For I in $ (
Cat <<eof | Cat
Pttile
192.168.1.xxx Pool only adds master to it.
Eof
);d O
{
["$I" = "Pttile"] && echo-e "Host and vmlist" | | SSH $I "
For XX in \ ' Xe host-list params=uuid--minimal | Awk-f, ' {for (i=1;i<=nf;i++) {printf \ $i \ ' \n\ '}} ' |sort\ '
Do
#echo ===================================================
Echo-n \ ' Xe host-list uuid=\ $XX params=name-label--minimal \ '
Echo-n ====hostname====vmno:
Xe vm-list resident-on=\ $XX Params=name-label--minimal | Awk-f, ' {printf nf-1\ ' \n\ '} '
Xe vm-list resident-on=\ $XX Params=name-label--minimal | Awk-f, ' {for (i=1;i<=nf;i++) {printf \ $i \ ' \n\ '}} ' |sort
Done;
";
}
Done
This article from "11416160" blog, declined reprint!
View all VMS and hosts after the corresponding host has VM number--