Reviving Jenkins server – move to HyperV

Last time when was time for Jenkins it stopped working. Few strange thing appeared, tests took very long time, there were IO errors, cobertura report was missing a source file and one file from project got so many warnings and errors that it wasn’t possible.

My fist thought was VirtualBox went crazy. It happed few times before. Why ? When thunderstorm pass nearby sometimes it hits a power line and power goes out. Its very bad for electronics like computers. Now on this computer is another computer in form of virtual machine and its stored in file. Now hdd + open file + power outrage = disaster.

I know I should buy ups, soon.. hopefully.. soon 🙂

Next thing to consider is HyperV and VirtualBox at the same time. VirtualBox works in software mode without hardware acceleration because HyperV get all the hardware joy. Not good. And why HyperV ? Answer is simple, Windows 10 IoT on Raspberry 2 + Windows Mobile Emulator.

It was time to clear a mess. I choose to move all virtuals to HyperV.

It was simple, open VirtualBox, select machine and from menu select Virtual Media Adapter. Click Copy icon and remember to select VHD (Virtual Hard Drive) because its compatible with HyperV. Save new image.

Now start HyperV and create new machine. When you see option to select hard drive file, open file you just saved.

Last thing to remember is to add hardware, old network card because network card didn’t work.

So after this my new virtual machine on HyperV was enabled and running.

I started Jenkins and ran check. It was quick but with two errors. Cobertura is still down, I removed it temporary from task list and same file had many errors.

Next I looked at this file very carefully… very… and… problem shows itself. Wrong end of line… Don’t know how but it was set as Mac not Linux and Jenkins went crazy… fixing line endings and I’m just without cobertura..

Was it necessary to move to HyperV ? In my case yes in normal case no 🙂

And lesson is: before doing all crazy things, check your files for line separator !

My second VM is for PHP and it converted the same way. Without any problems. Samba share is alive, all redirects are alive. One thing to mention is that this VM has IP from router (mac to ip). If this will go by Vagrant – hmm can be a problem.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s