ArtinSoft's Blogs

Software Migration Experts
Welcome to ArtinSoft's Blogs Sign in | Join | Help
in Search

Christian Saborío's Blog

The blog deals mostly with problems and their respective solutions that I find on day to day basis at my current workplace. Most of the issues so far deal specifically with Virtualization (mostly Microsoft related), 64-bit migration, and Windows 2003 issues. Many of the problems I have faced in various projects have been solved by reading someone else's blog. This is an effort to pay back and hopefully someone will be able to solve some of their problems by reading something within these pages.

April 2007 - Posts

  • Go Away, F12! (or how to disable F12 at bootime to boot into WinPE)

    While looking for a way to fully automate the installation of wim image file to a server, we immediately stumbled upon a small problem.   When doing a PXE boot, the boot rom imaged asked for the F12 key to be pressed.  If the key was not pressed, the machine booted normally into Windows - so much for the automation idea, huh?

    Fear not, as Stephen sent me a link that explains the following from a RIS installation:

    "...To enable a fully automated RIS-based installation, it is necessary to substitute the Startrom.n12 boot file for the default Startrom.com boot file..."

    Further reading revealed this vital piece of information:

    To configure all clients serviced by a RIS server with an automated installation, rename the startup boot files as follows:
    • Change Startrom.com to Startrom.bak
    • Change Startrom.n12 to Startrom.com

    These files are located in the following directory location on your RIS server:

    RemoteInstall\OSChooser\i386

    There are certain differences between the RIS and WDS installations, but nothing big.   First off, the location of the files for boot time (given that it is a 32-bit box is the following):

    \\WDS_Server_Name\reminst\Boot\x86

    There you will not find Startom.com and Startrom.n12, but rather pxeboot.com and pxeboot.n12.

    If you rename pxeboot.n12 to pxeboot.com, your machine will PXE boot and will NOT ask for F12 key press.   Ok, now that the problem is solved, we can go back and try to find solutions for the remaining 500.

  • Workaround for OCX State Problem (VMRC Active X)

    On a previous post I was having problems with the VMRC ActiveX control when creating an instance at runtime.  The problem boiled down in having an invalid OCX state exception thrown at me whenever I tried to access a property of the VMRC ActiveX control at runtime.

    After researching for quite a while on the Internet, it struck me that if I just placed the VMRC ActiveX in a UserControl at Design time, and instantiated that UserControl instead of the ActiveX directly, things would work great.  I implemented this into the VMCA application and it worked perfectly fine.   You can see I managed to get VMRC connections to different machines in different tabs at runtime on this post.

    Some people have asked where they can get a copy of the VMCA.  Unfortunately as of now, the application hasn't been thoroughly tested and is missing some functionality which I deem as basic.  Also, this is something I have been working on my spare time and lately I have been swamped with other projects.  Perhaps the best approach would be to take it to stable phase and then try and get it on CodePlex so that everyone can pitch in...we'll see how that goes.

    For all things related to software migration, be sure to visit Artinsoft's website. For training in Visual Basic to C# migrations, Visual Basic to VB.Net, Virtualization, and 64-bit training check our training web page.

  • Virtual Machine Configuration Assistant

    As I previously mentioned, I've had some chance of working on the application dubbed as the Virtual Machine Configuration Assistant in the last few days.   One of the most noticeable changes are the GUI.  This is the old GUI of the app:

    ZZ6A980B2C

    This is the revamped, improved version:

    ZZ1AC07DEE

    The application has undergone major revisions under the hood.  I have tried to separate tasks into different classes in order to gain modularity.  So far I have a VMManager, a VHDManager, a VMRCManager and so on.  Reading the code now makes a lot more sense than before.

    This is the part in which most of the work has been lately done, the Disks tab:

    ZZ33FBC3C2

    From here, you can pretty much do anything related with VHDs.  After modifying some ISOs,  I have also managed to completely automate the defragmentation-precompaction-compaction phase required to reduce the size of VHDs.  Now I just leave the process running and when I arrive the next day, my VHDs are like 50% smaller.

    I had not touched C# in a while, and all I can say is "Wow".  C# rocks, it is very intuitive and creating efficient GUIs is a bliss.  One can only wish that there was a 2.0 framework to run under OS X.

    I have also fixed the problem with OCX stats at runtime - actually it was a workaround, not a fix.  Here is a video I made of some of the features of the application, which include:

    • VHD Attachment
    • VHD Creation
    • VM Creation
    • VMRC in tabs for each of the machines
    *sigh*...It has been impossible to embed the video here, here is the youtube link.

    In case the resolution of the movie above is too small, the avi can also be downloaded.

    For all things related to software migration, be sure to visit Artinsoft's website. For training in Visual Basic to C# migrations, Visual Basic to VB.Net, Virtualization, and 64-bit training check our training web page.

  • Problems Creating a VMRC ActiveX Instance at RunTime

    During the Virtualization labs, which are freely available to anyone interested in Virtualization, the Artinsoft trainers have had a chance to teach the Virtual Server COM API and its uses.  One of the attendees showcases the application that they build on his blog. I think the application in its finished state is a great start to create something functional, but it is in no way something that can be used for management right out of the box.  The reason for this is simple: we wanted simple in order to reduce the learning curve of the COM API. 

    I have started to work on my spare time on a new version of the Virtual Machine Configuration Assistant (VMCA) which will be version 2.0 due to major UI overhaul it has had.   One of the cool things I wanted to do, was the ability to open VMRC connections within the app in tabs (gotta love tabs in everything!).  So here is the interface I have so far (click on the image for larger view, as it has info on what I am trying to accomplish):

    ZZ5B4D2238

    Sounds easy, huh?  Well, that is what I thought.  I have in my application the reference to the VMRC ActiveX control, the image that you see above depicts a VMRC instance placed on the form in Design Time.

    When the user selects the VMRC option, I have the following code:

    vmrcControl = new AxVMRCClientControl();
    vmrcControl.ServerAddress = "vs02";
    vmrcControl.Size = new System.Drawing.Size(985, 675);
    //Add a New Tab
    this.tabPage1 = new TabPage();
    tabPage1.Text = VMCA.VirtualInstances.getVMInstance().Name;
    //Add the VMRC Control
    tabPage1.Controls.Add(vmrcControl);
    vmrcControl.Location = new System.Drawing.Point(0, 0);
    this.tbcVMRC.TabPages.Add(tabPage1);
    vmrcControl.UserName = "Administrator"

    The line in red below is where all hell breaks loose:

    ZZ735D6EE2

    The problems seems to be that at design time, the VS Designer creates and configures a resource that is used to keep track of the ActiveX instance's state.  At runtime, this resource does not exists and that is the reason why the ActiveX is an invalid state.  Not being the ActiveX hacker that I would like to be, I am baffled on this problem.

    Have you ever suffered with a problem such as the one above?  I have looked for help at various locations without any luck.  Although not critical, this feature is something that would definitely rock.  Help me solve this problem and I will send you a couple of pure quality Costa Rican coffee wherever you may be (if you are in Costa Rica, I'll send you beer instead ;)

    I have posted a project which repros the problem:

    http://amd.streamload.com/artinsoft/Links/5B75335893

    In order to repro, just debug the app, and from the menus select Remote Control...if you can somehow make it through without the invalid OCX state exception, you are right on the money.

    UPDATE: In order to run the project above, you *need* to have the VMRC ActiveX control installed on your machine.  The following page will guide you with the necessary steps to complete this process: https://www.microsoft.com/resources/virtuallabs/installactivex-technet.aspx

    For all things related to software migration, be sure to visit Artinsoft's website.  For training in Visual Basic to C# migrations, Visual Basic to VB.Net,  Virtualization, and 64-bit training check our training web page.

Powered by Community Server (Non-Commercial Edition), by Telligent Systems