Thursday, March 29, 2018

Redirected Folders and Saving Files Error

Redirected Folders Write Error
A user was having an issue with saving their office files to their documents folder.  Now we are setup in our AD to use Redirected folders.  We are migrating all users to Windows 10 but I haven't gotten to this system yet.  This apparently started about a week ago from but it hasn't been a big issue so they didn't report it as they were scheduled to be upgraded.  With Windows 7 it has this wired issue where it is trying to backup other users offline folders which it shouldn't, that could be a misconfiguration that I did on the AD on my part but I haven't seen or logged any issues on Windows 10, as compared with Windows 7.  

The fix for this was to disable offline folders, then it was able to write files to the redirected folder again.  I need to look into this more closely but for now the user is able to save the files where they need to go.

Sunday, March 25, 2018

Upgrading Server 2012 to 2012R2 and Hyper-V Import Types

Just recently I had to upgrade a server from Windows Server 2012 to 2012R2, due to some driver changes in the intel 82576 adapter that prevents the addition and removal of VLAN tags in Windows Server and that 2012 mainstream support ended in May 2017.  Server 2012R2 doesn't really extend mainstream support by much (till October 2018), but most of our infrastructure is built on in so migration to 2012R2 is easier for that reason alone.  

I managed to do the whole migration over 2 days and most of that was due to an issue with adding SSD's to the system (Turns out the RAID controller doesn't support them properly) and a lack of documentation on the VM guests and on the Hyper-V host. 

There are 3 different ways to do an import of a Hyper-V Guest listed below; for simplicity I just used Register in-place for this procedure.

Hyper-V offers three import types:
  • Register in-place – This type assumes export files are in the location where you'll store and run the virtual machine. The imported virtual machine has the same ID as it did at the time of export. Because of this, if the virtual machine is already registered with Hyper-V, it needs to be deleted before the import works. When the import has completed, the export files become the running state files and can't be removed.
  • Restore the virtual machine – Restore the virtual machine to a location you choose, or use the default to Hyper-V. This import type creates a copy of the exported files and moves them to the selected location. When imported, the virtual machine has the same ID as it did at the time of export. Because of this, if the virtual machine is already running in Hyper-V, it needs to be deleted before the import can be completed. When the import has completed, the exported files remain intact and can be removed or imported again.
  • Copy the virtual machine – This is similar to the Restore type in that you select a location for the files. The difference is that the imported virtual machine has a new unique ID, which means you can import the virtual machine to the same host multiple times.
For more detailed information please reference 

For simplicity I've only used the Register in-place option.

STAGE 1: Migrate VM's on 2012 Server

My workstation is a Dual socket 6 core Xeon system (12 Physical cores 24 Cores Total) running 2012R2 for developing and testing and staging VMs for deployment.  In this case my Workstation was becoming the temporary home for hosting the guest VM's from the old system was being upgraded.  So with the exception of 2 VM guests, the VM's could be moved during regular office hours.

A list of the services running on the VM Host
  • EmailRelay
  • Imaging Server/WOL Server
  • Minecraft Server
  • Website X 2
  • Print Release Server
  • VRNetwork DHCP Server (New and not yet in production)
When doing the migration to the Temporary Hyper-V host the process was very simple.
  1. Shutdown the VM Guest and Export the VM
  2. Copy exported VM to new temporary location on the server
  3. Do a Register In-Place Import of the VM
I had created a SMB share on the temporary host for the old host; shutdown and exported the guest server on 2012 and copied it to the 2012R2 host.  The transfer for the VM's took place during off hours, and since most of the services can be down during off hours no one really noticed the outage.  The whole process took a few hours, the websites which we didn't want to really bring down for any length of time were down for about 15 minutes while the VM's were copied.
STAGE 2: Register in-place import

As the VM's finished being copied over I did a register in-place import which doesn't move the VM's into the default location you specify when you had setup Hyper-V.  So If I did an export and called it websites I can copy the entire folder and doing the in-place import still keeps everything in the folder as shown below.
Exported VM, Doing an in-place import keeps everything together.
STAGE 3 - Restore VM's to the Server:

Once the old server was upgraded to 2012R2 and the NIC was upgraded to an Intel i350.  I restored the VM's to the system and decided to continue to use the register in-place import method, but I maybe should have gone with the Restore option for the final import (makes it easier if you want to just backup the VHDX files).  If I had backed up the VM's to a file share all the host had access to I might have used the Copy option.

Notes & Issues:

A couple of issues I had with this migration to the temporary VM Host was due to the lack of documentation.  I discovered that a couple of VM's had broke durning import because the "migrate to a machine with a different processor" wasn't checked, but also that they had Dynamic MAC Addresses.  This broke the IP Address they received from the DHCP as they had a different MAC Address.  I had to go though and double check each VM guest and verify all the MAC Addresses were set to static.  The other issue revolved around VLAN Tags.  There were VLAN tags assigned to the host in the switch that were not correct or improperly configured.  All in all there are only 5 VLANS that were required:


  • VLAN 1X
  • VLAN 2X
  • VLAN 3X
I made Hyper-V switches for VLANS 0X - 3X and left VLAN 4X just on the host and is used for doing VSS backups of the VHDX files.

All in all I am relatively happy with how the upgrade went, I am currently working on documentation for our Hyper-V Servers with information required to rebuild them in less then a day.

Here is an example of my VM Guest Documentation (work in progress)

Here is an example of my Hypervisor Host Documentation (work in progress)

Tuesday, March 13, 2018

Enter Network Credentials Error - Redirected Folders and Installing Software

Installing Software on an AD with
Exclusive Access Redirected Folders
I've been busy switching our users from Roaming Profiles to redirected users.  Things have been really good so far, no profile load issues, things on the network are fast, really can't complain.  Until we tried to install some software on a non-administrator profile.

A trouble ticket was entered and when I went to look into what the problem was I found there was no problem everything was working as it was suppose to.  The issue was the process on how the install was trying to happen.  Typically you would install the software on the machine as an administrator, however here the admin was trying to install the software on a redirected folder where the APPDATA is also being redirected so the administrator doesn't have any access to proceed with the installation.  The software should have been installed as administrator for all users, with a properly logged in admin account.

Regardless here is the procedure for installing software on a redirected user with exclusive folder access.

1. - Run the software you want to install as administrator

2. - Enter in the Administrator Username and Password for doing the install

3. Enter in the currently logged on user's credentials to access their redirected appdata directory

That is it.  Once that is done the installer will run as normal.  There are lots of different ways you can go about allowing permissions for the administrator to do the install without prompting for network access.  This is how our redirected folders are setup right now with the users exclusive access.  If you were to login as an administrator to do the install this isn't a problem.

You can see my youtube video of he whole process here.

How to fix CURL call imporitng an RSS feed on a site blocking CURL calls

There is a 3rd party service provider that my organization uses called bibliocommons.  They have these nice book carousels.  However the car...