ClusterPrepareSharedVolumeForBackup() fails on Window 2012 CSV

I've a Windows sever 2012 RC Hyper-V cluster with VM using CSV. There I'm seeing ClusterPrepareSharedVolumeForBackup() failing with error ERROR_INVALID_PARAMETER. It works fine on 2008 r2. Any idea what could be the issue here.

Hi Subhasish,
In your previous post, you have mentioned that no special logic is needed to track CSV backup process in Server 2012 and later OSes. That means, the same VSS procedure that used to snapshot non-CSV Hyper-V setup would be enough? For me, I am not getting
any errors during the VSS snapshot process but the writer status changed to VSS_WS_FAILED_AT_PREPARE_SNAPSHOT in the backup node and my CSV backup code failed with VHD sharing violation error (Error 32) during backup. The same code works fine in non-CSV Hyper-V
backup.
Error:
WRITER "Microsoft Hyper-V VSS Writer"
Status: 8 (VSS_WS_FAILED_AT_PREPARE_SNAPSHOT)
Writer failure code: 0x800423f0 (VSS_E_WRITERERROR_INCONSISTENTSNAPSHOT)
====================My pseudo code (Hyper-V VSS snapshot)====================
CreateVssBackupComponents();
VssBackupComp->InitializeForBackup();
VssBackupComp->SetBackupState(true, true, VSS_BT_FULL, false);
VssBackupComp->SetContext(VSS_CTX_BACKUP | VSS_CTX_CLIENT_ACCESSIBLE_WRITERS | VSS_CTX_APP_ROLLBACK);
// Hyper-V VSS writer
wchar_t* clsid_str = L"{66841cd4-6ded-4f4b-8f17-fd23f8ddc3de}";
CLSIDFromString(clsid_str, &HypervWriterGuid);
pVssBackupComp->EnableWriterClasses((const VSS_ID *)&HypervWriterGuid, 1);
pVssBackupComp->GatherWriterMetadata(&m_pVssWriterMetaDataAsync);
_tprintf(_T("Gathering Metadata from Writers...\n"));
hResult = m_pVssWriterMetaDataAsync->Wait();
// Add Hyper-V VM component
// Get writer Metadata Count
pVssBackupComp->GetWriterMetadataCount(&uTotalWriters);
// Enumerate writers...
 for(uWriter = 0; uWriter < uTotalWriters; uWriter++)
 Get the metadata for this writer
 Get Writer Identity()
 GetComponentInfo()
 AddComponent() // ComponentName==>VM Name
pVssBackupComp->StartSnapshotSet(&SnapshotSetId);
pVssBackupComp->AddToSnapshotSet(szVolumeDriveLetter, GUID_NULL, &SnapshotSetId); // szVolumeDriveLetter==>C:\
pVssBackupComp->PrepareForBackup(&m_pVssPrepareAsync);
m_pVssPrepareAsync->Wait();
pVssBackupComp->DoSnapshotSet(&m_pVssDoShadowCopy);
m_pVssDoShadowCopy->Wait();
======================================================================
I am wondering, Do I need to use any writers other than Hyper-V VSS writer or need to use any other provider ID? My volume folder name is C:\ClusterStorage\Volume1.
I couldn't find much information about CSV and 2012 VSS implementation. I've also posted in Hyper-V forum few days back but didn't get any reply.
http://social.technet.microsoft.com/Forums/windowsserver/en-US/2bac4837-01b6-4956-a307-99c6c086e442/hyperv-csv-2012-backup-developer-documentation?forum=winserverhyperv
I am new to CSV and tt would be really helpful if you can explain this.
Thanks in Advance.

Similar Messages

  • Synchronization fails on Windows 2012 Server

    Hello, Running DPM 2012 R2, Protected computer Windows 2012 Standard
            I'm backing up only folders (19 GB) on a Windows 2012 server which also have SCCM 2012 installed on it.  The initial replica and recovery point creations are successful.   Any
    scheduled synchronization job scheduled after will fail.    The job display "In progress" but there is 0 MB data transferred and will remain in that stage for days until I cancel the job.  A reboot of the protected server
    resolves the issue temporarily where I might get a couple days of successful synchronization\recovery points but then the job will freeze again.  I have looked in the event logs and the logs in Monitoring on the DPM server and also on the protected computer
    but have not found any error that points to the cause.  Has anyone seen this issue?  Will be grateful if someone can point me in the right direction of troubleshooting this issue.  Thank you. 

    Not seeing any errors that stands out. Here is the log from today's synchronization job that is hung.
    2B98 2AC0 06/18 14:50:54.265 31 vsssnapshotrequestor.cpp(2078) [00000000028FD320] 123F41D6-B559-4121-A184-AA68B4359C35 NORMAL CVssSnapshotRequestor::DoFailureCleanup [00000000028FD320]
    2B98 2AC0 06/18 14:50:54.265 31 vsssnapshotrequestor.cpp(1630) [00000000028FD320] 123F41D6-B559-4121-A184-AA68B4359C35 NORMAL CVssSnapshotRequestor::ReleaseVolumesForSnapshot [00000000028FD320]
    2B98 2A40 06/18 15:05:54.409 31 vsssnapshotrequestor.cpp(119) [00000000028FD320] 123F41D6-B559-4121-A184-AA68B4359C35 NORMAL CVssSnapshotRequestor::~CVssSnapshotRequestor [00000000028FD320]
    2B98 2A40 06/18 15:05:54.410 31 vsssnapshotrequestor.cpp(2044) [00000000028FD320] 123F41D6-B559-4121-A184-AA68B4359C35 NORMAL CVssSnapshotRequestor::CleanUp [00000000028FD320]
    2B98 2A40 06/18 15:05:54.410 31 vsssnapshotrequestor.cpp(1630) [00000000028FD320] 123F41D6-B559-4121-A184-AA68B4359C35 NORMAL CVssSnapshotRequestor::ReleaseVolumesForSnapshot [00000000028FD320]
    I ran the VSSADMIN LIST WRITERS command after  I cancelled the job and this is the returned message. 
    "Waiting for response.
    These may be delayed if a shadow copy is prepared."

  • Install Remote Desktop Services Failed on Windows 2012 Server

    I understand RDS is not recommended on DC due to security consideration.  However since I want to play it at home, it is not much a concern.  Such scenario works fine on Windows 2008 R2.  But on Windows 2012, the RDS (session-based, have not
    tried VDI, but expect same result) installation always fails and is incomplete on DC. 
    In \Administrative Tools\Terminal Services, I only have RD Licensing Diagnoser and RD licensing manager.  The remote desktop service management service cannot be started (Error code: 0x88250001).  Is there any extra configuration needed for RDS
    working on Server 2012 DC or before the installation?  Thanks.
    Update: this issue has been solved in Windows 2012 R2 Server.  According to
    http://blogs.msdn.com/b/rds/archive/2013/07/09/what-s-new-in-remote-desktop-services-for-windows-server-2012-r2.aspx
    "Single server RDS deployment including Active Directory. We now support running our RD Connection Broker role service on the same physical instance as an Active Directory Domain Controller.  In addition, we published
    guidelines for how RD Session Host could be used without the RD Connection Broker."
    The guidelines (http://support.microsoft.com/kb/2833839/en-us) primarily apply to Windows 2012 Server.

    Asinine.  Simply Asinine.  Microsoft took it out because of $GREED$.  
    RemoteDesktop has become so popular, they had to break it to make more money.  Thats why they discontinued SmallBusinessServer.   If this practice is so tabooo... Why did MS go the opposite direction with SBS 2011 Premium Cal's?  SBS2011
    had DC, Exchange, RDS and Sharepoint,SQL, RemoteWebWorkplace, OWA all working in perfect harmony.  It is an untrue statement then, that it was "allowed but not recommended"
    Now you by Server2012 (core + two virtual) and its not enough for all this. 
    You need at least another $700 for another sever licence to have it all
    and who knows if SQL will run on a DC, or Exchange, or R-DERP server.  Another reacherous bridge to cross.
    By far, the absloute worse release since Millennium.  The product is not ready for production, we broke our rule of waiting until the first SP1 upgrade for this and Exchange 2013.  Problems with USB drivers and networking running extreamly slow. 
    Our 2003 SBS server was at least three times as fast, and this server has SAS and SSD drives running.  It can't get out of its own way, and IE10 is the most unstable piece of crap to come out of Redmond.  Open wide and swallow - Mother Microsoft
    knows whats best for you.  YOU WILL EAT OUR SLOP AND LEARN TO LIKE IT.   Server2012 AKA  "METRO-SERVER"
    Now here I sit after 50 Hours back to back setting up a new R-DERP server 2012, AD, Have my RDP licences in my hand at $100 each, and WTH does Microsoft care if I install it on my DC.  ITS MY DC.  And the cost savings versus the "risk" was
    previously MY decision. 
    Sure, I can install a couple of Virtual HyperV sessions but they are so tempremental to a power-outage in a small business its not worth it.  I have to double up my server hard drive resources, buy a $800 battery backup unit and make sure to attach
    the cable, and even then, if that Bi**H does not shut down properly, one bit goes awry in a VHD or VHDX file and you are screwed.  Restore from lastnights backup and forget about todays work.  Not to mention it will probably take a half day to try
    to fix it, then recover it then tell the 30 users they lost a days worth of work. 
    HYPER-V is for test servers and has no place in a small (micro) business environment. 5-30 users. 
    Microsoft's solution, buy another server.  Need Exchange?  Buy another server or take the risky cheapskate route and spin up some VHD's.  Might as well put a gun to your head and play russian roulette, at least you know you have a one in six
    chance of failure.  With MS, its a 100% failure for a dirty shutdown power loss, motherboard blows, memory goes corrupt in a few years, your conventional method of recovery is gone, and you have some upchucked VHD file to try to recover some of TODAYS
    data from. 
    Screw server 2012 forever. 
    I will sell 2008 and SBS2011 Premium unitl it rots in hell like XP (of which there is NOTHING wrong with for the average, WORD, EXCEL, OUTLOOK and QUICKBOOKS that all SMB's use.  Its MS $GREED$  Grab the world by the B**ls and squeeze with all
    your might to squeeze every dime you can out of *SMB* because big business is going to run thier 2003 Exchange and 2008 servers into ground before they switch to this garbage. 
    YOU CANNOT INSTALL EXCHANGE 2013 on DC , OR on R-DERP server. 
    Go buy another server license and server or MOVE TO THE CLOUD and get fleeced every month. 
    I have 30 DC/R-DERP/Exchange and SBS2011 Premium servers all running for years in perfect harmony, locked down with security so the users can't even WIGGLE with something they are not supposed to work with.  They get their apps, cannot install anything
    and all these servers are running just fine behind the firewall and perfectly save.  The track record of this combination is 100% stable and is up 24/7/365 with no problems.  Do yourself a favor and throw this 2012 into the river, you don't need
    any weights because it is LEAD and will sink to the bottom by itself.
    Why, you ask?  Official is "Its for your protection"  The real reason?  To sell you more $700 server licences.
    Maybe for SMB, we start selling Linux NAS Servers, host the Exchange in the cloud and be hearded like cattle to the Microsoft slaughterhouse.  One way or another, you are going to bleed.    A little each month to move to the cloud, or
    a small fortune if you want to have it in house.  Microsoft wants it to be more expensive to have in house.  No more buying a server and running it for six years before you upgrade.  They can't have in house servers competing with their cloud,
    and small businesses are the low hanging fruit  ripe for the pickin'. 

  • Sharepoint Foundation 2010 install fails on Windows 2012 R2 server

    Microsoft kb article at https://support.microsoft.com/kb/2724471/ is saying we need to use the Sharepoint install CD that includes SP2 in order for installation to succeed.  Where can we download Sharepoint Foundation 2010 SP2 slipstream install image
    so that we can be compatible with install on a Win2012 R2 server?  Can you provide a link.   Technet download page only has the Sharepoint install and the SP2 install separately.   Thank you.

    You can download it from here:
    https://www.microsoft.com/en-us/download/details.aspx?id=24983
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Should one use MPIO and/or CSV in a Windows 2012 R2 guest cluster?

    Should one use MPIO and/or CSV in a Windows 2012 R2 guest cluster using VMware ESXi 5.5 presented Fiber LUN RDMs.
    If MPIO were implemented is there a preference for HW manufacturer DISM vs. MS DISM in a guest cluster?
    What partition size/offset is recommended for the MSR partition (currently set to 1000 MB) - unfortunately seeing storage validation error with failing block write at block 2048 (which in return may be related to VMware ESXi 5.5. disk partition layout)
    The current setup works without using MPIO (question is would it help overcome the current failing persistent SCSI-3 reservation warning.)
    What were the benefit of using CSV if any in a guest cluster? The Luns in scope would eventually hold SQL data and log files.
     Thanks for your input already.
    Sassan Karai

    Hi,
    Regardless of what type of the shared storage is failover cluster have to use the shared storage, the shared storage can redirect the failed node data to others node, accordingly
    the failover cluster can get the high availability.
    From you descripted error there must you choose the VMware® unsupported storage with failover cluster, please refer the following VMware® official KB then reconfirm your topology
    design is supported.
    Third party KB:
    VMware vSphere support for Microsoft clustering solutions on VMware products
    http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1037959
    The related KB:
    Failover Clustering Hardware Requirements and Storage Options
    http://technet.microsoft.com/zh-cn/library/jj612869.aspx
    More information:
    Validate Storage Spaces Persistent Reservation Test Results with Warning
    http://blogs.msdn.com/b/clustering/archive/2013/05/24/10421247.aspx
    Understanding Cluster Validation Tests: Storage
    http://technet.microsoft.com/en-us/library/cc771259.aspx#PersistentReservation
    Shared storage for Windows Failover Cluster with MPIO
    http://blogs.technet.com/b/storageserver/archive/2011/05/31/shared-storage-for-windows-failover-cluster-with-mpio.aspx
    Hope this helps.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Windows 2012 Nodes - Slow CSV Performance - Need help to resolve my iSCSI issue configuration

    I spent weeks going over the forums and the net for any publications and advice on how to optimize iSCSI connections and i'm about to give up.  I really need some help in determining if its something i'm not configuring right or maybe its an equipment
    issue. 
    Hardware:
    2x Windows 2012 Hosts with 10 Nics (same NIC configuration) in a Failover Cluster sharing a CSV LUN. 
    3x NICs Teamed for Host/Live Migration (192.168.0.x)
    2x NICS teamed for Hyper-V Switch 1 (192.168.0.x)
    1x NIC teamed for Hyper-V Switch 2 (192.168.10.x)
    4x NICs for iSCSI traffic (192.168.0.x, 192.168.10.x, 192.168.20.x 192.168.30.x)
    Jumbo frames and flow control turned on all the NICs on the host.  IpV6 disabled.  Client for Microsoft Network, File/Printing Sharing Disabled on iSCSI NICs. 
    MPIO Least Queue selected.  Round Robin gives me an error message saying "The parameter is incorrect.  The round robin policy attempts to evenly distribute incoming requests to all processing paths. "
    Netgear ReadyNas 3200
    4x NICs for iSCSI traffic ((192.168.0.x, 192.168.10.x, 192.168.20.x 192.168.30.x)
    Network Hardware:
    Cisco 2960S managed switch - Flow control on, Spanning Tree on, Jumbo Frames at 9k - this is for the .0 subnet
    Netgear unmanaged switch - Flow control on, Jumbo Frames at 9k - this is for .10 subnet
    Netgear unmanaged switch - Flow control on, Jumbo Frames at 9k - this is for .20 subnet
    Netgear unmanaged switch - Flow control on, Jumbo Frames at 9k - this is for .30 subnet
    Host Configuration (things I tried turning on and off):
    Autotuning 
    RSS
    Chimney Offload
    I have 8 VMs stored in the CSV.  When try to load all 8 up at the same time, they bog down.  Each VM loads very slowly and when they eventually come up, most of the important services did not start.  I have to load
    them up 1 or 2 at a time.  Even then the performance is nothing like if they were loading up on the Host itself (VHD stored on the host's hdd).  This is what prompted me to add in more iSCSI connections to see if I can improve the VM's
    performance.  Even with 4 iSCSI connections, I feel nothing has changed.  The VMs still start up slowly and services do not load right.  If I distribute the load with 4 VMs on Host 1 and 4 VMs on Host 2, the load up
    times do not change. 
    As a manual test for file copy speed, I moved the cluster resources to Host 1 and copied a VM from the CSV and onto the Host.   The speed would start out around 250megs/sec and then eventually drop down to about 50/60 megs/sec.  If I turn
    off all iSCSI connections except one, it get the same speed.  I can verify from the Windows Performance Tab under Task Manager that all the NICS are distributing traffic evenly, but something is just limiting the flow.  Like what I stated on top,
    I played around with autotuning, RSS and chimney offload and none of it makes a difference. 
    The VMs have been converted to VHDx and to fixed size.  That did not help.   
    Is there something I'm not doing right?   I am working with Netgear support and they are puzzled as well.  The ReadyNas device should easily be able to handle it. 
    Please help!  I pulled my hair out over this for the past two months and I'm about to give up and just ditch clustering all together and just run the VMs off the hosts themselves. 
    George

    A few things...
    For starters, I recommend opening a case with Microsoft support.  They will be able to dig in and help you...
    Turn on the CSV Cache, it will boost your performance 
    http://blogs.msdn.com/b/clustering/archive/2012/03/22/10286676.aspx
    A file copy has no resemblance of the unbuffered I/O a VM does... so don't use that as a comparison, as you are comparing apples to oranges.
    Do you see any I/O performance difference between the coordinator node and the non-coordinator nodes?  Basically, see which node owns the cluster Physical Disk resource... measure the performance.  Then move the Physical Disk resource for the
    CSV volume to another node, and repeat the same measure of performance... then compare them.
    Your IP addressing seems odd...  you show multiple networks on 192.168.0.x and also on 192.168.10.x.   Remember that clustering only recognizes and uses 1 logical interface per IP subnet.  I would triple check all your IP schemes...
    to ensure they are all different logical networks.
    Check you binding order
    Make sure you NIC drivers and NIC firmware are updated
    Make sure you don't have IPsec enabled, that will significantly impact your network performance
    For the iSCSI Software Initiator, when you did your connection... make sure you didn't do a 'Quick Connect'... that will do a wildcard and connect over any network.  You want to specify your dedicated iSCSI network
    No idea what the performance capabilities of the ReadyNas is...  this could all likely be associated with the shared storage.
    What speed NIC's are you using?   I hope at least 10 GB...
    Hope that helps...
    Elden
    Hi Elden,
    2. CSV is turned on, I have 4GB dedicated from each host to it.  With IOmeter running within the VMs, I do see the read speed jumped up 4-5x fold but the write speed stays the same (which according to the doc it should).  But even with the read
    speed that high, the VMs are not starting up quickly.  
    4. I do not see any difference with IO with coordinator and non coordinator nodes.  
    5.  I'm not 100% sure what your saying about my IPs.  Maybe if I list it out, you can help explain further.  
    Host 1 - 192.168.0.241 (Host/LM IP), Undefined IP on the 192.168.0.x network (Hyper-V Port 1), Undefined IP on the 192.168.10.x network (Hyper- V port 2), 192.168.0.220 (iSCSI 1), 192.168.10.10 (iSCSI2), 192.168.20.10(iSCSI 3), 192.168.30.10 (iSCSI 4)
    The Hyper-V ports are undefined because the VMs themselves have static ips.  
    0.220 host NIC connects with the .231 NIC of the NAS
    10.10 host NIC connects with the 10.100 NIC of the NAS
    20.10 host NIC connects with the 20.100 NIC of the NAS
    30.10 host NIC connects with the 30.100 NIC of the NAS
    Host 2 - 192.168.0.245 (Host/LM IP), Undefined IP on the 192.168.0.x network (Hyper-V Port 1), Undefined IP on the 192.168.10.x network (Hyper- V port 2), 192.168.0.221 (iSCSI 1), 192.168.10.20 (iSCSI2), 192.168.20.20(iSCSI 3), 192.168.30.20 (iSCSI 4)
    The Hyper-V ports are undefined because the VMs themselves have static ips.  
    0.221 host NIC connects with the .231 NIC of the NAS
    10.20 host NIC connects with the 10.100 NIC of the NAS
    20.20 host NIC connects with the 20.100 NIC of the NAS
    30.20 host NIC connects with the 30.100 NIC of the NAS
    6. Binding orders are all correct.
    7. Nic drivers are all updated.  Didn't check the firmware.
    8. I do not know about IPSec...let me look into it.  
    9. I did not do quick connect, each iscsi connection is defined using a specific source ip and specific target ip.  
    These are all 1gigabit nics, which is the reason why I have so many NICs...otherwise there would be no reason for me to have 4 iscsi connections.  

  • ProClarity 6.3 PAS install fails on Windows Server 2012

    We are trying to install PAS 6.3 on Windows Server 2012 and the install fails with the following error
    The following requirements are missing:
    Windows Server 2003 SP1
    We have successfully installed on Windows Server 2008 R2, so it really isn't a Windows Server 2003 SP1 issue.
    Has anyone successfully installed on Windows Server 2012?  Is there a way to force the installer not to check for the OS?
    Thanks.
    Kevin

    I have a PAS server running in Windows 2012, by doing exactly the same pre-requisites  that you do in Windows 2008 r2 (iis, Framework, SQL ADO 2005 / 2008). With the Windows Server 2003 SP1 message you can avoid it by doing a really simple thing that
    is right click the setup file --> properties, and head to the "Compatibility Tab" and run it with compatibility mode Windows 7, also run it with Admin permissions. This let you pass by the message and let you install the product.  Remember, after  the
    installation, you need to check all the IIS config, folder permissions, that you did in Windows 2008 x64  installation. Also, the App pool needs to work with .NET 2.0 not 4.0. 
    Good luck! 
    Byron
    BNavas

  • On Windows 2012 Terminal Server Outlook fails to connect to Exchange 2013

    I have a new install of Windows 2012.  I have two physical servers.  One is a W2012 std Domain Controller ("DC").  The Second is configured as W2012 HyperV  ("HV").  Under HV I have
    two VMs.  One VM is W2012/Exchange 2013 ("ExchVM) and the other is W2012/Terminal Server ("VMTS").  All systems are behind a firewall appliance.  Exchange is working via Outlook and OWA internally and externally.  The self
    created SSL must be installed manually on external machines since it comes up as an untrusted certificate.  Once installed remote outlook works and OWA works.  I have configured the terminal server and I am able
    to login remotely as various users under my "TS group".  The problem is when ever I attempt to open Outlook for the 1st time, it fails to connect to the exchange server.   (Open Outlook 2013, click next
    on the splash screen, "Yes" Add an Email Account splash screen, click next, Auto Account screen populates NAME and Email Address correctly, click next, Searching for mail server settings..., check on establishing network connection, check on searching
    for alias@ domain, then fails the logging on to the mail server)  The error reads:  "Outlook cannot log on.  Verify you are connected to the network and are using the proper server and mailbox name.  The
    connection to Microsoft Exchange is unavailable.  Outlook must be online or connected to complete this action."   I am connected in RDS from offsite, and from the RD session I can access shared folders on ExchVM and DC.  I have
    tried have verified the server Exchange server name is correct via "Get=ClientAccessServer" command.  I have also tried to use the guid via "Get-Mailbox
    ALIAS | fl name, exchangeguid.  Keep in mind all desktop users on the network are connecting to Outlook without issue.
    I would appreciate any thoughts on solving this issue.

    Hi,
    According to your workaround, it seems that the Outlook Anywhere configuration in Outlook client is not correct when using the Autodiscover service.
    Once you connected to Exchange server by manually settings, please run Test E-mail AutoConfiguration tool in external Outlook client to check the autodiscover service:
    open Outlook - press CTRL key - right click on the Outlook icon from right bottom corner taskbar - Test Email AutoConfiguration. Put your email address - uncheck use guessmart and secure guessmart authentication - click Test to check your Autodiscover service.
    Please check the Log tab and confirm whether the Autodiscover service is connected successfully. Also confirm if the connection issue happens to all external users when they open Outlook for the 1st time. In Exchange server, please make sure
    autodiscover.domain.com has been included in your Exchange certificate which is assigned with IIS service.
    Regards,
    Winnie Liang
    TechNet Community Support

  • CryptDecrypt function failing on Windows Server 2012

    Hi,
    I have a sample program which does encryption / decryption.
    This program works on Win7 and Win8.1 but fails on Windows Server 2012.
    Please can somebody help me on resolving this issue?
    const char KEY_FILE[255] = "C:\\key.txt";
    In Constructor:
    dwResult= 0;
    hProv = 0;
    hKey = 0;
    hSessionKey = 0;
    cbBlob = 0;
    pbBlob = NULL;
    cbBlob = file_length(KEY_FILE);
    pbBlob = (BYTE*)malloc(cbBlob + 1);
    memset(pbBlob, 0, cbBlob + 1);
    FILE *fp = fopen(KEY_FILE, "rb");
    if (fp) {
    fread(pbBlob, 1, cbBlob, fp);
    fclose(fp);
    } else {
    free(pbBlob);
    pbBlob = NULL;
    if (!CryptAcquireContext(&hProv, NULL, MS_DEF_PROV, PROV_RSA_FULL, 0))
    dwResult = GetLastError();
    if (dwResult == NTE_BAD_KEYSET)
    if (!CryptAcquireContext(&hProv, NULL, MS_DEF_PROV, PROV_RSA_FULL, CRYPT_NEWKEYSET))
    dwResult = GetLastError();
    MessageBox("Error [0x%x]: CryptAcquireContext() failed.", "Information", MB_OK);
    return;
    } else {
    dwResult = GetLastError();
    return;
    if (pbBlob) {
    if (!CryptImportKey(hProv, pbBlob, cbBlob, 0, 0, &hSessionKey))
    dwResult = GetLastError();
    MessageBox("Error [0x%x]: CryptImportKey() failed.", "Information", MB_OK);
    return;
    } else {
    if (!CryptImportKey(hProv, PrivateKeyWithExponentOfOne, sizeof(PrivateKeyWithExponentOfOne), 0, 0, &hKey))
    dwResult = GetLastError();
    MessageBox("Error CryptImportKey() failed.", "Information", MB_OK);
    return;
    if (!CryptGenKey(hProv, CALG_RC4, CRYPT_EXPORTABLE, &hSessionKey))
    dwResult = GetLastError();
    MessageBox("Error CryptGenKey() failed.", "Information", MB_OK);
    return;
    //{{AFX_DATA_INIT(CCryptoEncryptionDlg)
    m_cipher = _T("");
    m_clear = _T("Encrypt me");
    When I click on Encryption Button:
    UpdateData();
    unsigned long length = m_clear.GetLength() +1;
    unsigned char * cipherBlock = (unsigned char*)malloc(length);
    memset(cipherBlock, 0, length);
    memcpy(cipherBlock, m_clear, length -1);
    if (!CryptEncrypt(hSessionKey, 0, TRUE, 0, cipherBlock, &length, length))
    dwResult = GetLastError();
    MessageBox("Error CryptEncrypt() failed.", "Information", MB_OK);
    return;
    m_cipher = cipherBlock;
    m_clear = "";
    free(cipherBlock);
    UpdateData(FALSE);
    When I click on Decrypt button:
    UpdateData();
    unsigned long length = m_cipher.GetLength() +1;
    unsigned char * cipherBlock = (unsigned char*)malloc(length);
    memset(cipherBlock, 0, length);
    memcpy(cipherBlock, m_cipher, length -1);
    int retVal = CryptDecrypt(hSessionKey, 0, TRUE, CRYPT_DECRYPT_RSA_NO_PADDING_CHECK, (BYTE*)cipherBlock, &length);
    if (!retVal)
    dwResult = GetLastError();
    MessageBox("Error CryptDecrypt() failed.", "Information", MB_OK);
    return;
    dwResult = GetLastError();
    m_clear = cipherBlock;
    m_cipher = "";
    free(cipherBlock);
    UpdateData(FALSE);
    The source is from http://www.codeproject.com/Articles/11578/Encryption-using-the-Win-Crypto-API
    I just got the source code from above link and compiled in VS2012. The same code works as-is in Win8.1 but fails in loading itself in Windows Server 2012.
    Thanks in advance.
    Regards,
    Raj

    Windows CE is pretty old but I see that used a bit in 3rd world markets where people are not rich enough to afford more modern gear.
    I use 7-zip for backups, and the SDK is open source which means it can be used in another project such a specialized backup or other tool
    7-zip has the AES in the SDK which is been checked as solid.
    Place your rig specifics into your signature like I have, makes it 100x easier!
    Hardcore Games Legendary is the Only Way to Play!
    Vegan Advocate How can you be an environmentalist and still eat meat?

  • Automatic Install of Endpoint Protection fails on windows 8.1 clients with SCCM 2012 R2

    Running SCCM 2012 R2 and deploying CM clients and Endpoint Protection via software updates. CM client and EP install fine on Windows 7 clients. CM client installs fine but endpoint protection fails on Windows 8.1 clients with the following from the
    endpoint protection agent log:
    <![LOG[Create Process Command line: "C:\Windows\ccmsetup\SCEPInstall.exe" /s /q /policy "C:\Windows\CCM\EPAMPolicy.xml".]LOG]!><time="12:22:02.560+240" date="08-13-2014" component="EndpointProtectionAgent"
    context="" type="1" thread="4260" file="epagentutil.cpp:607">
    <![LOG[Detail error message is : [EppSetupResult]
    HRESULT=0x80070643
    Description=Cannot complete the System Center Endpoint Protection installation. An error has prevented the System Center Endpoint Protection setup wizard from completing successfully. Please restart your computer and try again. Error code:0x80070643. Fatal
    error during installation.
    So on the win8.1 client I run the above command line manually in a command window and receive Access is denied. Then I run the same command in an elevated command window and EP installs fine. Does this have something to do with why the automatic
    EP client install fails with the 0x80070643 error code? If so, what is the fix?

    Hi,
    Try uninstalling any other security software.
    For more information, please review the link below:
    I‘m getting an error code from my Microsoft security software
    http://www.microsoft.com/security/portal/mmpc/help/errorcodes.aspx
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Windows 2012 Verification of prerequisites for Domain Controller promotion failed

    Windows 2012 Verification of prerequisites for Domain Controller promotion failed and gave the below error(In computer management local group and user option is not there as suggested by a solution!)
    "Verification of prerequisites for Domain Controller promotion failed. The local Administrator account becomes the domain Administrator account when you create a new domain. The new domain cannot be created because the local Administrator account password
    does not meet requirements.
    Currently, the local Administrator password is blank, which might lead to security issues. We recommend that you press Ctrl+Alt+Delete, use the net user command-line tool, or use Local Users and Groups to set a strong password for the local Administrator
    account before you create the new domain."

    OK, the reason you see this error is because when you set up and configured your Windows R2 environment you may have logged into the OS with an account other than Administrator. So, if you created your log in account named Bob, this is throwing off the Server.
    So, hit Ctrl-Alt-Delete, and look who you are logged in as, and then change the account you are logging in as and use the local Administrator account. What you may find is that the default Admin account password has not been set.
    Check that out and see if that is what you are experiencing.
    Best wishes

  • Windows 2012 System State Backup Fails

    We have a Windows 2012 Domain Controller VM that we would like to backup the System State using DPM. Agent has been installed and the Windows Backup has been added.
    When the backup runs in DPM, the job fails. Here is the error code:
    DPM cannot create a backup because Windows Server Backup (WSB) on the protected computer encountered an error (WSB Event ID: 517, WSB Error Code:  0x12363C0). (ID 30229 Details: Internal error code: 0x80990ED0)
    When we try and create the backup using Windows Backup, the following error is in the log file:
    following error code '0x807800C5' (There was a failure in preparing the backup image of one of the volumes in the backup set.). Please review the event details for a solution, and then rerun the backup operation once the issue is resolved.
    We have tried attaching a separate drive and backup to a shared location. Both fail.
    We have tried backup of just a few files on the DC instead of the System State, this fails as well.
    All VSS Writers show as Stable with no errors
    Server has the latest updates
    Server has been rebooted, same issue
    VM is Windows 2012 on a Windows 2008 R2 clustered host and is using Dynamic Disks (not fixed disks).
    Anyone have any thoughts on what could be going on?

    Hi,
    If any of the following are true, you will not be able to backup a system state to that volume.
    • Make sure that the target volume has no shadow copy before the backup starts.  
    • If a system state backup is stored on a source volume, backup settings should be configured for full backups. By default, settings are configured for full backups.  
    • Periodically check that no other user or program maintains a shadow copy on the target volume.  
    • Do not keep volume level backups and system state backups in the same location.  
    • The volume used to store the system state backup needs twice the amount of free space as the size of the system state backup until the backup completes
    Meanwhile please check if it is caused that you are backing up to a critical drive. Try modify the following key:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wbengine\SystemStateBackup\ 
    Set the value of this entry as follows: 
    Name: AllowSSBToAnyVolume 
    Data type: DWORD 
    Value data: 1 
    If you have any feedback on our support, please send to [email protected]

  • WSUS windows 2012..failed to down load update

    My wsus fails to download the updates.
    Setup:
    windows 2012 standard
    SQL 2008R2 fully patched.
    running on Vmware 5.1
    Log:
    log entry 1:
    The WSUS content directory is not accessible.
    System.UnauthorizedAccessException: Access to the path 'E:\WSUS\WsusContent\anonymousCheckFile.txt' is denied.
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath,
    Boolean checkHost)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
       at System.IO.FileInfo.Open(FileMode mode, FileAccess access, FileShare share)
       at Microsoft.UpdateServices.Internal.HealthMonitoring.HmtWebServices.CheckContentDirWebAccess(EventLoggingType type, HealthEventLogger logger)
    log Entry 2:
    The server is failing to download some updates.
    Log Entry 3:
    Log Entry 4:
    Content file download failed. Reason: Error calling [kernel32.dll]:CreateDirectory(E:\WSUS\WsusContent\D5) Source File:  Destination File: .
    The permissions on directory E:\WSUS\WsusContent are incorrect.
    I know it has to be permission issues but for the life of me cannot figure it out. I have tipple checked the permission but they seem to be in order. I have performed clean install several time and same result. I have compared it with my working
    2008 R2 server and everything seems in order. 

    Exactly by following the Microsoft "migration" guide
    Argghh.. I wish they'd shoot and kill that thing. The 'guide' is part of why migration has been such a pain.
    Whats your point?
    My original point was going to drive toward the state of KB2734608 on the original server, but now we have so many more opportunities for complications to have occurred. :-)
    "Values does not fall within the expected range" is a new message that we've not seen prior to very recent times. Since the only thing new/changed in WSUS relates to SHA256 hashes, it occurs to me that 'migrating' a WSUS v3 server that does not have KB2734608
    installed onto a WSUS v6 server on Win2012 may be inherently problematic.
    The procedure you used was derived from an older procedure for migrating to Windows Server 2008 R2, and was originally created (for Win2012) in Feb 2012, updated in April 2012, but does not take into consideration the subsequently discovered impact of the
    use of SHA256 hashes in Win8/Win2012.
    WSUS has built in replication -- I've never understood why the Windows Server team found it necessary to build such a complicated procedure when the native replication does almost all of the work in one step.
    Consider this alternate migration procedure:
    Install KB2734608 on original WSUS v3 server. (This is necessary to create the SHA256 hashes for all of the updates in the database.)
    Install fresh WSUS v6 on Windows Server 2012 and configure as replica of WSUS v3 server.
    Replicate. (This will bring across updates, computer groups and approvals.)
    After replication (and file transfers) are complete, configure the new servers as an upstream server and synchronize with Microsoft.
    Point the clients to the new server. (If you are using client-side targeting, the clients will automatically populate into their assigned groups.)
    Also, to the procedure used... if you copy the 'WSUSContent' folder from the old server to the new server, it results in the ACLs of the new server being overwritten, taking away necessary access rights for the new server to work correctly.
    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    SolarWinds Head Geek
    Microsoft MVP - Software Distribution (2005-2012)
    My MVP Profile: http://mvp.support.microsoft.com/profile/Lawrence.Garvin

  • Windows 2012 server back up failing with with error in snap-in

    Hi folks,
    A brand new installation of Windows 2012 Server fails to do a scheduled back up to a NAS drive. The one of back up worked to a shared folder on the network. The error it gives out is "MMC has detected an error in a snap-in and will unload it."
    The error occurs just before I finalize the set up of scheduled back up.  I am happy to provide more information should there be a need for it. Any help out there? 
    Thanks in advance,
    Chilfa

    Hi,
    Firstly, re-install the Windows Server Backup feature on the server. Then run chkdsk on the NAS drive to check if there is any error on the drive.
    Chkdsk
    http://technet.microsoft.com/pl-pl/library/cc730714(v=ws.10).aspx
    Regards,
    Mandy
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Boot Failed. EFI SCSI Device 1. Hyper-V Windows 2012 R2 Preview

    Hello,
    I am new to Hyper-V. I installed Windows Server 2012 R2  Preview on a physical server and installed Hyper-V role on it.
    I am trying to install Windows 2008 R2 on Hyper-V as a guest OS. 
    From Hyper-V manager, I created a VM and supplied 2008 R2 ISO as a boot device.
    Windows 2008 R2 ISO is bootable. I have used the same ISO on VMware and it works.
    I connected the VM and powered on, but OS instalaltion doesn't start.
    I get error " Boot Failed. EFI SCSI Device 1." Below is th screen capture.
    How to fix this problem ?
    How do I go to Hyper-v VM BIOS settings ?
    How do I change the boot sequence for Hyper-V VM ?
    Thanks ! Jayawardhane

    I was getting the same error but with WINDOWS 2012 STD Edition.
    My case: I was trying to use the existing WINDOWS 2012 VHDX with Generation 2 Virtual Machine, as I wanted to make use of 'Virtual Hard Disk Sharing' feature which is only supported on SCSI Controller. But during boot, it looked for UEFI code, whereas
    I had created VHDX using BIOS boot partition. So I guess, In order to use 'VHD Sharing' feature, I have to convert boot partition to GPT which supports UEFI.
    If I use the Generation 1 virtual machine, and then change the VHDX Controller from IDE to SCSI from settings, I see the option 'VHD Sharing' getting enabled, but unfortunately the Generation 1 BIOS does not have support for SCSI only IDE.

Maybe you are looking for

  • Error while creating table from csv file

    I am getting an error while creating a table using 'Import Data' button for a csv file containing 22 columns and 8 rows. For primary key, I am using an existing column 'Line' and 'Not generated' options. ORA-20001: Excel load run ddl error: drop tabl

  • IPod (music) app on the iPad is terrible, or am I missing something?

    I think the iPod app on the iPhone is pretty great, but the iPod app on the iPad 2 is really, really awful. Am I missing something? My main issue with it is that you can't browse by genre. There is a Genre tab at the bottom, but when I tap then and t

  • ORA-00600: internal error code while inserting data in table

    hi gems.. i am getting the below error while inserting data in a table... *ORA-00600: internal error code, arguments: [kqd-objerror$ ] , , [0], [98], [BIN$sm1O+fYhF1jgRAAhKNYyZA==$0], [], [], [], [], [], [], []* i can select the table absolutely but

  • Initial Trail balance uploading

    Hi Guru's,                My client wants to upload his trail balance figures in SAP B1. So please let know the same process and steps involved in details. Will assign full points for helpful solutions. Thanks in advance. Regards, Abhishek

  • Additional Installers List empty

    Hi there Best regards chris CL(A)Dly bending G-Force with LabVIEW famous last words: "oh my god, it is full of stars!" Solved! Go to Solution.