VMware Cloud Community
pudokad
Contributor
Contributor

PowerCLI script to import a physical server to a VM

Hello,

I am looking for a script to be able to convert a physical server into our vSphere environment as a VM. I can do this with the import GUI from vCenter or using the converter agent but would like to be able to import a server to a VM using a powerCLI script.

Is this possible?

Any help greatly appreciated.

Tags (3)
0 Kudos
3 Replies
alanrenouf
VMware Employee
VMware Employee

The only way to do this at the moment afaik is the same way Luc did here, you should be able to adjust his script....

http://lucd.info/?p=384

If you found this information useful, please consider awarding points for Correct or Helpful.

Alan Renouf

Blog: http://virtu-al.net Twitter: http://twitter.com/alanrenouf Co-author of the PowerCLI Book: http://powerclibook.com
0 Kudos
LucD
Leadership
Leadership

Thanks for mentioning the article Alan.

Just note that the article shows how to import a VCB-created image of guest into the vCenter.

If you need to do an actual P2V, the XML template has to be changed slightly.

Let me know if you need assistance in adapting the article from the script for P2V ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
rtackett
Contributor
Contributor

I am interested in doing this so that we can clone VMs that are in one vCenter to a vCenter in a different physical location with different clusters.

What changes are needed to the XML file to be able to use VMware Converter and Powershell or PowerCLI?

0 Kudos