Quantcast
Channel: Virtual Machine Manager – General forum
Viewing all 2770 articles
Browse latest View live

Invoke-SCScript in Action Add-In | Unknown Error

$
0
0

Hi,

I am creating an add-in for the virtual machine manager that will backup the selected VM(s) on the host.
I've come so far, but my script is not working.
I allways get the error message box.

What am I doing wrong? Is "Host" the right context in this case?

using Microsoft.SystemCenter.VirtualMachineManager;
using Microsoft.SystemCenter.VirtualMachineManager.UIAddIns;
using Microsoft.SystemCenter.VirtualMachineManager.UIAddIns.ContextTypes;
using Microsoft.VirtualManager.Remoting;
using System;
using System.AddIn;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace Microsoft.VirtualManager.UI.AddIns.BackupAddIn
{
    [AddIn("Make Backup")]
    public class BackupAddIn : ActionAddInBase
    {
        public override bool CheckIfEnabledFor(IList<ContextObject> contextObjects)
        {
            if (contextObjects != null && contextObjects.Count > 0)
            {
                foreach (var host in contextObjects.OfType<HostContext>())
                {
                    if (host.ComputerState != ComputerState.Responding)
                    {
                        return false;
                    }
                }
                return true;
            }

            return false;
        }

        public override void PerformAction(IList<ContextObject> contextObjects)
        {
            if (contextObjects != null)
            {
                VMContext VMs = contextObjects.OfType<VMContext>().FirstOrDefault();
                if (VMs != null)
                {
                    String expDir = Microsoft.VisualBasic.Interaction.InputBox("Enter the export path for the selected virtual machine(s) on the host.", "Export path", "C:\\ClusterStorage\\Volume2\\");
                    MessageBox.Show(expDir); //Debug only
                    if (!expDir.Equals("")) //Aborting the InputBox returns an empty string. In this case we simply skip the add-in code.
                    {
                        foreach (var vm in contextObjects.OfType<VMContext>())
                        {
                            exportVM(vm, vm.VMHostId.ToString(), expDir);
                        }
                    }
                }
            }
        }

        public void execPSScript(String nScr, String hostID)
        {
            System.Windows.Forms.MessageBox.Show("execPSScript(" + nScr + "," + hostID + ") was called"); //Debug only
            this.PowerShellContext.ExecuteScript<Host>(//Maybe it has to be another context
                        scvmmPsCommand(nScr, hostID),
                        (error, inf) =>
                        {
                            if (error == null)
                            {
                                MessageBox.Show("Backup successfully created."); //only show this when the final command was executed
                            }
                            else
                            {
                                MessageBox.Show("An error occured.\nSomething must be wrong with this script: \n" + scvmmPsCommand(nScr, hostID));
                            }
                        });
        }

        public void exportVM(VMContext VM, String hostID, String nExpPath)
        {
            string hostPsCommand = string.Format("export-vm -name {0} -path {1}", VM.Name, nExpPath); //Not shure if this will work either
            execPSScript(hostPsCommand, hostID);
        }



        public String scvmmPsCommand (String nCmnd, String hostID) {
            return string.Format("Invoke-SCScriptCommand -VMHost {0} -Executable \"C:\\Windows\\System32\\WindowsPowershell\\v1.0\\powershell.exe\" -CommandParameters \"{1}\" -TimeoutSeconds 60", hostID, nCmnd);
            //return string.Format("Invoke-SCScriptCommand -VMHost {0} -Executable \"C:\\Windows\\System32\\WindowsPowershell\\v1.0\\powershell.exe\" -TimeoutSeconds 60", hostID);
            //return string.Format("Invoke-SCScriptCommand -VMHost {0} -Executable \"cmd.exe\" -TimeoutSeconds 60", hostID);
        }
    }
}

Thank you in advance. :)


HyperV Virtual NIC not Visable on SCVMM

$
0
0

HI I have installed Hyper V On One of the HP G7 hardware , and SCVMM is on G6 Hardware,

After configuring Hyper V Role, I have teamed the 4 NIC to One Teaming and created multiple VnNIC by using below Script.

Issue here After adding the Host to SCVMM i am unable to find the VNICs, I can see only Vswitch, Please suggest, I have attache3d the screenshot for the references.

___________________________________________________________________________________________________

New-NetLbfoTeam -Name TEAMNIC -TeamMembers NIC1,NIC2,NIC3,NIC4 -LoadBalancingAlgorithm HyperVPort -TeamingMode SwitchIndependent
New-VMSwitch -Name VSWITCH -NetAdapterName TEAMNIC -AllowManagementOS $False -MinimumBandwidthMode Weight
Set-VMSwitch VSWITCH -DefaultFlowMinimumBandwidthWeight 20

Add-VMNetworkAdapter -ManagementOS -Name "Management" -SwitchName "VSWITCH"
Add-VMNetworkAdapter -ManagementOS -Name "LiveMigration" -SwitchName "VSWITCH"
Add-VMNetworkAdapter -ManagementOS -Name "VirtualMachine" -SwitchName "VSWITCH"
Add-VMNetworkAdapter -ManagementOS -Name "CLuster" -SwitchName "VSWITCH"VSWITCH

Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "Management" -Access -VlanId 251
Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "LiveMigration" -Access -VlanId 62
Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "VirtualMachine" -Access -VlanId 62


Set-VMNetworkAdapter -ManagementOS -Name "Management" -MinimumBandwidthWeight 10
Set-VMNetworkAdapter -ManagementOS -Name "VirtualMachine" -MinimumBandwidthWeight 50
Set-VMNetworkAdapter -ManagementOS -Name "LiveMigration" -MinimumBandwidthWeight 30

VMM 2012 R2 user authentication from alternative domain

$
0
0

I have a problem which is probably not very common which I'm hoping someone might be able to advise on. Unfortunately the relationship between our lab and the corporate AD has made this setup quite complex.

We have 2 domains, we'll call them 'Server Domain' and 'User Domain'. 

Servers are members of 'Server Domain'
Users are members of 'User Domain'

Server Domain has access to the User Domain RODC with a one way trust from Server Domain to Users.

We have a VMM 2012 R2 Environment with Hyper-V 2012 R2 Servers all located in Server Domain

Our user computers are all members of the Server Domain but login to their computers using User account accounts that are members of User Domain.

What I need to be able to do is allow Users to login using their User Domain account to the VMM Environment (via App Controller) on the Server Domain. I've created Domain local groups on the Server Domain and added the user accounts from the User domain.

However, when I try to login using one of these accounts I get a SQL Server access error:

The SQL Server service account does not have permission to access Active Directory Domain Services (AD DS).

Ensure that the SQL Server service is running under a domain account or a computer account that has permission to access AD DS. For more information, see "Some applications and APIs require access to authorization information on account objects" in the Microsoft Knowledge Base at http://go.microsoft.com/fwlink/?LinkId=121054.

ID: 2607

Has anyone any experience of this particular setup? I've found very little in my various searches so any suggestions or advise would be appreciated.

Thanks

HyperV Virtual NIC not Visable on SCVMM

$
0
0

HI I have installed Hyper V On One of the HP G7 hardware , and SCVMM is on G6 Hardware,

After configuring Hyper V Role, I have teamed the 4 NIC to One Teaming and created multiple VnNIC by using below Script.

Issue here After adding the Host to SCVMM i am unable to find the VNICs, I can see only Vswitch, Please suggest, I have attache3d the screenshot for the references.

-------------------------------------------------------------------------------------------------------------------------

New-NetLbfoTeam -Name TEAMNIC -TeamMembers NIC1,NIC2,NIC3,NIC4 -LoadBalancingAlgorithm HyperVPort -TeamingMode SwitchIndependent
New-VMSwitch -Name VSWITCH -NetAdapterName TEAMNIC -AllowManagementOS $False -MinimumBandwidthMode Weight
Set-VMSwitch VSWITCH -DefaultFlowMinimumBandwidthWeight 20

Add-VMNetworkAdapter -ManagementOS -Name "Management" -SwitchName "VSWITCH"
Add-VMNetworkAdapter -ManagementOS -Name "LiveMigration" -SwitchName "VSWITCH"
Add-VMNetworkAdapter -ManagementOS -Name "VirtualMachine" -SwitchName "VSWITCH"
Add-VMNetworkAdapter -ManagementOS -Name "CLuster" -SwitchName "VSWITCH"VSWITCH

Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "Management" -Access -VlanId 251
Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "LiveMigration" -Access -VlanId 62
Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "VirtualMachine" -Access -VlanId 62


Set-VMNetworkAdapter -ManagementOS -Name "Management" -MinimumBandwidthWeight 10
Set-VMNetworkAdapter -ManagementOS -Name "VirtualMachine" -MinimumBandwidthWeight 50
Set-VMNetworkAdapter -ManagementOS -Name "LiveMigration" -MinimumBandwidthWeight 30

VMM Bandwidth Utilization

$
0
0

hi,

anyone has any idea on how much network bandwidth use and require by VMM  especially managing different branch environment from central location?

Please advice 

Thanks


Lai (My blog:- http://www.ms4u.info)

VM rebooting before GUIRunOnce has finished

$
0
0

I have a SCVMM 2012 R2 U4, and when I deploy a 2012 R2 gen 2 guest with an answer file to do 1 autologon, my GUIRunOnce command runs and starts to install my application but before it is finished the server reboots, has anyone else come across this?

Cheers

Chris

HyperV

$
0
0

I have OS 8.1 and can not activate Hyper V because it is not in Windows features. How to display in windows features.?Thanks

VMM 2012 R2 - Network Received/Sent Throughput Stats

$
0
0

Hi all, who has used VMM 2012R2 and has looked at the Network Received / Network Sent Throughput statistics that you see in the VMs view in the Home tab? Its shows the network activity for VMs and I'd like to know how these figures are derived. What I'm really trying to do is to accumulate some statistics of which VMs are generating the most disk I/O over time. I've got several 2012R2 hv clusters using CIFS shares and cluster shared volumes. Anybody know of a way that I can collect per vm disk I/O stats if I'm using CIFS shares and CSVs for virtual machine storage? Any feedback would be greatly appreciated. Thanks. Side question: If I have iscsi drives connecting to virtual machines, do these disks bypass hyper-v and would I be able to monitor disk I/O on them?


impossible to boot a Generation 2 virtual machine.

$
0
0

Hi all,

My laptop has Windows 8.1 64B installed.

I created a .vhdx file from an iso file containing Windows server 2012 R2 using Convert-WindowsImage.ps1.

I can mount the vhdx file and it seems it is functioning vhdx file.

In Hyper-V manager I created new Generation 2 virtual machine.

In the settings of the virtual machine I navigated to SCSI Controller and created new Hard Drive pointing to the newly created .vhdx file.

Now when I right click on the Virtual Machine and choose start it generates these errors.

PXE Network Boot using IPV4
PXE-E18: Server response timeout.
Boot Failed. EFI Network
Boot Failed: EFI SCSI Device.
No operating system was loaded. press a key to retry the boot.

When I press a key it comes up with same error.

Thanks for your help and appreciate all kind of advice.


Prerequisites for Creating Private Clouds in VMM 2012 R2

$
0
0

Hello,

We have recently deployed SCVMM 2012 R2. We have added all the Hosts and Hosts Group to VMM, and done with creating a VMM Library share.

Now, we want to configure Private Clouds from our Host groups. Is it mandatory to create/configure the Fabric resources (Networking, Storage, etc.) in VMM before starting the configuration of Private Cloud? Or can we continue without configuring the Farbric resources?

Please assist and guide.

Thank you.

Regards,

Hasan Bin Hasib

VMM 2012 sp1 keeps on crashing when starts the VMM console

$
0
0

This problem has bothered us so much since we installed the last 1 or 2 update rolls. I was not able to find any relevant info online after digging for hours. The forum is my last hope now so any suggestion would be very much appreciated.

We are currently on 3.1.6018.0, with all the updates for SP1 installed. Every time we start the VMM console, we have to keep our fingers crossed, very likely it will crash and we have to restart the VMM service. Then we would be fine for a while until later someone starts a new VMM console session. 

The errors logged every time: 2 identical event 1(I found it interesting to have identical errors from the same source to be logged twice), and event 19999

Event 19999:

Error1/12/2015 11:29:54 AMVirtual Machine Manager 19999None

Virtual Machine Manager (vmmservice:19340) has encountered an error and needed to exit the process. Windows generated an error report with the following parameters: 
Event:VMM20
P1(appName):vmmservice
P2(appVersion):3.1.6018.0
P3(assemblyName):Engine.Deployment
P4(assemblyVer):3.1.6018.0
P5(methodName):M.V.E.D.SANStorageManagementHelper.FindVolumeForGivenFileSystemPath
P6(exceptionType):System.NullReferenceException
P7(callstackHash):ad2a
.

Event 1

Error1/12/2015 11:29:54 AMVirtual Machine Manager 1None

System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.VirtualManager.Engine.Deployment.SANStorageManagementHelper.FindVolumeForGivenFileSystemPath(WsmanAPIWrapper wsmanWrapper, String inputFilePath, StorageManagementHelper storageManagementHelper, String& rootPath)
   at Microsoft.VirtualManager.Engine.Deployment.SANStorageManagementHelper.GetLUNIDFromFSPath(WsmanAPIWrapper wsmanWrapper, String FileSystemPath, StorageDeviceIdentifier& storageIdentifier, String& VolumeRootPath, Boolean& IsiSCSILUN, String& DiskDeviceID, String& DiskUniqueID)
   at Microsoft.VirtualManager.Engine.Deployment.SANAcceleratorHelper.MapFSPathToLun(WsmanAPIWrapper sourceWrapper, String fspath, String& root, StorageDeviceIdentifier& lunID, Boolean& isIsciLun, String& diskAddress, String& diskUniqueID)
   at Microsoft.VirtualManager.Engine.Deployment.VMLUNMappingReader.MapFileOrDiskToLUN(WsmanAPIWrapper sourceWrapper, List`1 vmFilesToLunInfoList, Object physicalItemOrDiskOrPath, Boolean hypervVM, VMFilesToLunInfo hypervConfigLun)
   at Microsoft.VirtualManager.Engine.Deployment.VMLUNMappingReader.MapVMFilesToLUN(List`1& vmFilesToLunInfoList, WSManConnectionParameters hostConnectionParameters)
   at Microsoft.VirtualManager.Engine.Deployment.VMLUNMappingReader.GetVMLUNInformationFromRealWord(List`1& lunInfoList, WSManConnectionParameters hostConnectionParameters)
   at Microsoft.VirtualManager.Engine.Deployment.VMLUNMappingReader.GetVMSANConfigurationFromRealWorld(WSManConnectionParameters hostConnectionParameter)
   at Microsoft.VirtualManager.Engine.Deployment.VMLUNMappingReader.HasVMLUNInformationChanged(VMSANConfiguration& sanConfig, WSManConnectionParameters hostConnectionParameter)
   at Microsoft.VirtualManager.Engine.BitBos.VMRefresherBase.UpdateVMLUNInformation()
   at Microsoft.VirtualManager.Engine.BitBos.VMRefresherBase.UpdateFullVMObjectToCarmine(IVMComputerSystem vmComputer, VMData vmData, UpdateRequired updateRequired, Boolean vmObjectHasChanged)
   at Microsoft.VirtualManager.Engine.BitBos.VMRefresherBase.FullyRefreshVM(FullyResheshVMParamObject param)
   at Microsoft.VirtualManager.Engine.BitBos.VMRefresherBase.<>c__DisplayClassc.<RunFullRefresher>b__a(Object paramObj)
   at Microsoft.VirtualManager.Utils.Multithreading.ThrottledThreadPool.<>c__DisplayClass3.<ScheduleNextThread>b__2(Object dummy)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()-2147467261

VMM PXE PROVIDER WDS INTEGRATION FAILS DURING HYPER-V HOST PXE BOOT Wrong Bootfile

$
0
0

I enabled "Debug" logging for Deployment-Services-Diagnostics and tried to again do a bare metal deployment.

Looking at the information in the event log, none of the files are from the path created when the VMM agent on the WDS machine started communicating with the VMM server.  All of the path references are to \Boot\.... NOT \DCMgr\Boot\...

Are there any registry settings or other places I can check to try and figure out what is going wrong?

Create Site to Site VPN from AzurePack

$
0
0

Dears experts, I want to create Site to Site VPN from AzurePack, to Windows 2012 RAS server, I got the below error

Error Message: Execution of Microsoft.SystemCenter.NetworkService::RegisterGatewayVMNetwork on the configuration provider 4ee559f1-f479-480c-9458-d14b8b1c1779 failed. Detailed exception: Microsoft.VirtualManager.Utils.CarmineException: Unable to add routing domain information to the Remote Access server. (The operation identifier is not valid. ) Fix the issue in Remote Access server and retry the operation. Recommended Action: Check the documentation for the configuration provider or contact the publisher support.

1- I want documentations for this process .

2- The combatable protocols with Microsoft NVGTW  (IKEV2- LT2P- PPTP). and the other providers  ( Cisco or others ) .

3- The configuration on the other side  VPN (provider) .

4- the fire wall requiremnts

Thx


Ahmad Samir | MCSE 2003 | MCTS: Exchange 2010, MCTS: Lync 2010. MCTS: SCOM 2007

How do you create an external logical switch in SCVMM2012?

$
0
0
I've been trying to find out how to create an external(insecure) logical switch, that some of the NICs in the Office 365 servers (Federation Services Proxy server among others) need to be connected to.
But I've yet to find a guide that shows you how to do this.

Are there anyone who knows how, or have superior google skills than me, that can find such a guide? :P
Thanks.

Installing SCVMM 2012 r2 in a VM on Hyper-V 2012 and windows failover cluseter

$
0
0
Hi,
I am planning to configure scvmm 2012 r2 that will be managing 30 hyper-v host servers, please guide me will it be ok if i install and configure both scvmm 2012 r2 and sql server 2012 on same VM running on Hyper-V Failover Cluster ?

Regards,

Afzal
muhammadafzalmunir@gmail.com

Service Teplates vs Virtual Machine Templates vs Cloning

$
0
0

I need to find the method with the best performance for creating new virtual machines when a customer joins our private cloud.

The use case is as follows.

Our customers will submit their application settings via our customer portal

Then our software creates a new virtual machine for the customer.  This machine will have windows Server 2012 R2 with IIS and SQL Server 2014.  It will also contain our desktop application with the settings the customer submitted.

After the virtual machine is created, the customer will be able to immediately access the application without any interaction with our staff.

Thanks,

Eric

Can't Delete Private Cloud - tbl_WLC_PhysicalObject not being updated

$
0
0

I am having issues with our SCVMM instance where I can't delete Private Clouds...even if there empty. 

When I right click the Private Cloud and click Delete, the "Jobs" panel says it finished successfully, however, the Private Cloud is not deleted. 

After doing some researching, I believe its because entries in the tbl_WLC_PhysicalObject database table are not being updated correctly, when a VM is moved from one Private Cloud to another. After determining the "CloudID" of the Private Cloud I am trying to delete, I still see resources assigned to this Private Cloud in the tbl_WLC_PhysicalObject table, even though from VMM Console, the Private Cloud shows up empty. 

For some testing purposes, I assigned a VM back to the Private Cloud I am trying to delete, only to move it out again and gather some tracing/logging. When I moved the VM back out of the Private Cloud, I had a SQL Profiler running in the background, capturing the SQL statements on the DB server. Looking at the "exec dbo.prc_WLC_UpdatePhysicalOBject" statement, I see the @CloudID variable is assigned the "CloudID" of the Private Cloud the VM is currently assigned to/the Private Cloud I am trying to delete and is NOT the CloudID of the Private Cloud the VM is being moved to/assigned to. 

Instead of having the VMM Console GUI do the Private Cloud assignment/change...I copied the PowerShell commands out...so I can run them manually. Looks like the script gets 4 variables ($VM, $OperatingSystem, $CPUType, and $Cloud), and then runs the "Set-SCVirtualMachine" CMDLET. For the $Cloud variable, it does return the proper "CloudID" of the Private Cloud I am trying to move the VM too (I ran it separately and then ran an ECHO $Cloud to look at its value). When I run the "Set-SCVirtualMachine" CMDLET, the output has values for "CloudID" and "Cloud" and these are still the values of the source Private Cloud/Private Cloud I am moving the VM out of and ultimately want to delete. 

Has anyone ran into this? Is something not processing right in the "Set-SCVirtualMachine" CMDLET?

Create Cloud WIzard showing Memory and Storage as Zero!!!

$
0
0

I am trying to create a private cloud in VMM 2012 R2.

When I go through the 'Create Cloud Wizard' the 'Resources' tab shows that I have 2 hosts groups with a total of 1,279.69GB of Total Memory and 4,679.78GB of Total Storage. When I get down to the 'Capacity' tab 'Total Capacity' for Memory and Storage is 0 GB! I found another post with the same issue (see link below) but it was not resolved.

https://social.technet.microsoft.com/Forums/scriptcenter/he-IL/52468946-b33e-4dec-8faa-a395b40045c9/create-cloud-wizardmemory-capacity-is-zerovmm-2012-r2?forum=virtualmachingmgrsetup

How do I get the memory and storage to become available to create the cloud?

Please Help!

Error 13641 - The Subnet prefix must be between the starting and ending values

$
0
0

Hi All,

I can honestly say hand on heart that this is the first time I have ever asked for help in a forum in over 15 years but this is doing my head in..

I have a Sys Center 2012 R2 deployment..  VMM R2 up to RU3, Edge Cluster (2 hosts), Management Cluster (2 hosts), 2 x Production Compute Clusters (total of 20 hosts).  I have a HA Network Virt Gateway deployed on the edge cluster.

All Hosts have the new DHCP install done and the RU3 SQL patch is completed as outlined in deployment manual.

Everything had been running fine for some time after RU3 update...  I am experiencing an issue whereby I get the following error anytime I try and attach a NVGRE VM network to a VM, or when I try and migrate a VM with a NVGRE network attached to another host.

Error (13641)
The specified subnet prefix must be between the starting and ending values for the range.
Starting value: 4
Ending value: 30

Recommended Action
Specify a suitable subnet prefix.

All subnets in the entire network are /24's so prefix isn't an issue.

I can successfully attach a standard vm network but get the above error when working with NVRGE networks.. 

Further to this, if I restart VMM the DHCP function to VM's with NVGRE networks doesn't get picked up until I trigger a change in config on the VM, then it will get IP and function as expected.

I have checked all logs, there aren't any errors that I can see.

get-netvirtualizationlookuprecord throws out VM's and PA's as expected, but again not until I manually interfere with the VM in question.

Have any of you come across this before??  I want to check before I go rebuilding the PA network entirely and having to cleanup all existing VM networks to do it..

Any help or guidance would be appreciated..

Cheers

Nathan

System Center 2012 R2 Update 4 - Windows 10 Technical Preview Supported for Guest Services

$
0
0

My group needs to start evaluating Windows 10 for development and we have a SCVMM 2012 R2 Update 4 environment. We are trying to create VM Templates of the Windows 10 machines (we've installed Visual Studio editions) and when we try to install Guest Services on the VMs we get the following error message:

The configuration registry database is corrupt (0x800703F1).

Does SCVMM 2012 R2 support Windows 10 Technical Preview/Windows 10 Consumer Preview?

Or do we have to upgrade to System Center Technical Preview?

Is it possible\recommended to upgrade SCVMM 2012 R2 to System Center Technical Preview?


Ian Ceicys

Viewing all 2770 articles
Browse latest View live