Quantcast
Channel: Hyper-V forum
Viewing all 19461 articles
Browse latest View live

root\virtualization\v2 - ApplySnapshot method parameters? Invalid State?

$
0
0

Good morning all,

Tried posting this in the scripting section, but I was advised to try here. Using a combination of the WMI Code Creator example, combined with the method to get the VM object from Microsoft's root\virtualization\ example of ApplyVirtualMachineSnapshot, (no VBScript example for V2)

https://msdn.microsoft.com/en-us/library/cc136767(v=vs.85).aspx

I am trying to put together a VBScript to apply a snapshot, but I keep getting errors 32773 (invalid parameter) or 32775 (invalid state). I know the VM and snapshot are in a state that can be applied, because I can do it from the Hyper-V Manager console, but no matter what property I try fails with one of those two errors. Passing the InParam as ".Path" ".InstanceID" ".ElementName" or anything else results in error 32773, but ".Path_.Path" gives a 32775 which makes me think that is the right parameter. Why wrong state error?

This one is driving me insane. I would appreciate any help in figuring this out. The full script is below. Thank you in advance!

Option Explicit

Dim strComputer, strVM
Dim objWMIService, objShare, objItem, objVM
Dim SnapList, Snap, SnapShot, VMList
Dim objInParam, objOutParams

'On Error Resume Next

' Strings will be passed as arguments once this is working
strComputer = "<HVServer>"
strVM = "<VMElementName>"

' Connect to host server's WMI
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\virtualization\v2")

' Obtain an instance of the the class using a key property value.
Set objShare = objWMIService.Get("Msvm_VirtualSystemSnapshotService.CreationClassName='Msvm_VirtualSystemSnapshotService',Name='vssnapsvc',SystemCreationClassName='Msvm_ComputerSystem',SystemName='" & strComputer & "'")

' Get VM object from function
Set objVM = GetComputerSystem(strVM)

' Just for testing sake, grab all snapshots and match to snapshot name
Set SnapList = objWMIService.ExecQuery("SELECT * FROM Msvm_VirtualSystemSettingData WHERE VirtualSystemType = 'Microsoft:Hyper-V:Snapshot:Realized'")
For Each Snap In SnapList
 If inStr(Snap.ElementName,strVM) Then
  msgBox Snap.Path_.Path
  ' Successfully finding snapshot object here
  Set SnapShot = Snap
 End If
Next
If (Err.Number <> 0) Then
 msgBox  "Err.Number: " & Err.Number & vbCrLf & _
   "Err.Description: " & Err.Description, _
    0+16,"Error!"
 WScript.Quit(1)
End If
 
' Obtain an InParameters object specific to the method.
Set objInParam = objShare.Methods_("ApplySnapshot").inParameters.SpawnInstance_()
objInParam.Properties_.Item("Snapshot") = SnapShot.Path_.Path

' Execute the method and obtain the return status.
' The OutParameters object in objOutParams is created by the provider.
Set objOutParams = objWMIService.ExecMethod("Msvm_VirtualSystemSnapshotService.CreationClassName='Msvm_VirtualSystemSnapshotService',Name='vssnapsvc',SystemCreationClassName='Msvm_ComputerSystem',SystemName='" & strComputer & "'","ApplySnapshot", objInParam)

' List OutParams
msgBox  "Out Parameters: " & vbCrLf & _
  "Job: " & objOutParams.Job & vbCrLf & _
  "ReturnValue: " & objOutParams.ReturnValue, _
   0+16,"Error!"


'-----------------------------------------------------------------
' Retrieve Msvm_VirtualComputerSystem from base on its ElementName
'-----------------------------------------------------------------
Function GetComputerSystem(vmElementName)
 Set VMList = objWMIService.ExecQuery("SELECT * FROM Msvm_ComputerSystem WHERE Caption = 'Virtual Machine'")
 For Each objItem In VMList
  If UCase(objItem.ElementName) = UCase(vmElementName) Then
   Set GetComputerSystem = objItem
  End If
 Next
 If (Err.Number <> 0) Then
  msgBox  "Err.Number: " & Err.Number & vbCrLf & _
    "Err.Description: " & Err.Description
  WScript.Quit(1)
 End If
End Function



Host a Hyper-V environment in another host?

$
0
0
We need to create a lab environment where we can spin up the following to help train people how to use HyperV with our applications.

Each student will need:
2 HyperV systems
each system will have 4 Windows Server 2012 R2 VMs on it.

The 2 hosts need to be virtual so that we can duplicate them and grow with scale depending on the number of students in the class.

However at this time it looks like HyperV cannot be a role installed on a VM that is hosted by VMware host or HyperV host. At least not in a supported state.

We're not sure how else we're supposed to train our staff on using HyperV in the field. It can't just be basic HyperV training that is already out there.

Is there any product out there where you can create a virtual machine that runs HyperV and then inside that VM which is now a virtual host, run four other VMs?

Since Microsoft and VMware both don't officially support running nested HyperV I'm not sure where to look.

Windows 8.1 Hyper-v Clipboard becomes slow to copy

$
0
0

In enhanced session mode copying files and folders to the Virtual machine (Windows 8.1) has got a lot slower for some reason that I can't understand.

Can anyone think of a reason? Any potential solutions?

Using SSD's in the machine, there appears to be enough HDD space so it should stay quick? Does the number of checkpoints have an impact? Machine account times out so have to regularly checkpoint.

Kind regards,

Peter


Sort VM List in Hyper-V Manager

$
0
0
Is it possible to sort the list of VMs in the Hyper-V Manager console other than re-adding them in a specific order?

Shared storage presented through iSCSI or an SMB share?

$
0
0

So I've read what feels like an endless amount of text on the wonderful things that Storage Spaces and Hyper-V in 2012 R2 can offer, but I'm still asking myself the same question, namely - for a simple Hyper-V cluster with 2 nodes accessing shared storage on a JBOD, provisioned through Storage Spaces, do I point the HV nodes to the file server with either SMB shares, or by means of an iSCSI drive?

The simplicity of an SMB 3.0 share seems appealing, not because it appears less complex in terms of the setup, but I'm scratching my head over the CSV side of things. For the HV nodes connecting through to my file server via an iSCSI disk, the concept of later bringing those disks into the cluster as CSVs is logical. Is this possible when using an SMB share as the home of my VHDX files? Am I correct in thinking this can only be done when throwing SCVMM into the mix also?

Many thanks.

Very slow disk speed performance in comparison to Hyper V Host.

$
0
0

Hi,

Below are what I have along with the SPECS of each machine

Machine one - DELL OPTIPLEX 7010, 8GB, INTEstR) Core(TM) i7-3770 CPU @3.40GHz
---------------

HYPER V 2012 R2 <-- Partition one
Windows 7 Enterprise <--- Partition two

Machine Two - OPTIPLEX XE2, 16GB, INTEL(R) Core(TM) i7-4770S @ 3.10GHz 3.10GHz
----------------

Windows Server 2012

On windows Server 2012 I used Hyper V manager tool to connect to Hyper V on machine one and I created a Virtual Machine called VM1 with the following SPECS:

8 Virtual Processors which I believe is the MAX, Start up RAM: 2048MB, Dynamic Memory Enabled, using a standard VHDX Disk

My problem is the following:

On machine one I started Windows 7 Enterprise and RAN CrystalDiskMark which measures the READ/Write speed of the the hard disk, I got the following results:

Sequential Read - 104.3 MB/s and Sequential Write 101.1 MB/s 

I did the same on Machine two on the virtual machine (VM1) and i got the following results:

Sequential Read - 75.50 MB/s and Sequential Write 59.60 MB/s

As you can see the performance of the disk significantly drops when using the virtual machine.. I assume that the performance of the VM would be the same or a bit less than the host computer as it is using its resources.  I would really appreciate if someone can help me understand why this is happening

I will update this post with any other information is required.

Thank you.

vdisk interoperability between generation1 & generation2 VMs

$
0
0

Hi friends

i want to know when we create a Generation2 VM, can we use its hard disk as the parent vdisk to createGeneration1 virtual machines with differencing (child) vdisks?  what about vice versa?

thanks in advanced

Authorization manager problem in windows server 2012 R2 ! now what trick ?

$
0
0

Hi friend

it's about 6 months which i am struggling with this issue in hyper-v 2012 R2. 

we have a domain network and for employees i have created domain user accounts & are member of "Domainemployees" group.

we have a 2012 R2 hyper-v Host (joined to domain) & have created VMs for each employee on it.

using vmconnect.exe, i have created a shortcut to their VMs & this shortcut is located in theirHome folder which is mapped in their my computer window as a network drive.

i have performed all required steps which is mentioned here Here (John Howard blog) & here part2

 

but unfortunately, unlike hyper-v 2008R2, there Authorization manager doesn't work & seems they are ignored in windows server 2012R2. so although i have assigned required access to"Domain employees" group,when they double click on their VM shortcut (vmconnect) to connect to their VM's window,  that they encounter this error:

"You do not have the required permission to complete this task. Contact the administrator of the authorization policy for the computer" 

so the only workaround is to add our users into"Hyper-v Administrators" group in hyper-v Host LSD.

the downside of this is that users can manipulate their VM settings & configurations which is definitely undesirable ( for example they can change memory, processor, add disks,....)

i have seen many people has this problem & has posed their scenario in forums.

any finally what's the solution?

note that for some reasons, we can't migrate to VMM or System centers & .... we want to handle scenario without deploying System centers & VMM.

if really there is no other solution, i will add them to "Hyper-V Administrators" group, but know is there any trick to deny them from changing VM settings (although they are member of this group?! )

i tried to add them in VM's xml configuration files security tab & assign them deny permission, but no effect & they are still able to change vm settings.

you won't believe that because of the above issue, we have downgraded our server to windows 2008 R2 (which authorization manager works), but we have lost lots of benefits of new features of hyper-v 2012 R2 )   :-(

special thanks to whom help me from hell !







Slow IDE Performance

$
0
0

Hi, I have approx 800 virtual machines, on a FailoverCluster, connected using FC to a Compellent SAN (50% SAS, 50% SATA). some Windows 2003 R2, some Windows 2008, some Windows 2008 R2, some Windows 2012 and some Windows 2012 R2.

I tried VMs on both Windows Server 2012 and Windows Server 2012 R2.

When I copy a file over an IDE disk, I never go over 90 MB/s. 100 MB/s when copying from the network to the Drive.

When I copy a file over a SCSI disk, I copy between 350 MB/s and 450 MB/s.

If I start a copy over an IDE disk, and, at the same time, I start a copy over a SCSI disk, the copy speed on the IDE drop between 50 MB/s and 75 MB/s, and the SCSI disk copy at 350 MB/s+. Then speed come back on the IDE when the SCSI is over.

If I start two copy on two different IDE disks, the first copy will hang for a couple second when the second copy starts, and I won't go over 70 MB/s on each disk.

The 3 disks are Fixed, and on the same CSV (same LUN). When doing file copy on the HOST, I have the same performance as the SCSI VHDx.

When I create Gen 2 VMs (100% SCSI), they are incredibly more responsive than the Gen 1 (IDE).

How can I fix the IDE performance? Thanks!

Windows Server 2008 R2 Nesth problem

$
0
0

Hi All,

I need to setup a network of Windows Server 2008 R2 machines in Hyper-V (for learning SQL Server). I have succsselly setup the domain controller and 4 other servers.

However, the last server is a Core editition and Netsh gives me 'Element not found' error message when I type 'Netsh interface ipv4 set address “Local Area Connection” static 10.10.10.40'.

In case of the not core editions this kind of commands worked. Could you help me with this as I am totally lost in the world of Windows Server?

Many thanks.

P.

Limit Hyper-V Replication Data Transfer Rate

$
0
0

Hello,

i need to limit data transfer rate for Hyper-v replication because between two Datacenter have bandwidth limitation.

Please suggest

Disk Configuration Question for Performance

$
0
0

Hi,

I am looking for some advice on what the best way to configure my disk system is for performance when using Hyper-V. Currently I have two midline 7.2k SATA disks used for the hyper-V OS in RAID 1, and then 14 x 10k 600GB SAS enterprise disks in RAID 10. The RAID 10 is where all my VM’s exist on, but not directly on the physical disk, I use a product called StarWind which consumes almost all of the physical disk space, this is a virtual SAN and I use this for my CSV in the cluster, the VM’s all exist on this starwind disk, there is a tiny amount of overhead but I don’t think that’s really where my problem lies. We have 12 Virtual machines, so there is 1 spindle per VM, however it’s in RAID 10 so does this actually mean I have 7 spindles for 12 VMs?

The entire system almost grinds to a halt whenever I am copying new VM’s onto this host. I can’t use any other RAID type except for RAID 1 or 10. I know RAID 0 would give me better performance but we are not willing to take the risk. Now, it is my understanding that RAID 1 and 10 are essentially the same with the same performance and capacity, because of this I chose RAID 10 so I can take advantage of the combined capacity, but I am wondering if this is the best configuration.

I can think of a few other variations:

  • A single RAID 10 with one large partition but multiple CSV’s instead of one large one
  • A single RAID 10 with multiple partitions and a CSV on each partition
  • Multiple RAID 1, each having a single partition and a single CSV

Reading this site, there are a few pointers I have taken away regarding disk performance, a couple below I have questions about.

http://www.altaro.com/hyper-v/23-best-practices-improve-hyper-v-vm-performance/

Point 6 says “Use separate volumes for each VM. Since the administrative tasks of a virtual machine are controlled by its own process (VMWP.exe), keeping several virtual machines on a single volume will cause more Disk I/O operations from each worker process. Hence, it is recommended to use separate volumes for storing virtual machine files (VHD, VHDx, checkpoints, and XML).

Does this mean the arrangement I propose in my second point above – multiple partitions and a CSV on each partition? The term “Volume” seems to be a bit ambiguous depending on where you read

I believe point 14 to be incorrect though. “De-fragment Hyper-V Server regularly or before creating a virtual hard disk. It is advisable to defrag Hyper-V Server disks where the VHD and virtual machine configuration files are stored regularly or before creating a large virtual hard disk file.

It is my understanding that defrag only tends to work well if there are many files on the disk, on the physical disk in my case there is one massive starwind file so I don’t think defrag on the physical will do anything, defrag in the starwind disk might help but it is mostly large VHDX files – will defrag really make much difference?

Additionally, I don’t have any generation 2 VM’s and there’s nothing I can do about this right now, all data disks use SCSI channels on the VMs, all VHDX are fixed size.

Also, a slight side question but kind of related – I have both an exchange server and SQL server running as VM’s (the log files already exist on separate VHDs, but on the same physical RAID 10 disk), does my physical disks used for log files need to match those used for the DB, or can they be slower lower class disks… for example, if I place a 7.2K disk in with a RAID made up of 10K disks, it is my understanding that the entire RAID will lower its performance of the slowest member – is this true with log files and databases, if the log files are on slow disks will the database also go slower to match the pace of log files being written?

many thanks

Steve

VM - query to sql performance (VM vs old hardware)

$
0
0

Hi,

I am strugling with a performance issues.

We have a .net based application with 4 app server handling request of 1000 ritch clients. They handle batch jobs in the night. 

when we look at overall performance, the VM's are very fast

BUT transactions are 25% slower then the OLD hardware.

does anyone can give me a clue on how to troubleshoot this?

thx

Lieven

Hyper V Manager

$
0
0
Hi guys i wanted to ask whats the latest version of hyper v management for people running windows 7 because from the microsoft site the latest is v6.1 , but i know some one who is running v6.3  but his running windows 8.1?

Number of Operating system that can be install in Hyper-V

$
0
0

Dear Team,

Can you pls let me know along with Windows Server 2003/08/12 standard & Data center Edition , what is the maximum number of Operating system can be install in hyper V and it is free or it include some cost for license ? 

KunDan 


Hyper V Manager

$
0
0

hi guys,

i need your help with the following:

I installed the latest version of hyper v manager from the microsoft website and after enabling it from the "turn on windows feature in the control panel" i dont see the option to create a virtual machine, so i am puzzled as to why?

Not able to add more than one physical passthrough disk to a virtual SCSI controller

$
0
0

Hyper-V basic version, managed via Hyper-V manager from Windows 8.1

I have three physical drives (backup drives) that I would like to passthrough to a Windows Server Essentials 2012 R2 VM.

The WSE VM fails to start IF I have more than one physical drive attached to a virtual SCSI controller.

It will start if there is only one physical drive per controller, and once it is started I can add a second disk to one of the controllers without an issue.

Any suggestions? 

If not, I will probably just redo one of the drives as a Virtual drive and forget trying to pass them through as physical drives.

Thanks for any help!

Ross


Correlate VHDX to Windows Disk

$
0
0

Hello,

Is there a good way to determine which Windows volume/disk corresponds to a certain VHDX? I have some servers that have virtual hard disks of the same size, and it's difficult to determine the correct disk I want to expand, for example. I have resorted to putting the Windows disk label in the VHDX file name to remedy this issue, but it's more of a workaround than anything. Is there something obvious I'm missing? 

Thanks

Hyper-V 2012 standard - Guest VM aren't shutting down properly when host server shuts down.

$
0
0

We have a server 2012 standard hosting 2 Hyper-V machines, one is our Exchange and the other our App server.

We had a power outage last night and it looks that the host shut down cleanly but the VM's did not.I checked the event logs and the VM's are showing an unexpected shut down exactly the same time as the Host server. The host server event logs is showing "Event 6006" which to me is a clean shutdown.

Hyper-V Guest Shutdown Service is running on both VM's. On the Host that service was set to "Manual (Trigger Start)". I'm not sure what that means but I changed it to "Automatic (Trigger Start)"

Also, I tried to start HV Guest Shutdown Service on the host server but it just starts and stops. Is that because the startup type is set to "Trigger start"?

Any help is greatly appreciated. Thanks

cisco valet server

$
0
0
server .pop3. protocolSMTP, Port 25 secure(ssl) no. socket error 11001,error number 0x800cccod...This messge appears whenever I try to send scanned documents by email . Or when I try to click a site to reply via email. How to resolve? Thanks

Antonio R Nadal

Viewing all 19461 articles
Browse latest View live




Latest Images