View all posts filed under 'Virtualization'

Virtualized browsers for free :)

Wednesday, 20. January 2010 1:48

If you want to test different browsers, but don’t want to install them locally, try Spoons. After installing small virtualization plugin, you can easily stream browser from spoons webpage – and it really works, surprisingly even with Internet Explorer 6.0 on Windows 7:

image

Spoons is based on XenoCode technology (which is very interesting by itself). They not only provide all major browsers, but also streamed games or video players.

Use it while you can :) Microsoft doesn’t like virtualized IEs around internet (remember Thindownload?), so once Spoons will become more popular, it will be closed (or at least applications will be removed).

Martin

Category:Virtualization | Comment (0) | Author: Martin Zugec

Is cloud computing just a buzzword?

Monday, 18. January 2010 12:47

Is cloud computing really just a buzzword? We heard about it over and over – and every year predictions were that “now it will finally get of the ground, we promise”, but it never happened. What is the problem and why doesn’t it work??

In my opinion, problem is what people expects cloud is all about. If you ask people what is cloud computing, common answer is that “cloud computing allows you to take your application and move it somewhere to internet”.

This is something that won’t work. There are few simple reasons – companies don’t want to give up their data and move it somewhere outside and most companies don’t want to invest tons of money to rewrite their applications to run from internet. From this perspective, most famous cloud computing company is probably SalesForce. Well, I don’t fully agree with this definition – we can then say that Hotmail is also cloud computing (which is partially true).

From my perspective, cloud computing is moving your resources to internet and that’s a big difference. Idea that we will move everything to internet now is utopistic – that’s definitely not the way to go for serious companies.

So where is the future? In my opinion it lies with hybrid cloud computing.

Idea is very simple – it doesn’t make sense to make one big bang and simply move everything to internet – it will take ages before we will be (from technology and also trust perspective) to make that jump. Hybrid cloud computing means that you extend your current environment with cloud computing – you can start with 99% local and 1% cloud and then increase cloud ratio slowly if you are successful.

From hybrid cloud computing perspective, cloud is not mostly about applications, it’s mostly about resources – specifically servers.

Think about cloud computing as about environment consisting of virtual servers that are hosted on internet. In case you don’t use those servers, you don’t pay for them.

As we all know, also sentence “just rewrite all your applications to run from internet” doesn’t make too much sense – it’s even problem to rewrite business applications to NOT require IE 6.0. Well, in case you think about cloud computing as hosting platform, you can simply host there your terminal servers\XenApp servers and use your existing applications without any change.

Let me give you some examples.

Example 1 – disaster recovery

Usual requirement is to have disaster recovery plan – in case your environment is not available (for example natural disaster or terrorist attack), you should be capable of rebuilding your environment. Common approach is to have recovery site. But why not prepare that environment in cloud? Because cloud providers have great flexibility in amount of resources, they can guarantee in SLA that if needed, you will get 100 servers in 5 minutes. And of course – if you don’t use them, you don’t pay (or you pay just for virtual storage).

Example 2 – peak times

Consider scenario where you host application that is used by 10 people and 1 server is needed. What if that application got peak times (for example Christmas) when you need 50 servers? Sadly, typical approach is to buy those 50 servers and leave them up and running for rest of year, even though they are needed just for 1 month. Possible solution would be to host those servers in cloud and pay just 1/12 of price instead.

Example 3 – development and test environments

Everyone (especially in enterprise environments) should follow DTAP process (Development –> Test –> Acceptance –> Production). In real life, that’s not always the case and usual reason is lack of resources.

If you have 200 servers in production, test environment with 1 servers doesn’t fully prepare you for everything that could happen. Why not host your dev\test environment in cloud then? You will run it in case you need it and simply destroy it afterwards.

Example 4 – load balancing

Again, peak times – however this time unexpected ones. Part of your farm is destroyed or simply all users decided to try new release of their favorite application at once and performance of your servers is disaster. You could use load balancing and automatically build adequate number of servers in cloud to solve this.

Of course there are TONS of other examples how hybrid cloud computing can be useful. What is however very important (even though not required) is to have decent automation in place.

What is also VERY important to understand is that fact that with hybrid clouds, you don’t  need to host your data in the internet – you can use cloud as a frontend, however keep backend in your network.

If you are interested in hybrid cloud computing, feel free to look at available cloud providers – my favorite ones are GoGrid (though expensive) and FlexiScale (wait for FlexiScale 2.0 – many things will change!). If you would like to have workshop regarding cloud computing, feel free to contact me.

Martin

Category:Cloud computing, Virtualization | Comments (4) | Author: Martin Zugec

Win7 Inside Out 5 – User Profile Service and UPHClean

Monday, 18. January 2010 10:55

In case you are administrator of either terminal servers or Citrix\XenApp servers, I am sure you know small life-saver called UPHClean – User Profile Hive Cleanup service. To explain problem that was there since Windows 2000 server:

it happens quite often that driver or application leaks registry\file handles (it opens handle, however doesn’t properly close it afterwards), therefore profile cannot be unloaded. This leads to situation where you have tons of similar profiles (MZugec, MZugec.000, MZugec.001…) and user experience is that their settings are reset to default (because new profile is loaded for them).

This was major pain with roaming profiles – because profile is not unloaded correctly, it cannot be copied back to central profile storage. Microsoft released utility called UPHClean to solve this situation – it was real life saver.

You can read KB from Microsoft with details about that problem: http://support.microsoft.com/kb/837115/en-us.

Now, some mythbusting :) Problem with profiles that were not unloaded is very common. Also very common recommendation from almost every SBC consultant is – always install UPHClean. However that’s not completely true.

Always install UPHClean if you are running Windows 2003 Server or OLDER operating system.

Since Windows Vista\2008 and newer, we have UPHClean 1.6 included in operating system – it is part of User Profile Service service.

There are however still issues that are not solved by ProfSvc as far as I know – for example hgfs.dat file from VMWare or hsperfdata from Sun (it’s not bug, it’s a feature :) ). I tried to contact Robin (creator of UPHClean) regarding his future plans, I will share those details with you once he replies.

Therefore, UPHClean is now officially dormant. There are many other changes to user profiles in Vista\7, I would like to share them with future (like using Win32_UserProfile to migrate profiles from workgroup to domain).

Do you still have issues with profiles not being unloaded at logoff? Share it with us in the comments.

Martin Zugec

Category:Internals, Mythbusting, Windows, Windows 7 | Comment (0) | Author: Martin Zugec

Win7 Inside Out 3 – Robocopy

Monday, 4. January 2010 15:37

If you ask regular administrator that got experiences with scripting about his favorite scripting utilities that he is using even in combination with PowerShell today, I guess that many people will reply "Robocopy and PsTools of course". I am one of them – even though I don’t use pstools anymore, robocopy /MIR is one command whose equivalent is simply missing in Powershell.

There are few different versions of Robocopy though:
1.) XP010 – version from Resource Kit that is being used by most administrators
2.) XP026 – updated version, however it’s not easy to get it
3.) XP027 – new version built-into Windows Vista
4.) XP027 – new version built-into Windows 7

Have you noticed something strange? Points 3 and 4 are the same, so why are they mentioned?

Even though version number is the same, Windows 7 version of Robocopy contains some improvements – /MT parameter. Default value is 8, maximum allowed is 128.

With /MT, you can specify how many threads will robocopy use to copy files. I was really curious about these results, so I decided to give it a try and test how different versions of Robocopy compares. For each test I decided to do combination of following variables: files count, files size and number of threads.

First, let’s compare versions 10, 26 and 27. On horizontal, you can see amount of files (100, 1000 and 3000). Lower number is better (amount of time needed to copy those files).

image

 image

image

image

As you can see, new version of robocopy was faster in most cases (expect copying 3000 x 1MB files).

Increase of speed is caused by multiple threads running – this is especially useful if you copy multiple small files.

Ok, so we have 8 threads now, does that mean that if I will increase them to 128, it will be fastest? Of course not :) Below you can find few graphs that I just run today – every line here represents different number of threads (8, 15 and 40):

image

image

image

image

As you can see, performance is not very stable and different combination of factors sometimes favors more and sometimes less threads. Therefore my recommendation – don’t mess with threads (unless you got static jobs that you run over and over) and simply enjoy the fact that it is faster :)

Suddenly, one scenario that could really benefit from multi-threading is not supported yet :( In robocopy, if file is locked and cannot be overwritten, robocopy will retry it over and over – by default 1.000.000 times with delay of 30 seconds between those retries. You would expect that in case of multi-threaded copy one thread will try it over and over and the rest would simply continue, however whole robocopy will hang. It would be nice to have additional switch to support this mode.

It’s also important to mention disadvantages\bugs of all versions of robocopy:

XP010 – too old :( There are some bugs related to mirroring security settings for example and of course performance was greatly improved in recent versions.
XP026 – NO ERRORLEVEL. There is bug in this version that doesn’t return correct errorlevels (it’s always 0). Not fixed as far as I know.
XP027 – runs only at Windows Vista. You cannot copy it over to XP\2003 server and use it there anymore :(
XP027 (Win7) – runs ONLY at Windows 7 – even if you try to copy it over to Windows Vista machine, it won’t help you at all (I will talk about this in detail in upcoming Win7 Inside Out article).

Don’t forget that graphs included in this post are just informative – I didn’t rerun them few times over and over, I just wanted to get quick idea how different is performance between versions.

Martin Zugec

Category:Internals, Utilities, Windows, Windows 7 | Comments (1) | Author: Martin Zugec

Win7 Inside Out 2 – “GodMode”

Monday, 4. January 2010 15:17

Tip no. 2 from Win7 Inside Out can be categories as myth busting. “GodMode” in Windows 7 is currently very popular myth and I don’t like myths at all :)

Trick is very simple – just create folder called GodMode.{ED7BA470-8E54-465E-825C-99712043E01C} anywhere on your system and you will get access to secret folder with many different options.

In reality, you DON’T get access to any new options or features.

In Windows 7 (and also previous version), you could create easily links to shell folders. Idea is very simple – you see folder XXX in explorer and using that folder, you can access features. Probably most known folder of this type in Windows 7 is folder called Libraries – that’s true, it is just folder and libraries themselves are just XML files (more details later on).

These folders are identified using GUID and can be found in registry key HKLM\HKEY_CLASSES_ROOT\CLSID. As a rule of thumb (doesn’t always apply), you can say that if key contains ShellFolder subkey AND property LocalizedString, you can use it.

To access such folders from your computer, simply create folder in format FolderName.GUID. For example try to create following folder on your desktop:

SecretLogon.{0142e4d0-fb7a-11dc-ba4a-000ffe7ab428}

image

As you can see, as soon as you hit enter it turned out automatically to folder with name SecretLogon and icon changed also:

image

When you try to click on it, secret backdoor that allows Microsoft employees to logon to your computer will appear (just kidding – it’s simply link to Biometric from Control panel):

image

 

Well, so called “GodMode” is nothing else than accessing already existing entries from control panel. Not sure how about you, but I prefer instant search to searching through tons of configuration options.

Just for reference, below are some GUIDs that you can also use.

Fingerprint – {0142e4d0-fb7a-11dc-ba4a-000ffe7ab428}

Power options – {025A5937-A6BE-4686-A844-36FE4BEC8B6D}

Libraries – {031E4825-7B94-4dc3-B131-E946B44C8DD5}

Wifi – {1FA9085F-25A2-489B-85D4-86326EEDCD87}

Computer – {20D04FE0-3AEA-1069-A2D8-08002B30309D}

There is however something I learned today myself :) SkyDrive Explorer that was mentioned by Dennis recently is also implemented through shell folders. So if you don’t want to access it through Computer, but want to help link somewhere else, simply create folder SkyDrive.{0016CE0E-728C-4FC9-98E5-D0B35B384597}

image

UPDATE: Complete list of control panel items that are accessible can be found here: http://msdn.microsoft.com/en-us/library/ee330741(VS.85).aspx

 

Martin Zugec

Category:Internals, Mythbusting, Windows, Windows 7 | Comments (2) | Author: Martin Zugec

Cloud here, cloud there, cloud everywhere…

Wednesday, 30. December 2009 17:37

Maybe you attended my two presentations about cloud computing – first part was about “private” cloud (Live Mesh, SkyDrive, profiles stored on Internet, Ketarin…), second was about “business” cloud.

To summarize it, talking about private cloud, I don’t believe in “everything must go to web” scenarios, but I rather prefer hybrid cloud solutions – accessing online documents from your locally installed applications or using centrally stored configuration for your applications.

For business clouds, I again prefer hybrid solutions – even though I believe that small companies could already use virtual machine hosted on internet (like GoGrid of FlexiScale).

Core component of my private cloud is Live Mesh, but I was seeking for some time to alternative. My biggest complains are the fact that you cannot script Live Mesh and the fact that you cannot create special rules to handle conflicts (and for some folders, I got conflicts every few minutes). I was looking for alternative for some time, however I was not very successful.

Yesterday I installed again Gladinet – Gladinet approach is little bit different than other providers and I like that idea. Instead of building huge infrastructure, they simply provide “wrappers” around existing cloud storages.

If I should describe it to someone that doesn’t have any knowledge about cloud computing or storage, I would describe it as follows:

Gladinet allows you to map your internet-based storages as local folders

image

Gladinet drive

Among the list of supported storage providers you can find Google, Microsoft (both Azure and SkyDrive) or Amazon (S3).

image

List of supported providers is pretty impressive

image

Access your SkyDrive as regular drive

What I find as disadvantages? First of all, some people (Michal “Altair” Valasek) complained about the fact that it is not fully reliable – sometimes files doesn’t display correctly or they are not uploaded – I cannot confirm this (yet) however.

Second complain I got is about the fact that these folders doesn’t support symbolic links – error message returned by mklink is “The device does not support symbolic links.”  If this drive could support symbolic links, it would be much more useful and automated backup and integration with your local computer would be much better.

Third complain is about “Task manager”. Whatever you do (upload\delete…) will be queued to task manager and processed on background, which makes complete sense. I was however not able to find any option to disable automatic popup of task manager whenever you do something.

image

Task manager will popup whenever you perform any operation with mounted drive.

Just small hint, in case you would like to access Gladinet drive from elevated prompt. Your drive is mounted from \\127.0.0.1\Resources, so to remap it under elevated prompt, simply run Net Use X: \\127.0.0.1\Resources

Martin Zugec

Category:Cloud computing, Utilities | Comments (1) | Author: Martin Zugec

Win7 Inside Out – WinSxS

Wednesday, 30. December 2009 1:37

 

I promised some time ago that I will post 100 tips and tricks about Windows 7. Biggest problem I encountered was the fact that some tips were about how Windows7 works internally, while others could be described in 1 line (small tips). I decided that I will call these articles Win7 Inside Out. Part 1 is explaining some details about WinSxS, hope so you will find it interesting.

What is most common complain about Windows 7 or Windows Vista? Based on my investigation, it is mysterious WinSxS folder – most people complains that it is huge and instantly growing.

First, let me answer very simple question – is WinSxS really needed and is it clever solution, or just stupid workaround? My answer is very simple – YES, WinSxS is very clever solution and YES, we really need it in order to prevent DLL hell scenarios that we encountered in the past.

One small mistake Microsoft made while planning and designing SxS technology was that they didn’t think about popularity of upcoming netbooks (who could predict that?) and small but fast SSD drives. Currently, only real complain about WinSxS is the fact that you cannot change it’s location and it must reside on HDD where Windows is installed.

Why do we need WinSxS?

For non-programmers, it can be useful to describe functionality of libraries first. According to wikipedia, a library is a collection of subroutines or classes used to develop a software. To simplify it – if routine to copy one file consists of 50 lines of code, you don’t want to write it over and over again, but you rather create function called CopyFile and call this functions (so you use 1 line instead of 50). This is also very important from security perspective – if you discover bug in your routine, you need to fix it just once and it’s fixed for all programs that are using this routine.

In general, we recognize shared and private libraries – shared library needs to be on system just once, while private library needs to be added to every program that needs it. In past, to reduce size, we preferred mostly shared libraries, where multiple programs use single library:

image

Centralized approach

Well, that sounds like a brilliant idea – in theory. In real life, this just led to problem called DLL hell – to avoid damage to my brain, I won’t write details about it, I am sure you can find tons of complains on Google (915k results). So IT world turned other direction – from strictly centralized structure to decentralized structure:

image

Decentralized approach

On one hand, DLL hell issue was solved, or wasn’t it? Well, in fact we end up in situation that could be called DLL Hell 2 – it was hell to keep libraries up to date and from security perspective, it was disaster. Not talking about fact that applications were getting very huge in size – much bigger than our WinSxS folder. In my opinion however, it was still better than strictly centralized  structure.

There were many different workarounds and ideas – using .LOCAL files, manifests files, however WinSxS is truly solution worthy software giant like Microsoft.

So what is WinSxS about? It is central managed store for libraries in very clear structure.

 

Why is it so big?

First, let me tell you something – WinSxS is not that big at all. WinSxS is core of Windows operating system – and on my computer (Windows7), it’s 1.3 GB in size.

image

Hey, but doesn’t that dialog say that it is 5.76 GB? Answer is little bit more complicated – yes and no. WinSxS is using technology called hardlinks heavily – hardlink is according to Wikipedia

directory entry that associates a name with a file on a file system

You can have multiple hardlinks pointing to same place on file system – what it means is that you see multiple names (files), however they refer to same location.

Very common question is why then explorer doesn’t display real size? Answer is pretty simple – all hardlinks are equivalent (which is difference between hardlink and symbolic link), therefore you don’t have master (source) file and link (target) file. If you want to see details about your hardlinks, I can recommend you utility called Hardlink Scanner (both 32 bit and 64 bit) – there is no built-in tool in Windows to see hardlinks configuration.

image

Difference between hard links and symbolic links

As you can see in above picture – when we use symbolic links, we always have one “master” and one or multiple “slaves” (imagine that slave in .lnk file and master is .exe file), while with hardlinks all links are masters and changing any one of them will automatically change underlying data for all of them.

What it means when we talk about SxS is that most files in WinSxS folder are in fact stored somewhere else. Based on my experiments, almost 80% of files in WinSxS folder are just referencing to existing location (they are just hardlinks to other files). Talking about size of WinSxS folder, on my computer, 4.8 GB were simply linked files, while 1.3 GB were regular files. What is also very important to mention is that Windows is NOT only product that is using WinSxS – many other applications are also, so with bigger Windows folder, your Program Files size can be reduced. The real benefit of SxS technology is therefore pretty much hidden. Based on quick scan, I can see that there are 500 MB of hardlinks stored in my Program Files (30 GB in size).

Can I reduce it?

Well, that’s pretty hard question. Simple answer is no – mostly caused by the fact that removing files from WinSxS simply won’t give you more space (as long as there is any other hardlink pointing to that specific resource).

Uninstalling language packs

There is however very easy trick how you can reduce size of WinSxS folder – by removing language packs. If you have a look at structure of folders in WinSxS folder, you can see naming pattern there:
proc-arch_name_public-key-token_version_culture_hash

As you can see, part of folder name is culture. When you install Windows 7, you can see that multiple language packs are available as optional download:

image

Every one of them will add new resources to WinSxS folder – on average, it’s around 300 MB per language package. If you install all of them, it’s around 10 GB of data. So easiest way to reduce size of WinSxS is to simply uninstall additional language packs. Easiest way is to run lpksetup.exe – this will open dialog “Install or uninstall display languages”:

image

Be aware that it takes some time after uninstallation before WinSxS size is reduced!

My results:

EN + CZ:

Full size: 6.45 GB
Hard links: 4.98 GB
Normal files: 1.47 GB

EN only:

Full size: 6.18 GB
Hard links: 4.80 GB
Normal files: 1.37 GB

 

Deleting Windows Update cache

Second trick you can use is to delete Windows Update cache of manifest files. This file can be found in C:\Windows\WinSxS\ManifestCache folder – usually it’s not worth it, because it is smaller than 200 MB.

Uninstall some applications

As I explained before, some applications may use WinSxS. Usual recommendation is to uninstall some applications – but question is which ones? You can use Hardlink Scanner that was mentioned before to help you.

First find out which folders are biggest – you can use for example WinDirStat to find them.

Then you run Hardlink Scanner with /F switch against files in that directory. You will see something like this in output:

Scanning directories and files…..

Breakdown for "c:\Windows\winsxs\amd64_1394.inf.resources_31bf3856ad364e35_6.1.7
600.16385_en-us_beafdf583b909e3f\1394.inf_loc"
=========================================================
  Unique ID:     100000000687e
  Hardlink count:            2
  Naive file size:       7,176 bytes
  Unique file size:      3,588 bytes
  Kind of file:         normal
  Filenames:
    \Windows\System32\DriverStore\en-US\1394.inf_loc
\Windows\winsxs\amd64_1394.inf.resources_31bf3856ad364e35_6.1.7600.16385
_en-us_beafdf583b909e3f\1394.inf_loc

 

Important part is Filenames – there you can see that this file is both the one in WinSxS and C:\Windows\System32\DriverStore\en-US\1394.inf_loc. That gives you an idea where is this component being used.

 

…to be continued -  this was first part of our article. This part describes WinSxS in more user-friendly way. In next part, we will go deeper into SxS – how it works, if you can move it to other disk and how can you work with it.

Category:Internals, Windows | Comments (7) | Author: Martin Zugec

Testing using system account

Thursday, 6. November 2008 21:02

Ever needed to test something using the system account? There are a number of ways to get a command prompt running in the system account context. My favorite has always been the sethc hack because I could use it even without logging on to the system. Until today, however I never tested my favorite hack on Windows 2008. Guess what… it still works :)

Here’s what you need to do. I left UAC enabled and went into the system32 directory and located the file called sethc.exe. Right click, take ownership and set the security for your admin account modify.

Now overwrite sethc.exe with cmd.exe (copy c:\windows\system32\cmd.exe c:\windows\system32\sethc.exe) and logoff.

When back on the WinLogon Desktop press <SHIFT> five times; a command box should now popup.

image

Now, you can do all sorts of fun things but more importantly you can for instance test if some security setting somewhere isn’t blocking your computer from connecting to a share or some other resource.

Happy testing!

Category:Virtualization, Windows | Comment (0) | Author: Dennis Damen

Hyper-V and BSD

Wednesday, 5. November 2008 1:46

 

What’s the first thing you do when you install a product like Hyper-V? Exactly! Install an unsupported Guest OS :)

I downloaded the latest version of PC-BSD just to have a look-see. (I like to play around with operating systems other than Windows but after a while I always return to Windows; I actually need to get some work done too :D )

So, I booted the PCBSD DVD and I was surprised how smooth the PCBSD installer was running.

image

But when I was done playing around with BSD I wanted to shut down the virtual machine. This proved to be a little harder than I expected.

image

The virtual machine just wouldn’t shutdown and all the menu items were grayed out. After some trial and error I found out that this behavior was caused by the Legacy Network adapter.

Well, at least I learned one thing: don’t set your virtual machine to auto-start after a server reboot when your are playing with an unsupported OS!

Category:Hyper-V, Virtualization | Comment (0) | Author: Dennis Damen

Hyper-V Server Installation

Tuesday, 4. November 2008 0:47

Last week I installed the free Hyper-V server from Microsoft and I LOVE IT. I installed it on a home made box with 4 250GB HDD’s in RAID-0. And with RAID-0 I mean the cheap-ass Intel Fake-RAID stuff. I upgraded my CPU to a Core2 Quad and upped my RAM to 8GB.

After downloading the DVD I inserted it, clicked through the Windows 2008 setup (all my hardware was identified immediately) waited for about 15 minutes and I was… uuuh… wait… where do I start the management console? Ok, this might be a good time to RTFM.

Turned out, you need to install the management console on a Vista box. No problem, my company laptop comes with Vista :) . Getting the management console to run was kinda tricky but I got it running using this step-by-step guide.

<whisper> not having the Explorer installed doesn’t mean you cannot install something like FreeCommander </whisper>

Category:Hyper-V, Virtualization | Comment (0) | Author: Dennis Damen