New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hyper-V support #1244
Comments
+1 on the hyper-v support. |
3 similar comments
+1 on the hyper-v support. |
+1 on the hyper-v support. |
+1 on the hyper-v support. |
+1 on a hyper-v provider! |
+1 |
Is this even feasible ? I mean does it have any clear benefits compared to VirtualBox ? Performance wise I reckon it should be more or less the same as most of us just use it to clone production environments that don't use any graphical env. and if you have your VHD on a SSD the IO bottleneck goes away; CPU wise even a 20-30% delta can go under the radar when you use an i5 or i7 cpu. |
Well, let's put it this way... A few members of my team were working off of a Hyper-V VM, but I decided to move us all over to a custom VeeWee-built VritualBox basebox, plus a Vagrant package with Puppet customizations for things we care to version bump across the team (Riak, ElasticSearch and Redis). This made it more manageable for me to make sure everyone is using the same version of everything, etc. We've had nothing but issues with VirtualBox -- frankly, I think it's a gigantic POS compared to Hyper-V or VMWare. One of my biggest gripes is that it's not setup to run as a system service, so if you happen to reboot and forget to We're also seeing a lot of weirdness with the VirtualBox gui tools -- with 4.2.10 and Vagrant 1.0.6, once Vagrant has touched the VM, the VirtualBox GUI tools crash on startup. Unless you're familiar with VBoxManage, it can be hard to know what is / isn't running. I've also had issues where Vagrant reports that the VM isn't running, but I can see the VM running in the GUI tools -- not sure if that's an issue with Vagrant or with VirtualBox. I end up having to manually shut the VM down, then reboot... for Vagrant to start seeing it again. As far as the performance goes, I think it's pretty well established that VirtualBox lags the others by quite a bit. If you Google around, you should be able to find benchmarks. Windows 8 now ships with Hyper-V in the box, and it's integrated quite nicely. No need to install buggy VirtualBox, or purchase a VMware license. To me, that reason alone is compelling. My 2c. |
The other reason this is compelling would be for server provisioning. Vagrant isn't just for setting up a development environment. |
@dakull I generally don't use the GUI either. However, some of the devs on the team don't know where to look for the I just want to give them a VM with services / ports that just works. One thing that would help a bit here is a global registry of |
This might help : http://www.virtualbox.org/manual/ch08.html#vboxmanage-list you can then have a script that checks for rogue VMs. Regarding the sanity of the VMs I think that depends on ones workflow : I like to keep things idempotent so when something breaks I can easily recreate the vagrant env. and just do a git clone of my app source. |
@dakull sure, you can use VBoxManage. But the point is that I think that should be part of Vagrants responsibility... especially so if you're using Vagrant to normalize the underlying VM tools in VirtualBox / VMWare. |
+1 and here is the list of posh ver 3.0 cmdlets for Hyper-V http://technet.microsoft.com/en-us/library/hh848559.aspx. |
Custom providers can now be made! http://docs.vagrantup.com/v2/plugins/providers.html I have no short term plans to officially support Hyper-V, but I'd love to in the future. |
So in other words... Basic class definition -> https://github.com/mitchellh/vagrant/blob/master/lib/vagrant/plugin/v2/provider.rb Doesn't look too difficult, but I don't have the cycles at the moment -- any takers? ;0 |
I'm swamped and haven't had time yet... |
+1 |
We will also take a look at contributing or doing this if there is time too. Powershell route suggested by am11 seems a possibility |
I would love to work on this, but I don't know where to start. Can someone with more experience break down what needs to get done? I want to get discourse running on my hyper-v cluster using their vagrant configuration: http://blog.discourse.org/2013/04/discourse-as-your-first-rails-app/ |
I guess the first step would be to detect if client's hardware supports Second Level Address Translation (SLAT); a pre-requisite of Hyper-V to run VM and an advanced virtualization technology refers to Intel's EPT (Extended Page Tables) or AMD's RVI (Rapid Virtualization Indexing). Here is a good read on it and a way to detect its support in OS using coreinfo.exe. After that, our corresponding base class may look something similar to:
Unless there is an explicit way to detect SLAT support via syscall, this approach will confirm that the installed Hyper-V feature is eligible to create VM. |
I've found another way of checking SLAT support, using PowerShell. The method suggested in the aforementioned blog is querying Our
So the dependency on coreinfo.exe is gone resulting in cleaner code. |
@am11 No need to shell out to run a WMI query... https://gist.github.com/factormystic/5452265
|
@factormystic, thanks for the simplicity. Next step in
from irb >
I tested on two machines running Windows 8 Pro. One with SLAT and Virtualization capability and one without (only Hyper-V management and remote control is visible to connect to remote VMs or VM-servers). I was hoping that that the aforementioned script would return 1 only when Hyper-V management has the ability to host VM locally. But unfortunately, it returns 1 on the both machines. So I moved on to Service test. In the machine where I had the ability to host VMs locally, there was a service Hyper-V Virtual Machine Management, which wasn't present in the other system. Here is the PS script to identify if service is installed:
from irb >
Do you know any better way to check if service exists from Win32OLE OR to detect the Hyper-V exists and it has the ability to host VMs locally? |
Anyone got any movement on this? |
+1 on the hyper-v support. |
I found this: https://github.com/anurse/vagrant-hyperv/ Any other works in progress out there? |
The project at https://github.com/anurse/vagrant-hyperv/ is just a skeleton - the project is created but nothing is implemented. +1 and still looking for Hyper-V support. |
I've started work on this over here, and will keep working on it as I can find time. If you want to support work on it, I've got a project up on BountySource to get an alpha version of this ready for an $1,100 goal. Seems we might be able to hit such a goal. |
Here at MS Open Tech we have been following this issue with interest. We'd love to hear more about the work done so far and the blocks being hit. If the problems being faced can be expanded upon I'll see if I can get a good answer for you. Alternatively, is this work available in a public repo anywhere? |
@rgardler this thread has some of the details although the title is misleading I have to admit: http://social.technet.microsoft.com/Forums/windowsserver/en-US/3f2528f3-3948-42e3-8d8a-bf9e95dce30e/hyperv-virtual-machine-management-service-not-start-with-domain-user-account?forum=winserverhyperv#a249845f-4aed-439a-aec0-2d9b88273b33 But the easiest way for you to repo the issue is to install VirtualBox and Vagrant on your desktop and take it for a spin and then to observe how files are presented to the guest OS from the host when provisioning the guest OS using something like Chef. VirtualBox is able to access a folder on the host machines from the guest OS through their integration services. AFAIK using HyperV this is only possible using 'constrained delegation' which depends on Kerberos. |
@rgardler, does it mean no more PUTTY and we will finally get SSH support natively in Windows too (as vagrant requires ssh)? Vagrant requires SSH and it is proven to be a most common protocol in server-client/host-guest environments. Denying this fact over a decade is not helping anyone. |
@jasonwilliams200OK Can't we just make a Cygwin requirement? Windows + Cygwin pretty much answers the tool chain requirement.. There are wrappers such as CopSSH to make it easier to manage. |
@saurus Thanks for the info. I've asked one of the team exploring the Vagrant options to look into the problem you are facing. Hopefully I'll be able to provide a constructive response soon. |
w00t! There are some folks I know that would like to see some Hyper-V love. Appreciate you taking point @rgardler :) |
@supernovae, now why would we do that? Unless we are killing birds with canons. Cygwin is like an instance of headless linux, with tons of utilities which windows already provides (especially in powershell). Vagrant just require ONE missing util; SSH. Remember, here the target platform is Windows 8+ (client), which support Hyper-V management and those systems usually come with edge version of PowerShell and WMI installed. |
@jasonwilliams200OK |
I agree that Cygwin is awesome, so is minGW. The whole point of vagrant is to install less dev related applications on host system and more on portable vagrant instances. You won't be deprived of Unix counterpart anyway when you are running Ubuntu via vagrant. SSH (a small utility vs huge Cygwin/MinGW packs) is the only thing missing in fresh windows 8x PC (of course with VirtualBox/VMware installed), which is preventing users native CLIs (cmd and powershell). Not to mention other benefits of SSH, SCP etc. Putty is the light-weight solution, but still not integrable with native shell prompt. Having native ssh support in Windows would be a great welcoming addition. |
I tend to use Bitvise SSH. It has native shell/user environment support and I javen't yet tried out the choco pkg for it but you can find it at On Saturday, January 25, 2014, Jason Williams
Rob http://devlicio.us/blogs/rob_reynolds |
I've got some time to spend on this and have significant experience on the Windows and Hyper-V side. Where are we targeting our efforts? |
Looks like there a new feature in later hyperv: "guest services" that allows out of band file sharing - http://blogs.technet.com/b/keithmayer/archive/2013/11/22/why-r2-guest-services-in-windows-server-2012-r2-hyper-v.aspx Not sure about support in linux - anyone have any idea here ? |
@ionelmc, thanks for the headsup. Here is the information on Linux support http://technet.microsoft.com/en-us/library/dn282278.aspx#bkmk_linux. Separately; will it make copy of each file on VMBus we want to share between host and guest? Or just add its reference in an xml file, so we don't have multiple copies? If its latter, then its sane. |
@am11 Unfortunately they don't appear to have anything on the linux feature grid about the "out of band files sharing" thing. Looks like it would require developing some integration service/filesystem kernel module for Linux - I wonder if @rgardler has any input on this ... |
MS Open Tech just released initial code for a Hyper-V provider for Vagrant. See blog at http://msopentech.com/blog/2014/02/25/vagrant-and-hyper-v-provides-managed-devops-work-environments/ or code at https://github.com/MSOpenTech/vagrant/ We would love to have feedback (and code where appropriate) from folks interested in Hyper-V support. |
@rgardler great news! |
Cool news... Repo is at https://github.com/MSOpenTech/vagrant/ |
Thanks @ntwb, I just updated my original comment as I had a cut and paste error on the code link |
Really nice news :D |
Sweet, testing now! |
Awesome - our Hyper-V support is now in the 1.5 release - you don't need to checkout our provider separately. |
This is awesome news. But how does it solve the sharing problem? With VirtualBox, we get a bi-directional folder share without even connecting to network. Can we do the same with Hyper-V's SMB? Is SMB share as swift as VirtualBox share? In other words, what is NOT supported with Hyper-V SMB share when compared to VirtualBox's sharing? As there are number of complains on shortcomings of Hyper-V, previously posted in this thread! Anyone? |
There does need to be a connection between the host and the guest, but that need not be connected to the outside world. I've not done exhaustive performance testing myself but the docs say "SMB is built-in to Windows machines and provides a higher performance alternative to some other mechanisms such as VirtualBox shared folders." http://docs.vagrantup.com/v2/synced-folders/smb.html |
@rgardler , thanks! BTW, Windows 8 also comes with Hyper-V per-installed. What is missing in 8's Hyper-V which renders 8.1, the minimum OS requirement? Some systems are not updated to 8.1 at our workplace (yet). The list of missing features would help convincing our IT folks to schedule update soon. |
@jasonwilliams200OK for Windows guests we needed Windows 8.1 for remote PowerShell execution. Linux guests should work fine on Windows 8, but we are not testing that (would good to hear from anyone trying it out) |
Does this for sure not work on windows server 2008 R2? Have been using Hyper-V with windows servers for quite a while, and really wanted to start using Hyper-V. Windows 8.1 is only version of windows that works, or will later windows server versions work? It's hanging at checking for hyper-v for me (Windows 2008 R2 Standard) (Trying to spin up instances using vagrant on a windows server--don't want to spin up windows server machines) |
I see an issue for VMWare here.. but I don't see any mention of Hyper-V.
I see the list mentioned in the blog post here as well... but also no Hyper-V.
Hyper-V support would be great to see on the roadmap.
The text was updated successfully, but these errors were encountered: