Automatically Adding Users to a Windows 2003 Server

27. November 2006 13:35 by Csaborio in General  //  Tags:   //   Comments (0)

A crucial part when carrying out training labs is setup. Without a well thought plan that takes into consideration everything that can go wrong (because it will), your labs are toast. We've done about ~70 trainings so far and in every one of them something pops up. With more and more trainings, you start to develop a sixth sense of complete and utter pessimism that will help you identify problems before they even show up.

That being said, we are in the middle of testing all of the setup for a series of Virtualization training labs in December 2007. We needed a way to quickly and painlessly add a bunch of users to a Windows 2003 Server. The following is the series of commands to create a user callled student1 on the server with Administrative priviledges that belongs to domain admins and an account that never expires:

net user student1 p@ssw0rd /ADD /DOMAIN
net group "domain admins" student1 /ADD /DOMAIN
net localgroup Administrators student1 /ADD
net accounts /maxpwage:unlimited /DOMAIN

There are plenty more of options so check out the net command to find a command that best suits your need.

TSA providing Airport Security Checkpoints Wait Times

18. November 2006 09:32 by Csaborio in General  //  Tags:   //   Comments (0)
Whether you travel a lot or just a few times per year, you have probably noticed the nuisance that it is dealing with the security checkpoints.  Depending on the airport you are in, it can easily take you anywhere from 20 minutes to up to an hour (in my experience, MIA is the worst airport in waiting times for anything - even for a sandwich!).  If you are flying in internationally to the US and you need to make a connection, there really is no way of knowing how bad the security checkpoints are to see if you are going to make your flight - until now.

TSA has published this web page that lists the estimated wait time when going through security.  By selecting a couple of check boxes, you can get detailed information on the average wait time to arrive at a particular gate at a particular time.  This can really help you out beforehand in case you will miss your flight to reschedule a new one ASAP.


Error Starting Carmine: The credentials provided do not have sufficient privileges on localhost

14. November 2006 13:10 by Csaborio in General  //  Tags:   //   Comments (0)

Today, while creating the final image for our SCVMM (System Central Virtual Machine Manager), one of the guys in our team stumbled into a problem in which the SCVMM (which I will refer to as Carmine from now on), was refusing to start up even though we had met every pre-requisite it had listed.  We were completely baffled, the error given was:

Access denied while contacting the Virtual Machine Manager server.  The credentials provided do not have sufficient privileges on localhost.(ID: 1605)

The account had full admin privileges, so what could be wrong?  The machine had joined our domain, how come it did not have the right credentials?  Well, after a while Jose suggested to check if the DNS were set to that of the domain controller (see previous entry regarding this) and indeed that was the culprit.  After setting the DNS severs, Carmine started up without any problems.

Virtualization Training

10. November 2006 15:57 by Csaborio in General  //  Tags:   //   Comments (0)

Are you new to Virtualization?  Do you want to learn the best ways to manipulate Virtual Server using the Virtual Server API?  Do you want to learn about future Microsoft Virtualization technologies such as Carmine and VT support in Longorn?  Well, today is your lucky day.

In its continuing effort to provide customers with the latest technology, Microsoft has launched the Virtualization Events lab series.  During 3 days, you will learn everything you need to know in order to code your way through Virtual Server.  Please bear in mind that the lab is not targetted for the IT Pro, but instead for programmers who want to learn the latest tips and tricks without having to read through thousands of pages of documentation.

Virtualization is a very hot topic, and I would not be surprised if the events filled up very quickly, so act fast if you want a seat reserved!

VHD Test Drive

10. November 2006 14:52 by Csaborio in General  //  Tags:   //   Comments (0)

On November 6th, Microsoft had a big announcement to make.  This announcement is only the beginning of something that will, without a doubt, become a huge success: the VHD Test Drive program.

The program’s idea is that a user can download a pre-configured VHD that has and operating system already installed.  The idea is evolved a bit more in the sense that the VHD not only has an OS, but also has some kind of pre-configured environment in order to test out a particular product without the hassle to go through difficult setups.

For instance, if you want to test drive Exchange Server 2007 quickly and effortlessly, just download this VHD and you are good to go.  Want to install something on Windows Server R2 without having to install the OS?  This VHD right here will help you accomplish your task. 

There are 4 VHDs available for download, the entire list is summarised below:

For the official press release, click here.

RDC on a Mac (OS X)

2. November 2006 13:43 by Csaborio in General  //  Tags:   //   Comments (0)
Even though there are not many Macs at Artinsoft (2, I believe :) this might come in handy for someone who needs an efficient remote desktop connection.  Even though Microsoft makes a RDC client for Macs, running it on an Intel mac can be a bit of a drag.  Rosetta apps (applications that do not run natively on Intel macs) are kinda sluggish when launching.   Also, if you need to run various instances of RDC, you would need to make copies of the app itself (or use this utility).

Luckily, there are various free alternatives out there that work like a charm.  My personal favorite is CorD (cocoa remote desktop).  It is lightweight, fast, free, and offers tabbed windows for various simultaneous connections.  The only con I have found so far is that it does not support copy paste.

You can also use TSClient, which has more features than CorD but unfortunately requires the installation of x11.  While this may not be a big issue, some people are not very fond of running programs under x11 for performance reasons.  TSClient is the client that most resembles the official Microsoft client and it even offers several features that the official client does not have.

The New VMware Converter

2. November 2006 12:30 by Csaborio in General  //  Tags:   //   Comments (0)
The race between Microsoft and VMWare for the virtualization space can only offer benefits to the end user.   The close competition will push the limits of both Microsoft and VMWare in offering the best of each other.  Point in case is the (beta) release VMWare's Converter.

The VMWare converter makes the process of moving a physical machine to a virtual a painless process.   So far in our tests, we've managed to hack our way with some unconventional methods, but these take a lot of time.   The VMWare tools offers a new level of Physical to Virtual (P2V) conversion by having a manager that can queue operations for this process.   It is fully scriptable as well, which can only simply and make the whole process more efficient for system administrators. 

Microsoft is not falling behind in this area.  The Virtual Machine Manager has plans for not only fully automating P2V conversions but guiding you on the best Virtual Server where the new physical machine can be.  Unfortunately, this is not currently supported at the beta stage that the product is right now, but from demos I have seen I am sure it will be a sure contender to VMWare's offerings.

For more info on VMWare's Converter visit this page and for Microsoft's Virtual Machine Manager info, check this site out.

Joining a Machine to a Windows Domain that won't Budge

12. October 2006 04:57 by Csaborio in General  //  Tags:   //   Comments (0)
During our VT labs, we are constantly messing around with domain controllers due to the fact that in order for Virtual Server's API and Carmine to work correctly, the hosts need to be on the same domain.

Everything has worked quite fine until a day in which we were trying to add a machine the domain we had.  I got the following message:

The system cannot log you on due to the following error:
The specified domain either does exist or could not be contacted.

Please try again or consult your system administrator.

Hmmm...well...trying again certainly did not work and we are our own sys admins ;)  I sent a desperate cry for help to our awesome Virtua team, and Jose hinted me on how to fix it.

All it takes is to change the Primary DNS of the machine that won't logon to the IP address of the domain controller.  Doing this fixed the issue.

As far as why this works, I really don't know and to a certain extent, I am not sure I want to. :D

Hope this helps someone in distress in the future!

Use VTune to Catch Alignment Faults

5. October 2006 02:50 by Csaborio in General  //  Tags:   //   Comments (0)
So there is a quick hack method you can use to catch alignment exceptions on your code, but this approach - although effective, is not a very elegant solution. It turns out that VTune can help you find alignment faults very easily. I tested VTune using my MacBook running Windows XP and it had an event called: Misaligned Data Memory References By focusing on these events, you can find places in your code where alignment faults are happening. No more guessing, no more hacks, plain and simple. On some processors, this event counter might not be present. In cases like this, you would need to focus on the Split Stores Retired and Split Loads Retired events to find this information. We have added this extra information on our VTune labs as part of Artinsoft's continuing effort to support in-house customized 64-bit training .

How to run Visual C++ Binaries in a 64-bit Machine without Visual Studio installed

11. September 2006 06:28 by Csaborio in General  //  Tags:   //   Comments (0)
Fact: You cannot install Visual Studio on an Itanium box - this is a "by design" issue and the installer will not budge regardless of what you try.

So if you are building binaries from Visual C++, how do you manage to make them run given that most of the libraries they need will not be found on the Itanium box?

One workaround is to statically link your binaries - which oftentimes lead to bloated sizes and defies the whole purpose of using dynamically linked libraries.

Another one is to install the Visual C++ Runtime libraries for Itanium and x64:
Install these on your 64-bit server and C++ binaries will run in all of their glory.  With Remote Debugging and these utilities installed, you won't even need a RDC to the 64-bit box to run your code.  Happy coding!

OT: What to do in case of an accident in the USA

29. August 2006 16:11 by Csaborio in General  //  Tags:   //   Comments (0)
On a completely non-technical note, I thought I'd share with my fellow colleagues (and anyone who searches for this info), what to do in case of a car accident in the United States.

See, in Costa Rica, whenever you are in a car accident, you leave your cars as they are until the police officer decides to drop by.  This is mainly done because in Costa Rica, many people drive without insurance, so they will go any length in trying to avoid to pay for the damages they have done.   The only way to get them (guilty counterpart) to pay is by having the cop see the accident scene as  it happened and then settle in court.  This, of course, leads to massive traffic when an accident happens.

Anyhow, back to the accidents in the US story.  I had the (dis) pleasure of being in an accident last Saturday in Boston.  I had the honor of being crashed by none other than "Paul from Revere", on his slightly big tank car.  Here is what they look like:






Yeah, that's right, the amphibious tank smacked me real good and left quite some damage on my rented car:




So here is what you need to do if ever on an accident in the US:

  1. Move your car out of the way to avoid traffic congestion (your inner Costa Rican conscience will make it very hard to accomplish this task).
  2. Find out if everyone is alright, call 911 otherwise 
  3. You need to find out the following info from the driver who crashed your car: Name, Address, Company, Insurance Company, Insurance Claim Number
  4. Write down the time and street name where the accident happened
  5. Write down the names and numbers of some witnesses around who can corroborate what happened
Once you have collected this info, call your company insurance and file a claim.  You will also need to file a report in the accident form that is usually found in the glove compartment of your rented car.

Hope this helps someone in the future!


Error while linking a C++ Application with Virtual Server

29. August 2006 05:51 by Csaborio in General  //  Tags:   //   Comments (0)
While trying to build a C++ application that tried to use the library from Virtual Server library VSComInterfaces.lib, we were getting a linker error that had us baffled for quite some time:

Error     1          error LNK2001: unresolved external symbol _IID_IVMVirtualServer  EnumVMs.obj    
Error     2          fatal error LNK1120: 1 unresolved externals          H:\Virtua\M01\Exercise-6\VMListing\Debug\VMListing.exe          

Searching for an answer in various search engines, only lead us back to where the example source code had originated:  http://windowssdk.msdn.microsoft.com/en-us/library/ms699581.aspx

We had no idea what was going on...we had brought the library from the C:\Program Files\Microsoft Virtual Server\Documentation directory from the server...the server...the x64  server!!!!

A quick check using dumpbin displayed the following info on the lib:


FILE HEADER VALUES
            8664 machine (x64)
               3 number of sections
        43589BDA time date stamp Fri Oct 21 00:42:18 2005
             57D file pointer to symbol table
              47 number of symbols
... 


We quickly compiled to 64-bit to see if the 64-bit library was indeed the culprit.  The app compiled without any problems!!

Bringing over the 32-bt lib file from a 32-bit Virtual Server allowed us to create the 32-bit version of the application and everything is back to normal.

Hopefully someone will find this post if they ever encounter the same problem in the future.

Differences bewteen Virtual Server and the Hypervisor

25. August 2006 04:03 by Csaborio in General  //  Tags:   //   Comments (0)
When working with these labs, people who have heard about the hypervisor integration
usually ask what is going to be different between the hypervisor and the current offerings or Virtual Server 2005 R2 Beta. In this link, you an find extensive information about the difference between them, but of special interest is the table below:


Virtual Server 2005 R2
Windows Server Virtualization
32-bit VMs
Yes
Yes
64-bit VMs
No
Yes
Multi-processor VMs?
No
Yes, up to 8 processor VMs
VM memory support?
3.6 GB per VM
More than 32 GB per VM
Hot add memory/processors?
No
Yes
Hot add storage/networking?
No
Yes
Can be managed by System Center Virtual Machine Manager?
Yes
Yes
Cluster support?
Yes
Yes
Scriptable/Extensible?
Yes, using COM
Yes, using WMI
Number of running VMs?
64
More than 64. As many as hardware will allow.
User interface
Web Interface
MMC 3.0 Interface

This table only goes to show that Microsoft’s Virtualization strategy in the future will offer a lot more than Virtual Server. Keep in mind that these features will be available about 180 days after Windows Longhorn Server ships, so until then, we will just have to sit back and watch these long awaited features with a lot of patience.

Who says you can't expand VHDS?

17. August 2006 12:36 by Csaborio in General  //  Tags:   //   Comments (0)
It is a well known fact that dynamic VHDs that reach their limit cannot be made any bigger when running in Virtual Server.  I recently stumbled onto this problem when creating a differentiating disk from a base install of a dynamic disk of Win2K3 with 2 GB tops space.  I had two choices at this point:

  1. Create a new VHD and install everything I had done
  2. Try to find a way to expand the VHD with whatever hack came to my mind.
Being the stubborn person that I am, I decided to follow the latter.

The good news is that i t can be done - the bad news is that it may be a bit of an overkill!  Anyhow, here is what you need:

  1. A BartPE ISO that has some kind of imaging utility (ours has Ghost and TrueImage - amazing programs!)
  2. A fixed empty VHD that will fit the image of the disk you are trying to expand
  3. Lots of patience
Step 1: Image the Image

  1. Add the BartPE.iso as an additional CD-ROM Drive
  2. Add the empty VHD (let's call it images.vhd) as an additional VHD
  3. Boot your PC, it should boot from the CD and Bart-PE should start
  4. Format images.vhd into an NTFS drive using whatever you want
  5. Create an image of your source disk (the one you are trying to expand) and place it on the images drive
Step 2: Restore the Image

  1. Create a new VM configuration with a new VHD that will hold the new size (format it as NTFS with any utility you like)
  2. Add the BartPE.iso as an additional CD-ROM Drive
  3. Add the images VHD as an additional VHD
  4. Boot your PC, it should boot from the CD and Bart-PE should start
  5. Use Ghost or whatever you want to restore from the Image from the Images.vhd
Reboot.  Enjoy!

Virtualization 101 for IT

11. August 2006 08:09 by Csaborio in General  //  Tags:   //   Comments (0)
Without a doubt, Virtualization is the tech buzz word for this year.  Every newsletter I receive has a link to at least 3 VT sites.  Recently I stumbled on this entry which is a podcast by Dean Wells, who does a great job explaining what IT should consider nowadays when making computer purchases. 

I think many IT departments are blindly making purchases of hardware that do not support VT technology.  What they don't know is that the moment they purchase this new equipment, they are pretty much buying outdated equipment.  Mr. Wells does an amazing job explaining what IT departments should strive for when making these types of decisions, it is definitely worth a listen.

Copy and Paste from Host VM to Guest VM (and vice-versa)

11. August 2006 06:08 by Csaborio in General  //  Tags:   //   Comments (0)
I have to admit I was a bit shocked when I tried to copy and paste text between VMs using Virtual Server.  The clipboard was not copied at all and there was no easy way to transfer text back and forth.  I tried installing the Virtual PC Additions and still no luck.  I could not believe they left out a feature like this one out - I don't know if enabling this is trivial using some super secret setting, but until then, here is a workaround.

It is actually quite simple, and it was Stephen who hinted me on this while I was ranting.  On the host machine, enable Remote Desktop Connections and connect using a RDC client.  You will be connecting to the VM just like any other mahine, and RDC supports copying and pasting of text back and forth.

Not the best solution, I know, but it gets the job done.  It is also worth noting that the same problem happens with VMWare's VM player.

Microsoft Kills Virtual PC

7. August 2006 15:44 by Csaborio in General  //  Tags:   //   Comments (0)
What?!?  Kill VPC?  A few weeks ago they announced they would give it away for free and now they are ceasing production...does not make sense, does it?

Well, if I add a "for Mac" at the end of the my Blog title it probably makes a lot more sense, doesn't it?  ;) Today the Mac community learned the pleasant surprise that VMWare is going to be releasing a Virtualization solution for Intel Macs.  On the same day, we also find out that Virtual PC for the Mac is going bye-bye :(

While this means that many PPC Macs will be left out in the cold without a way to emulate Windows, I understand where Microsoft is coming from.  Catching up where Parallels is right now in terms of VT support on the Mac would really take a while, and they would basically be starting from square one.  I can't wait to see what VMWare has up their sleeve...beating Parallels in the Virtualization market on Intel Macs is certainly a tough challenge.

Install Virtual Server R2 SP1 on Longorn Server

24. July 2006 03:42 by Csaborio in General  //  Tags:   //   Comments (0)
Usually when you install a beta OS with a beta productivity app, things can go wrong, or at least that's what you expect. That was exactly what I thought when I tried to install the latest beta of Virtual Server on Longhorn Beta. I got an error telling me that I did not have IIS installed and could therefore could not install Virtual Server. After reading the an old blog entry from the Virtual PC Guy's weblog (this guy gets paid to test old games ;), the soulution is simply to install ALL the IIS 6 Management Compatibility components and you are good to go:



...welll...as far as installing goes. I am now having problems with other things for which I hope to post the solution pretty soon...ah the beauty of beta software!!

Sending Mail via MAPI using Outlook Office in 64-bits

23. July 2006 17:05 by Csaborio in General  //  Tags:   //   Comments (0)
We recently received an interesting mail detailing the problems faced when using MAPI to send mail via Office Outlook Express. Here are the symptoms (try and see if you can figure it out by the end of the post):

1. When using MAPI calls in a 32-bit application when Outlook Express is the default e-mail handler, the application creates a blank message (success)
2. When using MAPI calls in a 64-bit application when Outlook Express is the default e-mail handler, the application creates a blank message (success)
3. When using MAPI calls in a 32-bit application when Office Outlook is the default e-mail handler, the application creates a blank message (success)
4. When using MAPI calls in a 64-bit application when Outlook Express is the default e-mail handler, the application does not create a blank message (failure). When the program ran and tried to create an e-mail, the Outlook Express connection wizard showed up.

After comparing registry entries for hours trying to find why Office Outlook was not being recognized as the default e-mail client and why Outlook Express was, it then hit me. There is a 64-bit version of Outlook Express on every 64-bit Windows install, that is why scenarios 1 & 2 above were working! There is some MAPI calls via DLLs, and since there is a 64-bit version of Outlook Express, everything works fine when it is the default e-mail client.

The story with Office Outlook is different. Since it is only 32-bit, when it is registered as the default e-mail client, only the 32-bit section of the registry is affected. That is why when the 64-bit MAPI program tries to send mail, it only sees Outlook Express. This makes sense as the MAPI functionality to work with Office Outlook is a 32-bit DLL, which would not work when called from a 64-bit binary.

As far as what can be done to overcome this problem, you ask? I have not tested this, but if you could build yourself an out-of-process 32-bit COM LocalServer that was responsible for invoking the MAPI functionality of sending mails, you could (in theory) invoke it from a 64-bit application and be done with your bit-dependencies problem.

This link is a great place to start. I will be busy at an event here in Redmond, but if I have some free time I will try to come up with the solution and post it here,

Itanium with VT support thoughts and questions

20. July 2006 09:25 by Csaborio in General  //  Tags: ,   //   Comments (0)

After reading Jose's blog entry, I immediately had some questions about virtualization on the new dual-core Itanium architecture.  First and foremost, which software vendor out there has a Virtualization solution that supports the Itanium?  As far as I know, the roadmap for Virtual Server 2005 R2 SP1 does not include support for the Itanium.  Longhorn's roadmap does not include any foreseen support for the hypervisor on the Itanium either, so no luck in there as well.

Secondly, if some company indeed supported VT on the Itanium and allowed you to say, run Windows XP 32-bit on a virtual machine, would  that be faster than running the a 32-bit application directly on Windows Server for the Itanium?  Also, how would the WoW64’s performance (which IMHO is the Itanium's Achilles’ heel) be affected by the fact that there is VT support? 

These are many, many questions for which I have no answer for and hopefully will be addressed soon enough.

Categories