commands are doing nothing

Sep 12, 2008 at 10:27 AM
Thanks to the PSHyperv team first.

I loaded the hyperv.ps1 but if I call Ping-VM <vmname> or Get-VMState <vmname> there is not output at all.
Any ideas to figure out pshyperv is working?

I am fighting the freebsd shutdown problem Luka mentioned here http://luka.manojlovic.net/2008/07/18/hyper-v-freebsd-shutdown-problem-workaround.
So first I want to try the original
pshyperv  - later on Luka's version containing the Kill-VM.


Thomas
Sep 15, 2008 at 2:31 PM
Hi folks,

I was trying again to get these tools running.
I opened a powershell and loaded the script first.

But calling things like this:
Start-VM myvm01

or like this:
Ping-VM myvm02

are not working

The only Call that worked was:
New-VM myvm03

The vm myvm03 was created.

Is the a manual, a wiki or so? I am willing to help testing.

Cheers Thomas
Coordinator
Sep 15, 2008 at 8:09 PM
If you are not logged on as THE administrator, you need to run powershell elevated.

There are examples for each command in the script, proper documentation is being worked on.

It also FAILS if you are running the beta of hyper-V

Oct 24, 2008 at 10:12 AM
Edited Oct 24, 2008 at 10:25 AM
As Administrator, hyper-v RTM, No output from any script, List-VM, Get-VM, etc....

standard and Luka's version with Kill-VM
Jan 8, 2009 at 12:20 PM
Hello,

I have the same issue like tommew and Fileman. New-VM is working, the rest creates neither a error nor an output.
Jan 26, 2009 at 6:35 PM
Everyone, make sure you have KB950050 installed if you have problems.
Jan 29, 2009 at 1:59 PM
Hello,

I am French and i have the same problem but I FIXED IT.

In hyperv.ps1, you have tou change only one word :
line 393,  replace "Virtual%" by "%Virtu%"

It's not a bug, it's because in French 2008 server we have "Ordinateur Virtuel" and in english "Virtual Machine"


Thanks for your job, it's great !!

Jan 29, 2009 at 2:15 PM
ste6908,

Thanks, that's also a fix for the beta release of Hyper-V (prior to one installing KB950050).  Do you have that patch also?
Coordinator
Jan 29, 2009 at 11:57 PM
Marco , in with KB950050 in English versions it is Microsoft Virtual Machine. , in French  adjective and the noun go the other way round, so it is Ordinateur (computer) Virtuel (virtual) not Virtual computer.
I have done nothing about localization support, but one of the things that I will need to do if I get there is to have a string which contains what to test to seperate VMs from Hosts in this function : right now it is painful for anyone who is working in a non-English version.
Jun 1, 2009 at 8:34 AM

Hello,

I've had the same problem like ste69008. I worked with a German version of Windows Server 2008. I also maked the change that ste69008 describes and the library work.

Maybe it is possible that further versions of the library works with the most languages of the Windows Server.

Thanks for this great library!!!

Coordinator
Jun 7, 2009 at 9:30 AM

I'm going to (a) Change this and (b) document it so that if virt% doesn't work people will know what to change.

 

 

Jul 16, 2009 at 4:45 PM

Hi, I am from Russia! At first sorry for my english (

I am using Windows Server 2008 SP2 Rus and Hyper-V (not beta)

Library, that i have downloaded from here is great, but did not work on my platform )) I have the same situation like tommew. All commands doing nothing (get-vm, start-vm for example), commands like "get-vmhost" or  "new-vm" are working but i want another. I am using PowerShell under Domain Admin, WMI method to show my Virual machines is working good. User ste69008 said about line 393 in main script, but in my version in this line i can not see "Virtual%.

Please help me! or say that it is impossible )

Jul 17, 2009 at 8:17 AM

Hi Pashtet,

 

I guess the problem is the localized version of Windows Server 2008 SP2. We hade the same problems with ther German Version and as I see you are using the Russian Version.

We do not use Hyper-V anymore - we changed to XenServer. Linux VM integration is far better than i Hyper-V.

 

Cheers

Thomas

 

Jul 17, 2009 at 10:24 AM

Hmmm.....Xen, I am using FreeBSD on my servers, maybe should to try )))

Another question. If i will install English Version of Hyper-v, Powershell Library will work?

Jul 17, 2009 at 10:32 AM

I guess Powershell lib will work.

We do have about 50 VM in our Xen Enviroment and there are 2 FreeBSD (6.4 x32 and 7.0 x64) as well.

Xen tools will not work. Live migration will not work. But performance is fine.

 

Thomas

Jul 17, 2009 at 11:23 AM

@pashtet,

From the server itself, run:

PS>get-wmiobject -ns "root\virtualization" -cl msvm_computersystem|select caption

Report back here on the output you see.

In the most recent version of the library, you must look at line 448 if Get-VM isn't working for you.

@tommew,

Please keep the content relevant to this site.

Jul 17, 2009 at 3:48 PM
Edited Jul 17, 2009 at 3:52 PM

When I could not find word in line 393, i found it in line 448. Here is it after changing "Virtual%":

 

$WQL="Select * From MsVM_ComputerSystem Where ElementName Like '$Name' AND Caption Like '%Virtu%' "
But script did not work before and after my changes(

PowerShell command
"get-wmiobject -ns "root\virtualization" -cl msvm_computersystem|select caption"
is incorect, in "-ns" parameter. I think comandlet like this
"get-wmiobject -NameSpace "root\virtualization" -cl msvm_computersystem|select caption |select caption"
is correct.

well, i can show you report from this command and command without "select caption"

PS C:\> get-wmiobject -NameSpace "root\virtualization" -cl msvm_computersystem | select caption

caption
-------
Компьютерная система для размещения
Виртуальная машина


PS C:\> get-wmiobject -NameSpace "root\virtualization" -cl msvm_computersystem

Host                      VMElementName             State        Up-Time (mS) Owner
--------                  -------------             -----        ------------ -----
HYPER-V                   HYPER-V                   Running
HYPER-V                   XP                        Suspended    0            PENZAGP\administrator

As you can see, wmi objects work in my system

 

Coordinator
Jul 24, 2009 at 7:26 PM

Pashtet the query checks for the caption being virutal machine I changed it to %virtu% so it works with french and german.  That's how it filters out the entry for the host -  you need to find what the russian text is and replace '%virtu%' with %Виртуальная%  (Live translation has "Компьютерная система для размещения" = Computer System to accomodate , which I guess is the host, and "Виртуальная машина" = virtual machine).