为复制的 VMWare 虚拟机生成 uuid

发布于 2024-08-17 14:27:32 字数 229 浏览 3 评论 0原文

根据 http://www.vmware.com/support/esx15/doc/ esx15_runvm5.html,如何生成文档中指定的 UUID 格式?

我希望这是一个命令行实用程序,这样我就可以在自动化脚本中重复使用它。

As per http://www.vmware.com/support/esx15/doc/esx15_runvm5.html, how would one go about generating the UUID format that is specified in the docs?

I'd like this to be a command line utility so I can re-use this in an automation script.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

暮年慕年 2024-08-24 14:27:32

命令:

  uuidgen | perl -ne '{ s/-//g; s/(.{2})/\1 /g; substr($_,23,1,"-"); print ; }'

输出:

CB 7B E9 47 F7 55 42 42-AC 16 46 C1 E9 08 35 53 

Command:

  uuidgen | perl -ne '{ s/-//g; s/(.{2})/\1 /g; substr($_,23,1,"-"); print ; }'

Outputs:

CB 7B E9 47 F7 55 42 42-AC 16 46 C1 E9 08 35 53 
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文