VMware Cloud Community
halr9000
Commander
Commander
Jump to solution

new-vm apparent bug?

Code:

1..3 | ForEach-Object {
	New-VM -Name "WinSvr$_" `
		-Template "Windows 2003 Server Standard" `
		-VMHost 192.168.0.55 `
		-RunAsync
}

Results:

Name                           State      % Complete Start Time   Finish Time
----                           -----      ---------- ----------   -----------
CloneVM_Task                   Running             0 05:16:02 AM
New-VM : Object reference not set to an instance of an object.
At C:\DOCUME~1\HROTTE~1\LOCALS~1\Temp\Untitled9.ps1:2 char:8
+     New-VM  <<<< -Name "WinSvr$_" `
New-VM : Object reference not set to an instance of an object.
At C:\DOCUME~1\HROTTE~1\LOCALS~1\Temp\Untitled9.ps1:2 char:8
+     New-VM  <<<< -Name "WinSvr$_" `

Can anyone else repro on v1.0.103777?

I ran it again with ps-debug on and see a few weird things which I don't quite know how to explain. The output is here: http://halr9000.pastebin.com/f1e1bcba7






Author of the upcoming book: Managing VMware Infrastructure with PowerShell

Co-Host, PowerScripting Podcast (http://powerscripting.net)

My signature used to be pretty, but then the forum software broked it. vExpert. Microsoft MVP (Windows PowerShell). Author, Podcaster, Speaker. I'm @halr9000
0 Kudos
1 Solution

Accepted Solutions
aevrov
VMware Employee
VMware Employee
Jump to solution

This is a bug in the VI Toolkit. It will be fixed in the next release.

Let me know if you need some specific workaround for your environment.

Regards,

Angel

View solution in original post

0 Kudos
8 Replies
LucD
Leadership
Leadership
Jump to solution

Is there anything in the vpxd logs after you set the logging to verbose?

I don't have access to my VI environment right now. Will try it asap.


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

0 Kudos
halr9000
Commander
Commander
Jump to solution

Is there anything in the vpxd logs after you set the logging to verbose?

No idea. I got dizzy after a while.

http://halr9000.pastebin.com/m5c674191

My signature used to be pretty, but then the forum software broked it. vExpert. Microsoft MVP (Windows PowerShell). Author, Podcaster, Speaker. I'm @halr9000
0 Kudos
cody_bunch
Hot Shot
Hot Shot
Jump to solution

Confirmed. For me it is happening sporadically however I may get 1 good run for every 5 failed.

-Cody Bunch

-Cody Bunch http://professionalvmware.com
LucD
Leadership
Leadership
Jump to solution

Confirmed, the clone of the first guest runs ok, number 2 & 3 fail with the same message.

Nothing conclusive in the verbose vpxd logs afaics.

In sync mode it works without a problem.


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

0 Kudos
halr9000
Commander
Commander
Jump to solution

VMware, can you comment? Thanks.






Author of the upcoming book: Managing VMware Infrastructure with PowerShell

Co-Host, PowerScripting Podcast (http://powerscripting.net)

My signature used to be pretty, but then the forum software broked it. vExpert. Microsoft MVP (Windows PowerShell). Author, Podcaster, Speaker. I'm @halr9000
0 Kudos
olan025
Enthusiast
Enthusiast
Jump to solution

No help here.. but I am running into same in my environment.

Interested in VMware response.

0 Kudos
aevrov
VMware Employee
VMware Employee
Jump to solution

This is a bug in the VI Toolkit. It will be fixed in the next release.

Let me know if you need some specific workaround for your environment.

Regards,

Angel

0 Kudos
halr9000
Commander
Commander
Jump to solution

FYI, I just confirmed this fixed in 1.5.

[VI Toolkit] C:\tmp> 1..4 | % { new-vm -na "testsvr$_" -templ test1 -vmhost eazye* -runa }

Name                           State      % Complete Start Time   Finish Time
----                           -----      ---------- ----------   -----------
CloneVM_Task                   Running             0 01:33:38 PM
CloneVM_Task                   Running             0 01:34:00 PM
CloneVM_Task                   Running             0 01:34:21 PM
CloneVM_Task                   Running             0 01:34:41 PM






[PowerShell MVP|https://mvp.support.microsoft.com/profile=5547F213-A069-45F8-B5D1-17E5BD3F362F], VI Toolkit forum moderator

Author of the upcoming book: Managing VMware Infrastructure with PowerShell

Co-Host, PowerScripting Podcast (http://powerscripting.net)

Need general, non-VMware-related PowerShell Help? Try the forums at PowerShellCommunity.org

My signature used to be pretty, but then the forum software broked it. vExpert. Microsoft MVP (Windows PowerShell). Author, Podcaster, Speaker. I'm @halr9000
0 Kudos