software development, virtualization

SimDK

A few years ago, after writing my whitepaper on VMware Infrastructure (VI) plug-ins, I was fortunate enough to visit the VMware campus and meet several of their engineers. I mentioned to them that it would be nice to have a VMware Infrastructure simulator to develop against for when a full VMware installation was not available. They said that while that may be nice, it was a lot of work, and wouldn’t installing an ESX server be a better idea?

Skip ahead two years when I joined Hyper9. I mentioned to some of the other employees that I created a mini-simulator while working on my VMM project. They said it sure would be nice to have a full VMware simulator.

Rewind your clock to last fall. David Marshall and Dave McCrory (CTO of Hyper9) mentioned that they had been thinking it would be cool to create a VMware simulator, and wouldn’t you know it, Dave McCrory, after some poking around, discovered a very special JAR file that turned out to be the equivalent of our very own flux capacitor.

It is March 2010 and I am pleased as punch to announce the immediate availability of the open source (BSD) project from Hyper9, SimDK, a VMware vSphere4 simulator which provides vSphere4 API-compatibility for official vSphere4 clients and other applications built using the vSphere4 SDK. SimDK represents months of hard work and is nothing less than an API-compatible recreation of the vSphere SDK.

.

Overview

The following video presents a brief overview of SimDK.

Demonstration

And this video is a demonstration of connecting to SimDK with the vSphere4 PowerCLI.

Details

In a standard vSphere deployment, the vSphere4 clients, such as the vSphere PowerCLI (PowerShell), the vSphere Client, and other toolkits access vSphere4 through the vSphere4 SDK.

A Traditional vSphere4 Deployment
A Traditional vSphere4 Deployment

The SDK is responsible for handling requests for creating virtual machines (VMs) and issuing vMotion commands. And of course the SDK is also in charge of providing the clients with responses to their requests.

Simulation

SimDK is able to simulate a vSphere4 environment by replacing the vSphere API/SDK web service with the SimDK web service.

Simulated vSphere4
Simulated vSphere4

The SimDK web service handles requests from vSphere4 clients and instead of communicating with a vCenter database or an ESX server, the requests are handled by the SimDK simulator. The data is persisted in SimDK’s own database tables and the responses are serialized and sent back to the clients.

Emulation

SimDK is also able to proxy other hypervisors by emulating the vSphere4 API to the vSphere4 clients.

Emulated vSphere4
Emulated vSphere4

For example, when a vSphere client connects to the SimDK web service, the web service could be configured to proxy communications to a Citrix XenServer. In this way SimDK can emulate vSphere4 for a Citrix Xen environment.

Conclusion

I think SimDK is one of the most exciting pieces of software released in the realm of virtualization in a long time. If you’re interested in learning more about SimDK or want to become involved with the project, please visit the SimDK homepage (a work in progress). In the meantime, if you have any questions, feel free to e-mail me at sakutz at gmail. Thanks!

Advertisements

15 thoughts on “SimDK

  1. Nice! very slick.

    If anyone is running into a “ClientTransportException: … code 301: Moved Permanently” when running viexport.

    Just use the -l flag to use SSL. I missed it the first time around and took a few minutes to RTFM

  2. It seems very useful. I haven’t been able to work with it yet because I don’t know how to create the context file for deploying the war in jetty. I’ve tried changing the sample text.xml but it doesn’t work.
    I wanted to suggest to include a sample database. I guest that the database created by db.sh is empty. I don’t own a vSphere Lab so I don’t have the information to populate the database.
    Thanlks for your contribution.

  3. Mike,

    Thank you so much for your comment! I spent at least two hours trying to figure out why it was sending a 301 response back to me. It’s amazing how a simple comment like that can help someone out so vastly!

    Thanks again,
    Andy

  4. Andrew, I am trying to install the simDK, i am running into problems when viexport is persisting to the mysql DB.

    Following is the exception any clues on fixing this?

    Thanks
    SAda

    ata too long for column ‘Cc4b65a10d9e4273b69ea75993d2006fd’ at row 1
    77672 [main] ERROR org.hibernate.event.def.AbstractFlushingEventListener – Could
    not synchronize database state with session
    org.hibernate.exception.DataException: Could not execute JDBC batch update
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.j
    ava:100)
    ….
    Caused by: java.sql.BatchUpdateException: Data truncation: Data too long for col
    umn ‘Cc4b65a10d9e4273b69ea75993d2006fd’ at row 1
    at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStateme
    nt.java:2007)
    at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:
    1443)

    Thanks
    Vishal

      1. SimDK is not and never was supported. It was/is a fun side project that was “can I do it” type of thing. I just don’t have the bandwidth to work on it when no one really wanted it outside of hobbyists like myself.

  5. Hi Andy or anyone interested in simdk,

    I cannot build simdk from the code checked into Sourceforge’s svn repository. Here is the error :
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project simdk-stubs: Compilation failure
    [ERROR] C:\sources\simdk\src\trunk\stubs\src\main\java\com\hyper9\simdk\stubs\JAXBContextEx.java:[55,34] cannot find symbol
    [ERROR] symbol : variable AllJAXBClasses
    [ERROR] location: class com.hyper9.simdk.stubs.JAXBContextEx
    [ERROR] -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project simdk-stubs: Compilation failure
    C:\sources\simdk\src\trunk\stubs\src\main\java\com\hyper9\simdk\stubs\JAXBContextEx.java:[55,34] cannot find symbol
    symbol : variable AllJAXBClasses
    location: class com.hyper9.simdk.stubs.JAXBContextEx

    Is AllJAXBClasses variable removed from the third-party (com.sun.xml.ws.developer.* ?) jar?
    Any help is appreciated.

    Abhay

  6. following exception occurred while running simdk-ws-0.0.1-SNAPSHOT web service

    Oct 21, 2011 12:20:51 AM org.apache.catalina.core.ApplicationContext log
    SEVERE: StandardWrapper.Throwable
    java.lang.NullPointerException
    at com.hyper9.simdk.ws.InitApplicationServlet.initJaas(InitApplicationServlet.java:151)
    at com.hyper9.simdk.ws.InitApplicationServlet.init(InitApplicationServlet.java:77)
    at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1190)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1103)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1010)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4957)
    at org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5284)
    at org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5279)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)

    Oct 21, 2011 12:20:51 AM org.apache.catalina.core.StandardContext loadOnStartup
    SEVERE: Servlet /simdk-ws-0.0.1-SNAPSHOT threw load() exception
    java.lang.NullPointerException
    at com.hyper9.simdk.ws.InitApplicationServlet.initJaas(InitApplicationServlet.java:151)
    at com.hyper9.simdk.ws.InitApplicationServlet.init(InitApplicationServlet.java:77)
    at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1190)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1103)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1010)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4957)
    at org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5284)
    at org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5279)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s