Can Vagrant be used with Windows Hyper-V Server? - vagrant

Is it possible to tell Vagrant to use a Windows Hyper-V Server as a host? I am currently using Vagrant for developing locally, which uses my development machine as the host.
The documentation for Vagrant mentions networking and ssh; however, this is almost always in the context of networking from the guest machine out. I am wondering how to run Vagrant on my desktop machine, and provision instances on the Windows Hyper-V Server.

Follow this step-by-step guide...
https://dogcomp.medium.com/speed-up-laravel-8-homestead-with-hyper-v-step-by-step-guide-99505199d003
The vagrant box provisioned is exposed in the local LAN subnet, as long as your firewall configured properly, you should be able to access via SSH/HTTP. However, you need to run vagrant command on the server.

Related

How is my Host environment interacting with my VM? Hadoop/HortonWorks

I'm learning Hadoop. We just installed a HortonWorks Sandbox on a VM. Once we start the VM, we're able to use our Host's web browser to interact with the VM.
I don't really understand this. I thought the Host and VM were completely isolated?
Why when I launch the VM, can I then use the web interface on my Host computer to interact with the VM? May be a simple question but I've never done this before and I've never used a VM like this.
Thanks
The purpose of a VM is to give an isolated environment yes, but the VM software is still running on your host, and using its hardware.
Your network interface is the same and you're using "port forwarding" features of the VM network interface.
Its nothing to do with Hadoop or that VM, but the settings it came installed with.
Similar settings are applied by web or other application developers that want to test their software in different environments. You don't need a desktop / GUI in a VM to test most server applications.
(Worth pointing out that the latest Hortonworks VM also runs Docker internally, so ports are forwarded out of a container to be exposed by the VM)

Is it posible to bring up a VM with vagrant but then manage it from WMWare?

I've been reading up on Vagrant, but i can't find anything about whether after creating a VM with vagrant (specifically using a VMWare provider) you can still manage it from the "provider" software (in this case WorkStation or Player).
I would like to bring it up using vagrant up and when it finishes provisioning, "release it" from vagrant and manage it from VMWare Workstation. Is it possible?
Thanks in advance.
The comment from #axiac is basically correct, but things works slightly different with VMWare, at least I am using VMware Fusion on macos so below is based on my usage.
When you bring up VM with VMWare, the vmx file is created in .vagrant folder of your project directory and the VM is not automatically added in the VM listed in VMWare.
Also the VM does not appear in the CLI. so when the VMs are halted and running
fhenri#machine:/Applications/VMware Fusion.app/Contents/Library$ ./vmrun list
Total running VMs: 0
and when I spin up the VM, I will get
fhenri#machine:/Applications/VMware Fusion.app/Contents/Library$ ./vmrun list
Total running VMs: 2
/Users/fhenri/project/ariba/pws.source/.vagrant/machines/db/vmware_fusion/89e5f21d-7078-44ed-8407-17dcc8c335ee/centos65.vmx
/Users/fhenri/project/ariba/pws.source/.vagrant/machines/app/vmware_fusion/6ee0dc5d-ec17-429c-9fd0-b069bfc0b040/centos65.vmx
When you open VMWare GUI, nothing appears in the VM library, if the VM are running, the VM GUI are available, beware that if you close any window form this point, the VM will shutdown (this is a main difference with VirtualBox as vb manages better the process of the VM and the vb process itself) but you can manually add the vmx file to vmware library if you want to later start and manage the VM from vmware itself
I have this bit in my vagrantfile:
config.vm.provider "vmware_desktop" do |v|
v.gui = true
end
When you do vagrant up, you should see it in Workstation/Fusion automatically, and control it from there.

Access SQL Server instance in Virtual Machine

First, my setup:
Mac OSX 10.8
Windows 7 running in VM (VMWare Fusion)
SQL Server 2008 R2 running in VM
Boatload of Python scripts + my highly customized Python installation on the Mac side.
I'd like to be able to run scripts locally on my laptop against a snapshot of our development database, which exists happily in my VM. I'd also like to not have the PITA that is rebuilding my Python installation in the Windows VM.
So the question: how can I access the SQL Server instance running in my VM from the Mac side? To access the production data, I use pymssql, which is based on FreeTDS.
I am running with this configuration, as follows:
Create an additional network adapter for the VM and set it as
"Private to my Mac". The default network adapter created during the VM set-up will be used by Windows to get to the network to which the Mac is attached (Internet, etc.) and this new one you create will be used for communication between the Mac and VM host.
The Mac IP on the virtual network can be identified using ifconfig. In my case it was named vmnet1 with IP 192.168.23.1
The Windows VM IP will, by default, be dynamically allocated. You should go into the network setup in Windows and set a static IP that is on the same network as that of the Mac IP. In my case the Windows network adapter created by Fusion was named Ethernet1. I set this to 192.168.23.100/255.255.255.0. Do not set a gateway address as you do not want routes down this path
Create an entry in the Mac /etc/hosts file for the Windows IP, e.g. "192.168.23.100 mywinsys.local"
Create an entry in the Windows /windows/system32/drivers/etc/hosts file for the mac IP, e.g. "192.168.23.1 mymacsys.local"
Be sure to turn off Windows firewall or otherwise open up necessary ports
Be sure that SQL Server is configured to accept IP connections
https://technet.microsoft.com/en-us/library/hh231672(v=sql.110).aspx
Processes running on the mac can connect to Windows processes with mywinsys.local. Processes running on Windows can connect to Mac process with mymacsys.local

how to acces host services in virtual box with out additional networking

I have ubuntu 10.04 and virtual box running win xp now i want to test my page layout in ie so i want to access apache from with in my virtual box how can i set up this with out additional networking on the host (i.e. i want to have some kind'a peer to peer connection between the host and the guest)
You should be able to access your local (host) machine's Apache server from your Virtual Box using the default gateway of the virtual machine. If you type ipconfig at the command prompt, you will find that IP address.
Once you have that, just browse to that IP and folder in IE. (Or any other browser you might have installed, for that matter.)
Shutdown XP and delete all networking options for the VM from VirtualBox. Create a new networking option (by default), this is NAT. Start the XP VM and install VirtualBox Guest Additions. Rrefer the VirtualBox help file for instructions. You need to first mount the Vbox Guest Additions ISO as a CD-ROM drive. Restart the VM. Your XP guest and the Ubuntu host will be given IP on the same subnet. You can access Apache websites running on the host by typing the host IP address in the URL.

Test windows authentication in Local Machine

How could i test this windows authentication functionality in local machine as i dont have intranet,and systems under domain.
to take a stab in the dark I'm assuming you have IIS running on your machine hosting a site that is configured to requires windows authentication?
I think the easiest option is to try and connect to the IIS machine from a second machine and see if you can login with the credentials you use on the server. If you don't have a second machine then you could download VMWare Player and an Ubuntu Appliance (or grab Virtual-Box and build a VM of whatever you like) and use that to act as your second machine.

Resources