Joining Ubuntu 13.04 to Windows Domain

Apart from Windows, our University is supporting Fedora on workstations and CentOS on servers. Everybody is not happy with Fedora however and Ubuntu has become very popular during the last few years. Ubuntu isn’t supported in the same way as Fedora, which (for us) means that there’s only local users/authentication after a successful installation.

We need another way to authenticate and joining the computer to the Windows Active Directory Domain is an alternative. I did some research and LikewiseOpen seemed like the easiest way of accomplishing this.

“Likewise Open provides a complete authentication solution allowing *nix systems to be fully integrated into Active Directory environments. Created by Likewise Software to make Linux and Unix systems first class citizens on Windows networks, likewise-open will authenticate both Ubuntu Desktop Edition and Ubuntu Server Edition machines.”



My steps for joining an Ubuntu 13.04 machine to the Windows Domain / Active Directory:

sudo pico /etc/hostname , change it so it corresponds with the computers registered dns name

Install LikewiseOpen:

sudo apt-get install likewise-open likewise-open-gui (source: likewise documentation)

Join the domain:

sudo domainjoin-gui (cmd version wouldn’t work for me). Leave the domain with the same command


Fig 1. Joining the Domain

To get domain login options to the Ubuntu login screen (info for both 13.04 and 13.10):

for Ubuntu 13.04: sudo sh -c ‘echo “greeter-show-manual-login=true” >> /etc/lightdm/lightdm.conf’

for Ubuntu 13.10: sudo pico /etc/lightdm/lightdm.conf.d/10-ubuntu.conf

# to disable guest login
# to enable user login manually



By default you have to login to the domain with your user credentials in the form domain\username.

To skip this and login with only username:

sudo lwconfig assumeDefaultDomain true


I had some problems finding the above command as the old trick will NOT work with Ubuntu 10 and newer versions.

(Old: sudo pico /etc/samba/lwlauthd.conf

winbind use default domain = yes)


Additional (optional) configuration and comments:

Put yourself as sudoer:

sudo pico /etc/sudoers

Install OpenSSH server:

sudo apt-get install openssh-server

edit /etc/hosts.allow & /etc/host.deny according to your needs.


Checking likewise configuration after successful domain join:

cat /etc/krb5.conf

Checking likewise version:

dpkg-query -W likewise-open



My installed Windows domain printers seemed to work just fine in Ubuntu also. I only had to do some small changes to page size and page type.

Epson Interactive Projector

Nowadays everything is supposed to be “Smart” or in the Cloud. That said, we were thinking about buying a SmartBoard for one of our meeting rooms. We had heard both good and bad things about these boards and we didn’t quite know if it was our cup of tea.
We were fortunate enough to get a demonstration of a “Smart-Projector” instead (actually an Interactive Projector). The model was EPSON ultra short throw projector EB-1410Wi. We were pleased with all the functions/features so we decided to get one.


  • Whiteboard Function – Perfect alternative to copyboards, conventional whiteboards and old fashioned flip charts, this easy-to-use function facilitates “instant meetings” without the need for a PC. After the meeting, you can save, print or email the meeting notes.
  • Save – Load and save image files on USB or network drive.
  • Print – Print your meeting notes wirelessly (peer to peer) or to the network printer.
  • Email – Instantly share your meeting notes via email – to an individual or group address.
  • Capture – Capture a screenshot from other sources (eg PC, DVD, iPad etc) and annotate over it on the whiteboard. From there you can save, print or email the annotated version
  • Split Screen Function – Allows images from 2 input sources to be projected simultaneously.
  • Control Pad for Easy Operation – Neatly designed and easy to install control pad for efficient and intuitive operation. All buttons on the control pad can also be found on the remote control.
  • Remote Interactive Collaboration – Collaborate from multiple remote locations (up to 4).
  • Wireless Projection and Interactivity – Projection and interactive function without the wires (using peer to peer wireless and Epson’s EasyMP Network Projection software).
  • Dual Pen Interactivity – With simultaneous dual pen functionality, you and a colleague can annotate at the same time.
  • No Driver Installation Required – Installation has never been easier (Driver install is required for Mac however).
  • Advanced Networking Capability – Enables users to monitor, control and present from a remote location.
  • Broad Connectivity Including HDMI – HDMI, DisplayPort, USB display, PC Free slideshows, network and wireless connectivity.
  • Lowest Epson Lamp Price Ever Seen – Incredibly low price of only $79.
  • 10W Built-in Speaker – Built in audio with the power to fill the meeting room.




People were requesting a projector with a function that enables you to save all the notes (made on top of a slide for example) during a presentation. This is possible with the Epson in two ways; either save to a USB stick or to a network drive. The projector can also work as a “normal projector”. We had to buy some equipment and make some modifications to the existing room to get all this working. For starters, the room only had cables for vga. We wanted to use dvi/hdmi as vga is getting old and the quality isn’t that great either. We used the existing wireway and added three new LAN cables (+ extenders). Other equipment include:

  • 3 x 15m Ethernet Cat-5 cable (one for video, one for usb and one for the Buffalo)
  • Aten UCE60 USB-extender
  • Aten VE800 HDMI Extender
  • Existing LAN cable with existing vga extender
  • On the meeting room table: Aten VS481A 4 Port HDMI Switch
  • Buffalo Airstation Nfiniti WZR-HP-AG300H (hidden on top of the roof tiles)

With this done we now have 1 x VGA, 4 x HDMI (with different adapters) and 1 x USB port available on the meeting room table. It’s easier and cheaper to use an Ethernet cable instead of a hdmi/usb cable. It’s also much easier to install it in the wireways. This configuration will work for almost any laptop configuration out there. You can (and you should) use the wireless projection anyway.

That was the hardware part…almost. We also have a Buffalo Airstation Nfiniti WZR-HP-AG300H that has NAS support. This means that you can connect a usb stick or external hard drive to it and use it as a network drive. This way people can save their files to a network share. We have placed the Buffalo (with a connected usb stick) on top of the roof tiles in the meeting room. This way it’s invisible and you are also literally saving your files to the cloud 🙂 (You are requested to join the wireless “projector network” when you enter the meeting room. There are also instructions available on how to access your files from the Buffalo).

Setting up the projector was a bit harder than normal because there are  A LOT of options. Actually the setup itself wasn’t that hard, it was the challenge of memorizing all the stuff you can do with it. Well, that’s our problem. We have written a more compact mini-manual that is available in the room.

Everything went fine except for the network part which turned out to be a bit tricky. We wanted to have the projector connected to the internal Buffalo network so it could connect to the network share. Connecting it to the network itself was no problem, it was the network share-part that got us confused. You can enter a hostname for the projector itself (epson in our case), but you can not connect to a network share with an IP address, only by UNC path. We were a bit confused on how to get the UNC path from the Buffalo. I don’t actually remember how, but in the end I got the idea of looking at the samba configuration on the Buffalo. First we enabled ssh to the Buffalo (this is possible because it’s running dd-wrt by default), and then ssh’ed in to it to look at the configuration. I had a hard time finding the configuration file as it’s not in the “normal place” (/etc/samba/ or similar). A few google attempts later it turned out that the smb.conf was located in /tmp/smb.conf. How logical, don’t you think? Source: Anyways, I had a look at the file:

BusyBox v1.19.4 (2012-06-03 12:59:27 CEST) built-in shell (ash)
Enter ‘help’ for a list of built-in commands.

root@xxx:~# cat /tmp/smb.conf

netbios name = DD-WRT
server string =
syslog = 10
encrypt passwords = true
obey pam restrictions = yes
preferred master = yes
os level = 20
security = user
mangled names = no
max stat cache size = 64
workgroup =
bind interfaces only = Yes
guest account = nobody
map to guest = Bad User
smb passwd file = /var/samba/smbpasswd
private dir = /var/samba
passdb backend = smbpasswd
log file = /var/smbd.log
max log size = 1000
socket options = TCP_NODELAY
printing = none
load printers = No
usershare allow guests = Yes

[epson]    (This section has been auto entered by the Buffalo itself  after successful connection with the projector)
comment = epson
path = /tmp/mnt/sda_part1
read only = No
guest ok = Yes

force user = root

and there it was; netbios name = DD-WRT.

With this information in place, it was just a matter of entering it in “Settings –> Save –> UNC Address” (\\DD-WRT\epson in our case) on the projector. Now the projector can save files directly to the usb stick on the Buffalo. People can also map the network drive to retrieve their saved files/presentations.


Using the projector

The projector can be used in three ways (see Fig 1 below):

  • Whiteboard only, with ability to save scribbling (see Fig 2 below)
  • Projector only
  • Interactive projector (see fig 3 below)


Fig 1. Areas of usage


Fig 2. Whiteboard


Fig 3. Interactive projector

As said before, you can also use the projector as you would with a “normal” one. This means connecting vga or hdmi cables to your laptop and project the picture. You don’t have to use the interactive bit at all if you don’t feel like it. However, you can also write stuff on the whiteboard or on top of slides and save your work. When saving you can choose network or usb. You can plug your usb stick into the accompanied Control Pad (fig 4) which is situated next to the whiteboard. If you are using the Easy Interactive Tools (and the usb cable) you can save directly to your computer.

You can also use Network Projection by using Epson’s EasyMP Network Projection software. The software will find the projector if the PC and the projector are on the same network. You can also project from an iPad or iPhone using a downloadable app called iProjection (by Epson). If you install Easy Interactive Tools on a PC or Mac, you can get the “drawing tools” (Fig 2) to your computer instead. This means that you can draw on your computer instead of on the whiteboard (or on both).


Fig 4. Control Pad

This was just a short description of all the projector functions. The projector can do just about anything so it’s probably best for all of you to read the manual if you are interested in getting one:

Windows Updates in Nagios

We’re currently using Nagios as our main monitoring system at the Department. There’s actually no need to change that (even though I tried SCOM 2012). Things that I’ve been missing in our current Nagios setup are notifications about Windows Updates. Well, honestly I haven’t even looked into that specific “problem” before now. That said, I decided to give it a try.

I started by doing some googling and found a nice solution which uses  NSClient++ ( and a script ( which checks for updates. I followed the steps with some minor changes:

  • Installed NSClient++ on the Windows Server(s)
  • Edited nsclient.ini (NSC.ini is for older versions):

NRPEServer = 1

port=5667 (default port wouldn’t work for some reason)

[/settings/external scripts/scripts]
check_win_updates=cscript.exe //T:90 //NoLogo scripts\\check_windows_updates.wsf /w:1 /c:10

; ALLOWED HOSTS – A comaseparated list of allowed hosts. You can use netmasks (/ syntax) or * to create ranges.
allowed hosts =


  • On server side:


define command {
    command_name    check_win_updates
    command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5667 -c check_win_updates -t 120


define service {
    hostgroup_name               check-win-updates
    service_description            Windows Updates
    check_command               check_win_updates
    use                                     generic-service
    check_interval                  2880


define hostgroup {
    hostgroup_name          check-win-updates
    alias                           Windows Updates
    members                 server1,server2 (Lets call the servers server1 and server2 in this example)


Play around with the timers ( –t) and see what suit your needs. If you want to check other stuff as well (harddisk space, cpu usage and so on) you have to configure a bit more.


In our case it was enough with Windows Updates checking however.

Here’s a screenshot (Fig 1) from nagstamon running on my Windows 8 client:


Fig 1. nagstamon

There’s currently no information about Windows Updates as all our servers were already updated before the screenshot 🙂 The other information is from different linux servers and printers. Here’s another screenshot (fig 2) from the Nagios web interface:


Fig 2. Host information/status detail for host in Nagios

Here you can see that the Windows Update check is running and that no updates are waiting or installing.

So, there you have it – Windows Updates in Nagios.

System Center Operations Manager 2012 SP1 Mini-test

I decided to do a mini-test of System Center Operations Manager 2012 SP1. We are already using Nagios for monitoring but it doesn’t hurt to look at the competitors 🙂




Normally I would test in a virtual environment, but this time I happened to have my trusty old bastard (Fujitsu Siemens Primergy RX200 S2) ready with a plain installation of Windows Server 2012 so I decided to use that one instead.


Nothing special with the installation, just a plain installation of Windows Server 2012 as base and SCOM 2012 SP1 on top of that. I then joined the server to the domain as this is a requirement. After that I started the installation of Operations Manager. The installation program itself has a prerequisite check so every component will be installed perfectly. I chose to install “everything”. There were many components missing at the check and the following was required for me:


· Download and install Microsoft Report Viewer 2010

· Add Application Server Role

· Add a whole bunch of Web Server (IIS) Support role services

· Modify alternative source to installation files (basically mount Windows Server 2012 ISO)

· More strange errors… The ISAPI and CGI Restrictions are disabled or missing: Web Console cannot operate properly because the ISAPI and CI Restrictions in Internet Information Services (IIS) are disabled or missing for ASP.NET 4.0.


· Had a look at some guidelines instead of next, next, next 🙂

· Note: SQL_Latin1_General_CP1_CI_AS should be set as collation, otherwise error. The installer will NOT correct this one for you automatically.

· All prerequisites OK, except for SQL.

· Installed SQL Server 2012 SP1 Enterprise. Configured SQL to use max 2GB memory.

· Opened up firewall port for SQL

· Installed SCOM 2012 with pretty much default settings and with the help of

· Installed ok!


This was only a small test, as the whole system is a bit over the top (to say the least) for our needs. Anyways, seems to be working just fine. Screenshot below.



Fig 1. System Center Operations Manager 2012 SP1


I’ve been testing SCOM 2007 before so I knew what to expect. SCOM 2012 is indeed a very advanced monitoring system with all the bells and whistles. However, Nagios is our main monitoring software and it’s already set up to monitor all Linux servers, printers, switches (and more) at the Department. I’ll put my energy on configuring Nagios instead, as we don’t need all the advanced features of SCOM. We’re not monitoring hundreds of servers either. I’ve now added a script to Nagios which checks for Windows Updates. Of course there’s also standard checks like ping and so on. We don’t need anything fancier than that, at least for now. More about the Nagios script in another post.



Migrating from VMware to Hyper-V (including File Server Migration)

Topics covered: 


· Windows Server 2012/Hyper-V installation

· Certificate based Hyper-V replication

· Virtual to physical machine conversions

· Virtual to virtual machine conversions

· VMware virtual machine backups

· VMware to Hyper-V conversions

· File Server upgrade/migration





I’ve been thinking about upgrading our File Server and Terminal Server for a while. Both the File Server and the Terminal Server are running Windows Server 2003. The servers are running from two different VMware ESXi host servers with identical versions of VMware ESXi installed (v. 3.5 update 4).


Current problems:

· VMware ESXi 3.5 doesn’t support a Windows Server version newer than 2008 R2

· I want to use Windows Server 2012 for the File Server and Terminal Server

· Can’t upgrade VMware ESXi to a newer version because our hardware is too old/not compatible with a new(er) version (4.0 –>)

· Hard disk space on current servers is limited –> problems upgrading because all virtual machines can’t be running on just one VMware host during the upgrade. Actually they CAN, but it will be painfully slow as the host with much disk space only has sata disks instead of scsi/sas…

· Expensive to upgrade both servers / buy new hardware

· I want a better way for virtual machine backups. Hyper-V does this nicely with replicas (or live migration without shared storage). Current VMware backup solution is pretty much manual work…



· Use Hyper-V instead of VMware – works on older hardware

· Due to hard disk space limitations I’m trying virtual to physical conversion on one of the virtual machines. This will be a temporary place (perhaps permanent…) for the machine while I’m doing the VMware to Hyper-V conversion

· This is a cheap alternative solution. No new hardware needed



Current hardware


VMware host server 1:

· VMware ESXi 3.5 update 4

· HP Proliant DL 180 G5

· Intel Xeon E5405@2.0GHz, 4 cores

· 16GB RAM

· Dual NIC

· 2.0TB (4 x 500GB) hard disk space in raid-5 (SATA)

· 6 virtual machines, 2 active (one will be moved to the other VMware host, the other will be converted to physical)


VMware host server 2:

· VMware ESXi 3.5 update 4

· HP Proliant ML 350 G5

· Intel Xeon E5405@2.0GHz, 4 cores

· 18GB RAM

· Dual NIC

· 730GB (5 x 146GB) hard disk space in raid-5 (SAS)

· 3 virtual machines, 2 active (will also remain active)


Old server:

· Fujitsu Siemens Primergy RX 300 S2

· 2 x Intel Xeon 3.20GHz CPUs


· 6 x 146GB SCSI hard disks in raid-5

· Dual NIC






Host server 1 is eating up quite a bit of hard disk space at the moment, mainly because of the MDT/WDS server (deployment server). My approach is converting this virtual machine into a physical machine to save disk space on current host. I’m doing it on this virtual machine as it’s not in use every day and not that critical. If I’m lucky this is the only server I have to make physical, and all the other servers will fit on one of the current VMware host servers (VMware host server 2, the faster one). Update: they did fit 🙂


I started off by installing Windows Server Backup server role on our mdt server. After that I run the Backup Once Wizard. I saved the image to a network share, and then copied the image to an external usb hard disk.

In the meantime I had prepared the old physical server (Fujitsu) for this image. I booted the server with the Windows Server 2008 R2 Boot CD and chose advanced installation options. From there I could choose to install the operating system from an earlier created image. At the same time I chose the option to install third party SCSI drivers which in my case was a must. I previously downloaded the LSI MegaRAID SCSI 320-2E drivers and copied them to an usb stick so I can use them during the image restore. After an hour or so the image was restored to the Primergy server. It booted just fine. After this I uninstalled VMware tools. Virtual-to-Physical: Success 🙂



Backing up and moving VMware virtual machines between hosts


Now that I had moved one of the active virtual machines to a physical host, I could start moving the other virtual machines from one host to another with the help of VMware Infrastructure Client and VMware vCenter Converter Standalone (Fig 1).

First off I copied the non-active powered down machines to a USB drive with VMware Infrastructure Client. After that I moved/transferred the powered-on file server to another host (during non-office hours) with the help of VMware vCenter Converter Standalone (Fig 2). This is a nice tool which does the job very well. I’ve seen it called “the poor man’s replication” which is a quite good description for the procedure. You can do the “conversion” from physical-to-virtual (P2V) or from virtual-to-virtual (V2V). The virtual machine can be switched on during the process and it will sync the changes made during the procedure afterwards. After a successful conversion, I shut down the “old” file server and powered on the “new” one on the other server. It booted just fine and I was one step closer replacing VMware ESXi with Hyper-V on this host.  




Fig 1. Copying virtual machines in VMware Infrastructure Client





Fig 2. VMware vCenter Converter Standalone




Planning for Hyper-V


After triple checking all backups and doing lots of homework it’s finally time to wipe one of the VMware hosts and install Microsoft Hyper-V. The installation is rather basic, nothing special. It’s the actual Hyper-V configuration that is the interesting part. I’ve done lots and lots of testing in a virtual environment so now I hopefully know what will suit our needs. First, let me start off by saying that high availability/failover/cluster was not an option as we don’t have any shared storage (SAN, NAS…) available. I was left with the replica feature and Shared-Nothing Live Migration. I’ve tested them both in a virtual environment and they don’t work in the same way. Here are my comments about the two:




· Hosts can be in a workgroup or in a domain

· You will decide which virtual machines you will replicate (not move) to the other Hyper-V host

· Replication is done manually, but after that synchronization happens automatically

· The virtual machine has to be switched OFF when using planned failover (moving the virtual machine from one host to the other)

o Will cause a bit of downtime (depending on the size of the vm changes and network speed)

//end of own comments


//Begin quote

“In this scenario, we define two “sites”: the “primary site,” which is the location where the virtualized environment normally operates; and the “Replica site,” which is the location of the server that will receive the replicated data. At the primary site, the primary server is the physical server that hosts one or more primary virtual machines. At the Replica site, the Replica server similarly hosts the Replica virtual machines.


Once replication is configured and enabled, an initial copy of data from the primary virtual machines must be sent to the Replica virtual machines. We call this “initial replication” and you can choose to accomplish it directly over the network or by copying the data to a physical device and transporting that to the Replica site.


When replication is underway, changes in the primary virtual machines are transmitted over the network periodically to the Replica virtual machines. The exact frequency varies depending on how long a replication cycle takes to finish (depending in turn on the network throughput, among other things), but generally replication occurs approximately every 5-15 minutes.


You can choose to move operations on any primary virtual machine to its corresponding Replica virtual machine at any time, an action we call “planned failover.” In a planned failover, any un-replicated changes are first copied over to the Replica virtual machine and the primary virtual machine is shut down, so no loss of data occurs. After the planned failover, the Replica virtual machine takes over the workload; to provide similar protection for the virtual machine that is now servicing the workload, you configure “reverse replication” to send changes back to the primary virtual machine (once that comes back online).


If the primary server should fail unexpectedly, perhaps as a result of a major hardware failure or a natural disaster, you can bring up the Replica virtual machines to take over the workload—this is “unplanned failover.” In unplanned failover, there is the possibility of data loss, since there was no opportunity to copy over changes that might not have been replicated yet.”




More information:


“With Hyper-V Replica, administrators can replicate their Hyper-V virtual machines from one Hyper-V host at a primary site to another Hyper-V host at the Replica site. This feature lowers the total cost-of-ownership for an organization by providing a storage-agnostic and workload-agnostic solution that replicates efficiently, periodically, and asynchronously over IP-based networks across different storage subsystems and across sites. This scenario does not rely on shared storage, storage arrays, or other software replication technologies”.



“For small and medium business, Hyper-V replica is a technically easy to implement and financially very affordable disaster recovery (DR) solution”.




//End quote



Shared-Nothing Live Migration


· Hosts require domain membership

· You will decide which virtual machines you will migrate to the other Hyper-V host

· Migration  is done manually

· The virtual machine can remain powered ON during migration

· Zero downtime when live migrating from host to host

· No backup solution, you are just moving the virtual machine from host to host

//end of own comments


//Begin quote

“Hyper-V live migration moves running virtual machines from one physical server to another with no impact on virtual machine availability to users. By pre-copying the memory of the migrating virtual machine to the destination server, live migration minimizes the transfer time of the virtual machine. A live migration is deterministic, which means that the administrator, or script, that initiates the live migration determines which computer is used as the destination for the live migration. The guest operating system of the migrating virtual machine is not aware that the migration is happening, so no special configuration for the guest operating system is needed.”




More information:


“Live Migration is the ability to move a virtual machine from one host to another while powered on without losing any data or incurring downtime. With Hyper-V in Windows Server 2012, Live Migration can be performed on VMs using shared storage (SMB share) or on VMs that have been clustered.

Windows Server 2012 also introduces a new shared nothing live migration where it needs no shared storage, no shared cluster membership. All it requires is a Gigabit Ethernet connection between Windows Server 2012 Hyper-V hosts. With shared nothing live migration, a user can relocate a VM between Hyper-V hosts, including moving the VM’s virtual hard disks (VHDs), memory content, processor, and device state with no downtime to the VM. In the most extreme scenario, a VM running on a laptop with VHDs on the local hard disk can be moved to another laptop that’s connected by a single Gigabit Ethernet network cable”.




“One should not assume that shared-nothing live migration suggests that failover clustering is no longer necessary. Failover clustering provides a high availability solution, whereas shared-nothing live migration is a mobility solution that gives new flexibility in a planned movement of VMs between Hyper-V hosts. Live migration supplements failover clustering. Think of being able to move VMs into, out of, and between clusters and between standalone hosts without downtime. Any storage dependencies are removed with shared-nothing live migration”.




//End quote


From my tests it seemed that replica was faster than live migration (at least after the initial copy). This isn’t that much of a surprise considering that the whole virtual machine has to be moved during live migration (without shared storage). When using replica there is a check to see what has been changed between the host and destination which makes it faster. Guess you could look at it in the same way as incremental backups once the initial replication has been done.


I decided to go with replication for our production environment. It suits our needs better than Shared Nothing Live Migration. It makes no sense moving the VM’s between the hosts instead of having a “spare backup” in the way that replica works. If we had a SAN in our environment, then SNLM would be a considerable option. Also, with replica I don’t have to join the hosts to the domain. There are many debates on whether you should join your hosts in a (separate) domain or if you should keep the hosts in a workgroup. I guess it all comes down to planning and your own needs. In my case I’m going with replicas which don’t require domain membership. It uses certificates instead. 



 Fig 3. Migrating/moving a live virtual machine after the setting has been enabled in Hyper-V settings in Hyper-V Manager. Screenshot also illustrates the “Enable Replication” option which has to be manually activated on each virtual machine you want to replicate.




 Fig 4. Simulating an (unplanned) failover if the primary server brakes


I have written more about replication later on in the document (sub-chapter Setting up Replicas)






Installing Hyper-V on server 1


After all the testing and the theoretical parts comes the fun part – installation on physical hardware 🙂 Fortunately, Windows Server 2012 will detect the drivers for the server’s sas/scsi card (HP Smart Array P400) automatically so I can proceed with a normal installation.


I wasn’t in the mood for Server Core version so full version it is. The default layout looks like crap in my opinion (metro), so I start off by enabling Desktop Experience feature from Server Manager. After that I installed classic shell. Aaah, now it’s usable 🙂 After this I enabled Remote Desktop so I can do the rest remotely.


Then I’m applying local policies from Microsoft Security Compliance Manager (SCM) 3.0 for maximum security. I’m using the Windows Server 2012 Baseline for Hyper-V. I’m applying

the exported policies with the LocalGPO tool. This step isn’t necessary as we already have a good firewall (at the Computing Centre). The server isn’t visible on the external network either but it doesn’t hurt with some extra protection…


Network setup


Virtual Switches:

Network1: Management/Remote Access/Replication (internal).

Network2: External Access (University Network)


I also unselected “Allow management operating system to share this network adapter” on the external adapter (based on )


Remote Access


I don’t want to use Remote Desktop to manage the virtual machines on the Hyper-V host. Instead I prefer doing it from my workstation with Hyper-V Manager. Some tweaks (actually A LOT) have to be made and here’s an excellent guide:

I did the Remote Access tweaks manually, but I could have used a script which would have been much easier. The script is available from:

This scenario is the same as using VMware Infrastructure Client on VMware ESXi. Everything is managed from your own workstation. With this done it’s time to prepare the other server for Hyper-V and to create a new virtual machine, the new file server. More of that in the sub-chapter New virtual machine(s).




I tried to read as many documents/articles as possible for maximizing the performance on the Hyper-V hosts. In the end, I didn’t change much from the defaults. I did however change the virtual machines to use dynamic memory.





Preparing server 2 for Hyper-V / moving vm’s to server 1


Server 2 is running three virtual machines at the moment. One of these (file server) will be upgraded and the data migrated. I will write about this later on. The other two VMs (Linux webserver and a Windows Terminal Server) will be converted/moved over to Hyper-V without changes. I’m going to replace the Terminal Server with a brand new Windows Server 2012 later on, but that’s another document/story.

Anyway, back to the conversion/preparation. Here are my steps:


· Installed System Center 2012 Virtual Machine Manager with Service Pack 1 on my workstation so I could try their fancy conversion tools. I then followed this guide to be able to connect to my Hyper-V host:

I would manage just fine with only Hyper-V Manager but decided to try scvmm when it’s available for free to us via msdnaa.

· Installed the System Center Virtual Machine Manager Agent on the Hyper-V host

· Too much work – not worth it

· Tried 5nine EasyConverter instead. What a nice piece of software 🙂 Just select your desired VMware vm’s straight from the program and then select the destination Hyper-V server. Can’t get much easier than this, or so I thought…

· No go. Error with conversion process. Didn’t even start. My guess is that it doesn’t work that good with old Linux distros (it supports Linux though). Will give it another try with Windows Server 2003.

· Downloaded StarWind V2V Converter instead from Finally success with conversion.

· Copied the converted vhd over to server 1. Created a new virtual machine and used the vhd as hard disk. Powered it on and it worked, sort of. Did some research on the mighty Google and it turned out you have to add a Legacy Network adapter. Added that and re-configured the network from within CentOS. Success!

· Back to 5nine EasyConverter and had a go with the old Windows Server 2003 Terminal Server.

· Nope, no go. I didn’t want to use my energy on error searching/log reading this time so StarWind V2V Converter it is again. Forgot to uninstall VMware Tools before conversion, but seems to work though. Uninstalled them afterwards with the help of this article:

· Installed Hyper-V Integration Services and everything worked as normal. Success!

· Now it’s time to work on the file server (new virtual machine(s), next chapter)



New virtual machine(s)


After the preparations above I installed the soon-to-become new fileserver. Nothing special, just one virtual hard drive for the OS and another one for the files/data. I decided to try a dynamically expanding disk for the data to save precious disk space. I know this could slow things down but time will tell. I also applied the local policy for Windows Server 2012 Baseline for Fileservers and Member Servers. I installed the roles shown in Fig 5.



Fig 5. File Server server role


We only have one fileserver so DFS and Namespaces weren’t necessary. I also configured Data Deduplication immediately as I like this new feature in Windows Server 2012.


“Data deduplication involves finding and removing duplication within data without compromising its fidelity or integrity. The goal is to store more data in less space by segmenting files into small variable-sized chunks (32–128 KB), identifying duplicate chunks, and maintaining a single copy of each chunk. Redundant copies of the chunk are replaced by a reference to the single copy. The chunks are compressed and then organized into special container files in the System Volume Information folder.”



Now it was time for data migration from the old file server to the new one. I used Robocopy for this task. My steps:


· Had some help from:

but finally ran with my own switches (from the destination server):

Robocopy.exe \\source_server\dir D:\dir /S /E /Z /R:1 /W:1 /COPYALL /TEE /LOG:d:\dir\log.txt.

· Did the job just right. I tried with the /MIR switch afterwards which also did the job (checks for changed files from previous copy, or “mirrors a share”).


After migration I enabled Access Based Enumeration on the shares. Info:


I also enabled Shadow Copies of the shared folders so I could take advantage of previous versions of files.


“Shadow Copies of Shared Folders provides point-in-time copies of files that are located on shared resources, such as a file server. With Shadow Copies of Shared Folders, users can view shared files and folders as they existed at points of time in the past. Accessing previous versions of files, or shadow copies, is useful because users can:


· Recover files that were accidentally deleted. If you accidentally delete a file, you can open a previous version and copy it to a safe location.

· Recover from accidentally overwriting a file. If you accidentally overwrite a file, you can recover a previous version of the file. (The number of versions depends on how many snapshots you have created.)

· Compare versions of a file while working. You can use previous versions when you want to check what has changed between versions of a file.”




Now that deduplication was enabled, I had a look at the “statistics”. It was indeed doing its job, here’s a screenshot of the space savings (45% or 69,1GB):




Fig 6. Deduplication





Installing Hyper-V on server 2


I have now successfully migrated all of the virtual machines from VMware to Hyper-V. They are all running from server 1 so it’s time to install Hyper-V on server 2. The steps are just about the same as on server 1 so I won’t repeat my steps here. The steps for Remote Access are however a lot easier when you have done the client-part already…




Setting up replicas


With both servers running Hyper-V it was now time to think about replica so I could have a disaster plan. I enabled replica on BOTH hosts, Fig 7, (as described earlier in the chapter Planning for Hyper-V). Just to enable replication wasn’t enough because my servers are in a workgroup environment. I did some further configuration with certificates.



Fig 7. Enabling Replication


Here’s an excellent guide I followed for certificate setup:

“Building Free Hyper-V 3 Replica Step by Step Guide in Workgroup Mode”:

The guide seems to be based on technet’s article “Prepare to Deploy Hyper-V Replica”:


I didn’t add any dns-suffixes though; instead I used host names in



Do remember to enable the replication on both Hyper-V hosts so the replication direction can be reversed.



With the certificates done I could finally start replicating. You can choose three different initial replication modes. They are:


· Send initial copy over the network

· Send initial copy using external media

· Use an existing virtual machine on the Replica server as the initial copy.


I chose to send initial copy using external media instead of using up network bandwidth (and time). Just right-click on the virtual machine you wish to replicate and choose “enable replication”. After that a guide will pop up with the different initial replication modes. When the initial replication is done (in my case), you just eject the usb drive and move it over to the other hyper-v host/replication partner. From that host you right-right click on the same virtual machine and choose Replication -> Import Initial Replica (Fig 8). From here on the replication will happen over the network every 5 minutes (not configurable). I did the same thing with all three of my virtual machines.



Fig 8. Import initial replica


“From this point onwards the VM is protected and will allow operations like Failover and Test Failover.”



I noticed that my initial replication was stated as Replication Health: Warning

Turned out that this was nothing to worry about, it will go to normal when initial replication has been done.

“The Replication Health is shown as Warning when the replication is ‘not optimal’. The conditions which would result in a Warning health include:

· 20% of replication cycles have been missed in a monitoring interval – Common reasons which lead to this condition include insufficient network bandwidth, storage IOPS bottleneck on your replica server.

· More than an hour has elapsed since the last send replica (on the primary VM) was sent or the last received replica (on the replica VM) was received – This could result in a loss of more than 60mins worth of data loss if the replica VM is failed over (due to a disaster)

· If Initial Replication has not been completed

· If Failover has been initiated, but ‘reverse replication’ has not been initiated

· If the primary VM’s replication is paused.”




Now I did a planned failover (on primary server) from server 1 to server 2, as server 2 was going to be the new “primary home” for the virtual machines (Fig 9). This should NOT be confused with just “failover” (done on secondary server) which is only used in emergency situations (Fig 10).



Fig 9. Planned Failover




Fig 10. Failover


The reason for my failover (or “server switching”) is because server 2 is faster than server 1 (SAS HDDs). Here are my (easy) steps:

· Turn off the virtual machine(s) that will be “victim(s)” for planned failover (can’t be turned on, see Fig 11)



Fig 11. Bummer!


· Initiate the planned failover

o   Will actually replicate quite fast (only changes)

o   Short downtime

· Primary server changes from server 1 to server 2

· Same thing on all three virtual machines (or just the ones you prefer)

· Reconfigure vm networking on the new host if needed

· Awesomeness and success 🙂



Here are some more screenshots from failover and replication:



Fig 12. Waiting for virtual machine to fail over.




Fig 13. Health checking on one of the virtual machines. Everything is ok!




That’s it; VMware is now replaced by Hyper-V! I know a lot more now than I did before I started this little project. Best of all, everything is working just the way it was intended 🙂

At the moment I have two of the virtual machines running from server 2 and one from server 1 just to even out the load a bit.



Stay tuned for more posts! 






Mentioned in the text