Are you using virtual machine as your primary development environment? - asp.net

Recently I have purchased a notebook that came with Windows Home Basic (that don't have with ASP.Net/IIS. I thought in upgrade the Windows version to one with ASP.Net/IIS, but I thought in another possibility:
I have an Hard Disk Case with a 360Gb HD. I thought in create a virtual machine with Windows Ultimate (installing too ASP.Net, IIS and Visual Studio 2008) in this HD Case, then I can access my "development environment" in any computer that I will work on (my desktop machine and my notebook).
But I was worried about the performance. I don't have experience working in virtual machines (I use it just to quick compatibility tests).
Are you using virtual machine as your primary development environment? What your finds?
Edit
Thanks for your answers! It really did help me!
I would like to know too about portability i.e., will the virtual machine that I created in my laptop work in the desktop? Will I need to re-activate Windows?

I use VMWare and Microsoft VPC-based VMs quite a lot, hosted in a Quad 6600-based XP Pro box.
My use of VMs was initially to test in different environments, and for debugging I've had to install SQL Server and VS2008 in one or two of them.
For those purposes, VMs are very convenient.
But based on that experience, I wouldn't make a VM my primary dev environment, simply for performance reasons. VM performance is surprisingly good, but the difference (for pretty much everything), although not huge, is enough to notice.
When I'm compiling dozens of times a day, running big queries, etc, etc, I don't want my dev machine to be any slower than it absolutely has to be.

Working with a virtual machine is fine as long as you have enough RAM for both operating systems.
You should also be aware that virtual machines have some limitations e.g. when it comes to supporting graphic cards, so you'll want to make sure that whatever you are developing does not depend on a feature that is not available on your virtual machine.

I have been using VMWare as my primary development environment for a couple of years now.
Some Environments I typically switch between
Windows Forms / WPF Development (XP, .Net 3.5)
Ruby Development - did one website in ruby (XP, Instant Rails)
ASP.net 3.5 - for playing with new stuff (XP, .net 3.5, IIS, SQL Server)
ASP.net 2.0 - sometime places are still stuck on 2.0 (XP, .net 2.0, IIS, SQL Server 2005)
Some things I have learned
Use XP not Vista. When you are running multiple vms, the extra fluff is really noticeable
Give each VM around 1gb (sometimes as little as 512MB). You want to give them the least possible that prevents swapping for what you regularly do.
Keep a snapshot of the base install for your stack, before doing any development.
Quad Core + 8gb ram is cheap now. I typically have several vms running while developing. If you have less ram or cores, keep the number of running vms down.
Turn off software mouse cursors and run in full screen mode (most people don't realize it's a vm until I show them).
Benifits
I can be up in running in any of my major stack in 5 minutes on any pc I own.
I can move my entire development environment onto a laptop or another pc in a pinch.
I can keep separate dev stacks around easily that can otherwise step on eachothers toes.
Hard Drives:
Your first bottleneck is going to be RAM, but RAM is cheap now so there is no reason not to have 8-16gb. Your next major bottleneck is hard drives in a major way. I now try to have one hard disk per active virtual machine (used in a desktop workload, not server stuff). Raid setups can help tremendously and SSD's completely solve the problem if you can afford it.

I have been using VMware since 2002. My first use was to create a development environment in a guest VM, then replicate it for my teammates. When it came time for a hardware upgrade, I switched to my new desktop in about an hour (install VMware, copy VM).
I use VMware constantly, on desktops, on notebooks, and on servers. I use them for development, testing, and production. I have tried playing games inside a VM, but most games just don't cut it (and VMware says so, but I tried anyway). However, the newest VMware Workstation versions just might play a few games okay.
I particularly like VMware on my laptop, and I really like to use it for Ubuntu Linux. I find it best so far to use Windows (2000 Pro SP4 or XP) for the host OS because of the superior device drivers. However, I prefer to actually work on Ubuntu for my development, but that works great in a VM. I have installed Ubuntu directly on various hardware, but so far have not been satisfied enough to leave it for more than a few months before reverting to Windows again.
However, my laptop does run Ubuntu nicely, and I only reverted back to Windows XP because I want to load an eSATA card that will give me high-performance access to an external hard drive to...run VMs!!! I have not yet done that install yet due to distractions at work.
Speaking of work...I have "acquired" three old orphaned desktops that I am turning into VM hosts. I am about to attempt loading VMware ESXi, although I just finished loading two with Windows 2000 Pro SP4 and VMware Server 1.0.8. I manage a development team, and I am primarily targeting these VMs for development environments since our company cripples our primary desktops/laptops too much for real work.
Drink the Koolaid!!! VMware is awesome, and there are lots of other good VM options as well!
Best wishes.
EDIT: more goodies...
In particular, check out VMware ESXi, VMware Server, and Ubuntu JeOS. Yummy stuff!!!

No, but use it as test machine when I am testing web pages in IE.

Yes, I use VMWare workstation 6.5 and ESX 3.0 for my servers. Works like a charm. No noticeable performance penalties.

I have used VM's for development in the past, and I use them a lot for testing of various sorts. Using a VM for development works quite well, the only thing I would caution you on is that some external hard drives are quite slow, which may give you a problem, but fast drives work well.

I'm using Ubuntu as my linux development environment on top of Vista 64.
The machine has a 10k drive, lots of fast memory, and a dual core CPU, so it runs very well. I ended up with this hodge-podge because, at the time, I built a machine ubuntu wouldn't run on, and going VM was the easiest way to deal with that. I've found it's quite convenient, though, so even though ubuntu would likely be fine with the machine now, I'm staying with the VM.
Makes it trivial to fully back up my dev environment and take it offsite or distribute it as well (ie, GPL compliance is a cinch - no need to work with people trying to get a dev environment set up for them and deal with the quirks of versions of software, etc)
Needed for embedded ARM linux development.
-Adam

I use VMWare Fusion on a Mac to run Windows Server 2003, Visual Studio and all my IIS requirements.
I have no problems, but my Macbook pro does have 4GB of RAM with 2GB allocated to WMVare when it's running.

My primary Windows development environment is a native Vista x64. For the graphics card reasons mentioned above and (possibly unfounded) concerns about the VM environment and debugging, I decided I still wanted a native environment for my .Net and Windows Win32/64 development. I'm working a lot more in GUI development at present.
However, one very important kind of development I've used VM's for in the past is Python-based programs, whether pure Python with wxWindows or embedded Python called from C++. Using a VM allowed me to control the Python environment and work against different installs that were guaranteed to match the deployment environment. I'd suggest this for anyone using a dynamic language where you tend to install lots of external packages and it's hard to cleanly revert to earlier versions.
Another thing to consider is using a VM as your target with a remote debugging nub. Many REALbasic developers on Macintosh do this for their Windows testing (REALbasic has fabulous cross-platform debugging) but I've also used it in the past for Visual Studio.

Snapshots are handy. You can use multiple VM's for testing on different OS's.
Our engineers run a Windows VM on VMWare esx. We probably have 12 Windows VM's running on a single Dell Poweredge(Yes, it's beefy, but still). They almost seem snappier over the network then my local install of XP on a Core2 Duo!
And on a local machine, as long as you have the RAM for it, it can still perform very well. A stripped down VM of XP(something like TinyXP) performs as well as my 6 month old native install!

Regarding portability; assuming the same architecture (and operating system), then the virtual machine should run fine on both physical computers. Provided the hardware configuration of the VM doesn't change too much, you shouldn't need to re-activate Windows within the VM.

I run Ubuntu as my primary OS, and then use a Windows 2003 virtual machine (using VirtualBox) to develop in Windows. Mainly use it for Visual Studio 2008 web development. Been doing so at home for 3 years, but now in the process of trying it out at work.
Works fine, even with ReSharper and a solution of around 50 projects. It's not quite as fast as if I run it all via Windows directly, but having one nicely setup virtual machine means I can share it with other developers, plus easily switch between vms (we're looking at trying out Windows Server 2008).
Also means I can use Windows but then let Linux take care of things like IM, Firefox, Music (of course), Indexing (tracker), FTP, etc... Plus I have the terminal at my disposal (grep, ssh you name it).
We tried this with ghost images of Windows but found that as people have different hardware the image wouldn't always work.

I run Windows 7 64bit on my lappy with 3 GB Ram (Yes it's low).
I find running my dev environment on VM's a pain in the butt really.
When I have 5 IDE's open, SQL Server 2008, NotePad++, OxyGenXML editor, and Chrome/IE/FireFox all open in my VM, then my main machine has Outlook, OneNote, and a few other programs running it turns to crap.
Using multiple monitors isn't easy with VM's either, especially if you take your laptop away lots ofo times, then hook it back up. the resync is time consuming.
My other co-workers have the same issues even with 5-6GB ram.
If I added up all the time wasted waiting for my the extra processing the VM Causes, it would be more than what it would be if I had to re-do my computer from scratch - which takes under 8 hours.

This depends on situation really. Most horrible environments I've encountered in corporate world is Windows laptop + Linux virtual environment (where the laptop itself isn't top of the breed, I dislike having laptop as a development machine in the first place). I'm mostly a java developer, and like to write much unit tests, and usually with this combination (I'm really not wanting to use one, but well, I'm just lazy to complain all that much) running unit tests takes hell of a lot time.
Of course this depends on types of test, but in this case my guess is that disk I/O is just slowing things down. I just like to compile and test much, so that's the main reason I'm in favor of native environments: speed. Even a little notch on that sometimes feels too much. Sorry for not answering on a bit broader scope and very subjectively.

I use Parallels on a Mac - have no issues.
At work we use VMs for most of our test environments - they work very well

I used to use a virtual machine as just a sandbox to keep unruly applications from doing unruly things. (Sandboxie is an awesome program for this) but I always ended up forgetting to keep them contained and would just reinstall windows every now and then, much easier than constant maintenance really.
As for a virtual machine you're screwed on the hardware you have available as your bios and hardware are all emuated. Makes for writing something low level practically impossible in certain circumstances. However when using a hosted server on a virtual machine through a remote desktop connection... Absolutely wonderful, so easy! I can be in and out in a couple clicks, so I guess that's the number one virtualization I use.

VMware to debug device and filter drivers. VirtualBox is nice and fast for occasional Ubuntu, and an XP holding IE6, FF2, Chrome, Opera, & Safari for testing and installs of apps i don't trust.

I have a Windows 2008 Hyper-V machine that runs a couple of my development environments. It's not slow at all (that I can notice). Some of my environments are not virtualized though. Usually if the setup requires something where rollback is difficult, then I'll use a virtual machine, if not, I'll just use a desktop.
Keep in mind licensing costs. If you're going to virtualize a copy of windows server, you're going to need a license for windows server as well. It's probably cheaper for you to upgrade your Vista Home Basic to a version that runs IIS (although my suggestion would be to run Win 7 beta since it's free and then upgrade to the final version of win7 when it's ready)

Now that it's been almost a year, are you guys still using virtual machines as your development environments? I used to, but have stopped since performance is getting bad. Just wondering.

Related

XEN and Windows 7 + Windows XP + Linux

Do you suggest to install Windows 7 + Windows XP + Linux as multi-boot or via XEN? What are the advantages and disadvantages of each choice?
If you want to use the Windows installations for gaming, the easiest path is to install all as multi-boot.
Technically you can also use XEN and run Windows on XEN, but then in order to use the full potential of the graphics card you would need to directly forward it to the Windows VM, and then would not be able to use it for the other OS/VMs at that time.
Also, the current path to give a VM direct access to a GPU is rather difficult and heavily hardware dependant. At the moment, only Intel Motherboards will give you chances of success for such a setup, even well established vendors such as ASUS often do not support the VT-d features completely yet[1].
So in general:
For Gaming: Don't use XEN (yet!)
For anything else it's definately worth a shot, you get a lot of features, such as isolation and snapshotting etc. Though you might want to consider using KVM which is becoming more and more user-friendly.
[1] http://wiki.xen.org/xenwiki/VTdHowTo

How to distribute ASP.NET app on lightweight hardware (such as NAS)?

I want to ship a piece of hardware to clients that they plug in to their network via Ethernet or USB. This device contains an ASP.NET web application that they access via a web browser on any PC in their network.
This needs to be a small device that costs less than $500, meaning it can't be a full server with a Win2008 server license. This would be repeated hundreds or thousands of times - once for each new customer.
Are there external hard drives or NAS devices that can run as an IIS/ASP.NET web server?
Thanks,
Roger
If you stick with a PC setup, you might be able to use a desktop OS and IIS Express. It should support everything you want, you might even be able to get this on a cheap netbook.
I'm sure you could build a small PC based an an embedded motherboard, or even a mini-itx board. But, this is a programming Q&A site and not really the place to ask about building servers.
If you're looking into keeping it cheap I would highly recommend looking into Mono which is free and runs ASP.Net very well. If you have any Windows-specific things you'd need to possibly change those but hopefully you wouldn't have those on a website.
You should look into converting your app to Mono.Net running on a virtualized environment. The OS and the runtime environment would be open source and would allow you to freely distribute it.
Mono.Net
Virutal Box - VM Enviornment
Ubuntu Linux OS
Buy a netbook with windows 7 home premium on it as that bundles IIS7. If you need any more "capacity", then you should look at bigger hardware anyway.

Using Visual Studio, SQL Server, etc Windows 7 on MacBook Pro 15" (2010 model)

I realise that there are many existing questions regarding this issue, but I haven't found any that discuss specifically shortcut keys, usability etc.
Can people please give me good/bad feedback on using the above development tools on the 15" MBP (2010), with regards to the following:
Shortcut keys in VS - how do they perform running in a VM, does os x interfere etc?
(one example being F10 and F11 for stepping through code)
Lack of dedicated delete and # key - does this create a frustrating dev environment?
" and # switched on keyboard - too frustrating when doing storedprocs etc?
any other things I've missed relating to ussability of the above
I don't particularly want to use bootcamp, as I might as well just not have a Mac then.
This is all to decide whether to have a MBP as my main machine for personal + professional use.
I have a 2009 MacBook and I have Virtual Box setup on it with Windows 7, Visual Studio 2008 and SQL 2008 with Management Studio. I use this not for my main development machine, but rather if I need to quickly look at something and already have the MacBook out and on.
For proper development I have a separate Windows 7 machine which is obviously much more powerful than running a virtual machine on top of OS X. Using the MacBook is OK, but you couldn't use it day in day out for serious development.
Over the years I've tried Parallels, VMWare Fusion and Virtual Box and overall performance and functionality doesn't vary hugely in the real world. The main difference here is that Virtual Box is free.
As to the keyboard differences, under System Preferences you can opt to have the function keys act as regular F keys which solves that issue, and then using something like DoubleCommand you can remap the other keys that are giving you trouble.
See this SuperUser question about it:
MacBook Pro Keyboard - How to Swap / Remap Keys?
I used a 2008 MBP 17" with Visual Studio...
You kinda have to either plug in a pc keyboard or live with the macbook keypad really...
I was in the same position as yourself, I didn't want to install Bootcamp unless I really had to.
Turns out some software called PARALLELS allowed me to install windows vista in a VM environment whilst logged into OSX, it literally feels like Windows is running in its own window, although you can have full screen of course.
Performance turned out to be great, parallels will setup the networking too so you can still access the Internet from your VM environment.
http://www.parallels.com/uk/products/desktop/
Edit: I should make it clear that if you are serious about .NET development then it would be much much better to actually get a PC with Windows running natively - with things like parallels you cant obviously devote all resources to the virtual OS.
As .NET is a strong part of my career I no longer use the mac, I have PC with Windows 7 installed now. It really does depend on how you define 'professional' use of visual studio... it can be done on the mac however!
I have a late 2009 13" MBP with only 2GB of memory running VS2008/SQL Server 2008. I used Bootcamp as I don't see what the big deal is - the install was a snap and Apple has released 2 updates to address compatibility issues.
The speed is good, not great, and I've been putting off going to 4GB of memory, but most definitely workable.
The function keys work for debugging. The most annoying thing to get used to is the fn key at the bottom left, as I'm really used to having the control key there. There are keyboard equivalents to delete, pg up, pg dwn, etc...
Also annoying is the keyboard backlite. The only way I found to disable it is to kill the Bootcamp process, sleep and wake.
Not sure what you mean by # and " switched on the keyboard, as I've been using shift+2 and the " two keys right of l.
I've built some fairly large web apps using VS and I'm happy with the MacBook as I use it to build iPhone apps as well, so I need a Mac. It's also nice to have 2 OSes. You can't get a Windows machine to run both Windows and OS X as easily as you can get a Mac to run OS X and Windows.
Also, not keyboard related, but design related. Apple, IMHO, put aesthetics over usability in making the edges of the body so sharp. When you lean your wrists on the keyboard, the edges dig in and after leaning on them after awhile, you have pretty deep dent marks. I've seen videos where people actually file down the edges (I think I saw that the MacBook was still powered on in one video. Ouch.)

Anyone realize success using Apple Mac OS 10.6 and Parallels 5 for a Visual Studio Dev machine?

Greetings my wonderful StackOverflow family :)
I grew up using Windows and switched to OSX as a Computer Science major in College. I've recently started my first real software developer job, and have a ThinkPad and Windows XP for developing ASP.NET / MS SQL applications (Visual Studio 2008).
Question:
Basically, I am wondering if any developers out there have had real success creating ASP.NET applications on a Mac using a VM? I've been fighting with Parallels 5 all week and finally have Windows 7 and VS 2008 running but my hot-keys are all screwed up. Is it worth the work to keep beating this thing into submission? Should I give up? Should I give Mono a try instead?
Thanks Folks, I can't wait to see what you all think!
I've been using Parallels versions 2/3/4/5 to do exactly this for some years now. #Brian - aside from problems arising from limited memory (I'd say 4GB minimum for this kind of thing) I've yet to encounter any issues. I develop .Net enterprise web apps using Visual Studio on a MacPro and also my 13" MBP) and can't imagine working on anything else in any other way :-)
Re: VMs vs Bootcam - using Bootcamp is an option if you absolutely have to squeeze the last 1-5% performance out of your box, but otherwise the benefit is minimal. Parallels will work with a bootcamp partition but has some drawbacks. For me the biggest pain was that Parallels VMs from a bootcamp part can't be suspended and resumed quickly and easily as ones running off an image file. Also, with image files you can keep a working clone of your VM ready to step in if your windows vm goes down. Its harder to keep a clone of a partition.
You can also give VM clones to colleagues so you're all working on identical environments. If your bootcamp partition goes down [and mine did many times during the Windows 7 beta days :-(] the road back to where you were is long and fraught. A lot of disk checking goes on and the bootloader is involved - can be nasty.
Just try it - you won't regret it. Its worth spending a bit of time setting up your keyboard. Personally I find this works very well with Windows 7: http://parkernet.com/applepro/ (its a mac->windows keyboard layout for Windows).
Hth.
I run Visual Studio on my MacBook Pro using VMWare and a Win 7 image. I havent had any issues. Havent tried ASP.NET development, but I assume its going to be fine since the IIS server or Cassini would be hosted on the VM.
The only issue I had was due to memory and maxing out my MacBook memory smoothed everything out.
You could try VMware Fusion or use Bootcamp instead.
I havent used Parallels for a while - and that has a reason.
[edit]
Parallels does support running a Windows on a Bootcamp Partition - as does VMWare Fusion.
I don't like the idea of doing development work on a VM.
Even if you manage to get it to work, little issues will crop up occasionally in the future.
Every time you encounter a difficult to resolve crash bug in your program, there will always be a nagging feeling that it's a VM-related bug.
You'll never get 100% performance in a VM.
You shouldn't need access to your Mac OS while doing work, and switching between the OSs is not that time consuming if you aren't constantly jumping back and forth between work and entertainment.
Just use bootcamp.
Note: I think Parallels supports running a VM fueled by a bootcamp-enabled windows, in a pinch.

best way to get started in setting up Mono for ASP.NET on Mac

I have recently gained access to a Mac. I am wondering if anyone has any tips/advice for setting up Mono on a mac for development and execution of ASP.NET? Most resources point to Linux implementations which tend to differ a lot from the way Mac's do things. Any tips or advice would be helpful
To launch the development ASP.NET server, just open a terminal window and run the "xsp2" command from the Mono installation.
The only thing that is missing from the Mono distribution on the Mac compared to Linux is the Apache module, that one you will have to compile yourself if you want to deploy your application in production on OSX.
Since I first worked with mono osx, they've added Cocoa# and ObjC#, but the ASP.NET core was pretty solid (about 3 years ago). You can in fact write web applications according to the Onion book, and port 'em to IIS with little or no difficulty.
Honestly if you want to run ASP.NET you probably don't want to struggle with getting it to run via mono on MacOS. Intel-based Macintoshes can boot Windows, and Apple provides Windows drivers for their various devices as part of Boot Camp.
Alternately you can buy Parallels or VMWare Fusion for less than $100. I use VMWare Fusion. There is also a Mac version of VirtualBox from Sun which is free, though I have never used it.
For MacOS development (not .Net) you really should try Apple's XCode. It is free. It primarily focuses on Objective C though Python, Ruby, and other languages can be used to develop native Mac applications.
Edit 9/22: I'm sorry neither you nor Kev found this a useful answer. Let me try to expand a bit: the Macintosh has a long history of software being ported in from Windows, applying a theme to make the GUI elements look Mac-like but otherwise being content with a minimum cost port. Such software never behaves like a real Mac application: it doesn't respond to AppleEvents, it won't be scriptable, it handles only the cross-platform clipboard formats, etc.
You're free to do whatever you want, including running ASP.NET using mono. If its for your personal use, knock yourself out. However if you're considering it as a way to offer your web-enabled product in a Mac version, I urge you to reconsider. The Mac market has for the most part rejected such products. You'll get some sales, but nothing like you would get for an app which behaves like a native Mac application.
Now, let the down-voting continue.
You can also run ASP.NET via NGINX - easy to install using:
sudo brew install nginx
See installation tutorial: http://www.robertmulley.com/tutorial/nginx-install-and-setup-mac-os-x-mavericks/
See configuration steps for your app: http://www.mono-project.com/docs/web/fastcgi/nginx/
(Note: see my pull request as the fastcgi-mono-server4 should now be used - https://github.com/mono/website/pull/82/files)
Why use Mono on a Mac? Run Parallels, VMWare, or Boot Camp.

Resources