Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am beginning with sharepoint Development, I was looking for Suggestions and quite a bunch of tips for Developing for Sharepoint on VM's or in Physical Machine.

I have set up Windows Server VM using Hyper-V and installed Sharepoint Environment there.

I would like to get suggestions from the Pro's on this :

  • what is the lacking's of developing sharepoint environment in VM ?
  • what is the benefit of Developing in VM?
  • What is the benefit of developing in physical machine?
  • what are the lacking's or worst scenario's of developing in Physical Machine ..?
share|improve this question
    
You could also consider CloudShare, it's quite nice for development. (Disclamer: third party, not free) –  eirikb Nov 16 '12 at 9:08
    
i want something free , thanks for the suggestion though –  MSU Nov 16 '12 at 9:49

5 Answers 5

up vote 0 down vote accepted

Since I feel this is important I am going to write this little guide here, there are a lot of ways of boosting performance on hyper v.

  1. Disable ipv6 on host and the vm
  2. increase minimum memory in SQL server to as much as you can afford
  3. try and host the databases and sharepoint on a very fast drive and split up your installations. It's usually best if when you install windows on the VM that you have 2 VHDs connected on separate real drives, and use robocopy during installation to copy your program files folders to the other drive and the users folder. Remember all your VHDs must be fixed size, try and have fixed RAM too, this will prevent slowdowns.
  4. If you have RAM to spare create a ramdisk on the host machine, this is where you can host your databases. If not go for the fastest disks you can, making sure when you add the disks you add them as iscsi
  5. Add as much RAM and Cores to the hyper-v box that you can
  6. Turn off DEP except for required processes
  7. Turn off indexing on the harddisk except for your program files, windows and users folders.
  8. Turn off all features in sharepoint you don't need
  9. If your hardware is to slow, then upgrade it, 4 128GB ssds in raid0 will give you unparallelled performance and ram is cheap up to 16GB
  10. Disable all unneeded hardware
  11. Again page file, while trying to throw as much RAM as possible at the computer as possible also optimise the page file and try and put on separate disk
  12. Once everything is installed run a defrag and save the images! important!

If I work any other little things out I will let you know

share|improve this answer
    
thanks, i will try to do but do i really need a SSD except SSD i have everything above and i have 8 GB RAM which i think sufficient for me now –  MSU Nov 16 '12 at 10:17

I'm not that kind of pro, but I also used VM for development, I just had a VM on my machine with 8gb of ram, but i noticed that it was still slow so that is why I made a bootable VM to boot from and use all the ram in my computer, and it is going faster.

But regarding the advantages and disadvantages there are not that many, only what I've noticed that on VM is a bit slower BUT you can easily make a snapshot of your VM machine and easily restore to a previous version, that way you will never be able to ruine your machine totaly and have to reinstall everything.

With using Hyper-V you can create more VM's and simulate the real world productino scenario for example, where you have a DB installed on the dedicated server and maybe an application server and a web front end.

That are my few coins :)

share|improve this answer
    
thanks for the reply,yes, VM's are bit slow but for using bootable VM do you have to restart your PC and boot to it or it's something in VM setting's ? –  MSU Nov 16 '12 at 8:20
    
You'll have to boot to VHD, that's similar to booting to another partition. You'll be able to reach your host disk for content but otherwise, you'll be living on your own separate world. Just see it as a dual boot system (Windows8 - Windows 2008R2 or 2012) –  Francois Verbeeck Nov 16 '12 at 10:23

a) SharePoint needs a LOT of resources - VMs will never be as fast as a native OS, like Win7 SP Development environment b) You don't pollute your system, which you maybe use for other tasks, maybe even for personal use with development stuff (DB, Server...) c) Speed - see a) d) You misconfigure something and therefore break it

My advise: Take a look at Scott Hanselmans Blog post about booting from VHD. Basically you install your OSes (Win7 without SharePoint, Win7 with SharePoint, Vanilla Server with SharePoint for testing features...) on VHD, which you can switch by storing the VHDs on a USB3 Hard drive. Oh and get an SSD, you won't regret it.

Note: Booting from VHD is only available on Win Ultimate and Enterprise Editions.

share|improve this answer
    
but i can install the environment on VM and do the development work on local machine and deploy and test on VM right? –  MSU Nov 16 '12 at 8:25

what is the lacking's of developing sharepoint environment in VM ?

You'll be mostly isolated from your host (eg : no mail notification - which is extremely good for productivity - ) whenever you're on the VM. VM requires resources on your host & depending on your CPU architecture, might be heavy. It also requires a clean and fresh host environment to avoid losing precious resources that would be much better allocated to the VM.

what is the benefit of Developing in VM?

Simulating real world environment through multiple VMs. You can't beat this. A dedicated DC server, SQL Server, one or more app server(s), one or more web frond end(s), some client... As soon as you have resources, sky is the limit (and even with 8gb of ram you can have a nice DC / SQL / APP / WFE farm topology if you're careful when allocating resources).

You also have the advantage of using snaphshot & baseline allowing to try new solutions without the fear of having to rebuild everything from scratch.

VM are also portable, you can start on one machine and easily continue on another one. Ideal for presentation with customers since they are somehow "standalone".

What is the benefit of developing in physical machine?

You'll have the full power of your host (all cpu, ram, etc). Will require that you have Windows Server 2008 / 2012 as your host (don't be a newbie, do not develop on something like Windows 7 unless you plan to do mostly client side development / customization and large scale business applications). As suggested, you can boot from VHD to keep your current system running and have a separate environment (similar to booting to another partition we were doing previously).

what are the lacking's or worst scenario's of developing in Physical Machine ..?

As said earlier in my reply, having a single environment will prevent you from having a real-world environment. Unless you have a dedicated SQL Server box that you'll connect, you'll be stuck with a single SP Server farm doing both APP & WFE roles. There are stuff to be carefull in SharePoint depending on the target topology and having an environment matching as much as possible the customer one is extremely handy.

In some (not so ?) rare case, if you have an SSD and you active the Domain Controller role your box, it will disable the write caching which will give you awful performance (got it on both a Thinkpad T410S and Toshiba X505) forcing you to either put your AD Database / Config on a separate drive.

In the end, it's all about how deep you want to deploy & develop SharePoint solutions. The virtual infrastructure obtained by a virtualized environment is hard to reproduce in non virtual ones.

share|improve this answer
    
Like reading your in-depth replies :) –  Falak Mahmood Nov 16 '12 at 9:52
    
And i have 8 GB Ram in my Laptop with Core i-3 Processor, so i am still thinking running VM on hyper-V on top of Windows-8 Pro is a Good option for me, what do you think? –  MSU Nov 16 '12 at 10:15
1  
Falak, thanks ! highly appreciated. ^^ @MSU : sure, the 2nd gen I3 are nearly as powerful as 1st gen I5 so you'll be able to do it and with 8gb, you got a nice and warm virtual environment to start. But having a VHD on an SSD and booting from it will ensure that your I3 processor will not have to deal with Windows-8. Anyway, short answer, you're on the good track with the Hyper-V instance. Allocate as much as possible to the VM (6144mb) and disable all crappy background process in your host (disk indexing, built-in malware protection, any additional antivirus, ...) & enjoy the ride:) –  Francois Verbeeck Nov 16 '12 at 10:22
    
and btw, are you targeting development for SharePoint 2010 or for SharePoint 2013 ? The second one requires a lot of resources and having 8gb just for it is nearly mandatory to avoid time-out issues. –  Francois Verbeeck Nov 16 '12 at 10:25
    
I have setup to VM's on Number 1 i have Sql 2008 R2, Sharepoint 2010 environment on Windows Server 2008 r2 and on the second one i have SQL server 2012, Sharepoint 2013 environment on top of Windows Server 2012 Data Center Edition,just started to get my hands dirty on Sharepoint :) –  MSU Nov 16 '12 at 10:28

•what is the lacking's of developing sharepoint environment in VM ?

nothing much appart from sharing your pc resources like ram :). Its a bit of a pain to setup but once setup you wont look back!

•what is the benefit of Developing in VM?

You can break sharepoint and server and it wouldnt matter as it doesnt effect anyone appart form you. You can create a backup of your vhd and/or create copies to run multiple versions at the same time.

•What is the benefit of developing in physical machine?

same benifit as vm appart from making mistakes what do happen and would be pain to redo/setup everthing if somthing bad does go wrong!

•what are the lacking's or worst scenario's of developing in Physical Machine ..?

developing in physical machine would mean that you dont have room for mistakes. If somthing very bad goes wrong you would either need to solve the issue (takes time) or reinstall (takes time) with vm you have copies or backup.

So with vm its highly recommended and I use it for development every day! I have two copies that i can run if i want to but its mainly for emergancy perpouses like if one goes dead then i can run the other. I also have a backup of my vhd just incase. I always save the machine state when closing the vm for fast boot with everything that i was working on already up! booting takes time otherwise! having vm and your local machine has better advantages over it being on physical drive.

EDIT

Making vm faster

To make your vm faster have a faster cpu and alot of ram, I would expect 6gm as good but 8gb is preffered. You can have 4gb but will be slow when running loads of apps.

when setting up vm make sure that you give nomore than half your ram otherwise it will slow your main os so slow that it might even crash due to bottle neck.

I give mine just shy of half. Try not to load many apps as i do as it will slow your vm and pc! i currently have 5 vs2008 running with 3 ie open, 1 stsadm, 1 iis and 3 folders open and thats just on my vm! try not to clutter your desktop on both os with shortcuts and files as it will add to the explorer.exe as it has to make loads of icons that can slow you down slightly everytime you goto desktop!

make sure there is plenty of room in your hdd (hard disk drive) for code, vs2008 - 2010, sharepoint ect... also when the hdd on your main os is nearing to full it can also hinder on speeds!

NEVER shut down your vm!!! by that i mean never power off the state, always save the machine state. This way when you open the saved state it will load within seconds and it will load exactly the same state you left it in, so if you had vs2008 with some ie open it will open it with them open! if you shutdown the state then it will take ages to load backup again!

for more tips check this out :)

http://www.hanselman.com/blog/VMPerformanceChecklistBeforeYouComplainThatYourVirtualMachineIsSlow.aspx

btw i have core i3 and 6gb ram with nvid geforce 310m on win 7 64bit os. its a laptop not desktop as i can also work from home :)

hope it helps :)

share|improve this answer
    
thanks and your reply was a lot simple and made the scenario more clear, now all i need to know the tricks to make my VM's run faster on top of windows –  MSU Nov 16 '12 at 10:21
    
iv added some tips for you :) –  ali Sharepoint Nov 16 '12 at 10:38
    
thanks a lot again –  MSU Nov 16 '12 at 10:52
    
no probs happy to help :) –  ali Sharepoint Nov 16 '12 at 10:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.