Rama Rivera
Rama Rivera

Reputation: 82

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.

Upvotes: 1

Views: 1694

Answers (2)

david
david

Reputation: 141

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.

Upvotes: 1

Frederic Henri
Frederic Henri

Reputation: 53773

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

Upvotes: 1

Related Questions