Vagrant vmware-esxi plugin flag to enable hardware virtualization on the VM

122 views
Skip to first unread message

Shashank Korada

unread,
Jan 17, 2018, 5:54:08 AM1/17/18
to Vagrant
Hi,

I am using the vagrant esxi plugin for my testing.


A couple of issues that I am facing.

1. For my testing I need to enable hardware virtualization on the VM that is brought up on the ESXI server. Is there a flag that I can enable in the vagrant file to support this.
    I am currently manually editing the vmx file on the VM by adding the following  : vhv.enable = "TRUE"'

    Is there a flag that I can use in my vagrant file that can be enabled to achieve this when the VM is brought up ?

2. For the plugin to work we need ovftool and when run vagrant to bring up the VM ovftool prompts for the password of the esxi server.
    Is there a way to change this config so as to not prompt for the password

    Log from console:
               VMware ovftool 4.2.0 (build-5965791)
               Opening VMX source: /home/sdptest/.vagrant.d/boxes/bento-VAGRANTSLASH-ubuntu-16.04/201801.02.0/vmware_desktop/ZZZZ_sdp-master-esxi-1.vmx
               Enter login information for target vi://10.73.40.19/
               Username: root
               Password: ********** . =========> Manually entered. How can this be avoided?


Vagrantfile:

# Adjustable settings for Master Node

CFG_MEMSIZE = "6000"      # max memory for each VM
CFG_TZ = "US/Pacific"     # timezone, like US/Pacific, US/Eastern, UTC, Europe/Warsaw, etc.
CFG_CPU_NUM = "2"

CFG_MASTER_NODE_NAME = "sdp-master-esxi-1"

VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.ssh.forward_agent = true
  config.vm.define CFG_MASTER_NODE_NAME do |x|
    x.vm.box = "bento/ubuntu-16.04"
    x.vm.provider :vmware_esxi do |v|
      v.esxi_hostname = '10.73.40.11'
      v.esxi_username = 'root'
      v.esxi_password = 'password123'
      v.vmname = CFG_MASTER_NODE_NAME
      v.memsize = 6144
      v.numvcpus = CFG_CPU_NUM
    end
  end
end

Alvaro Miranda Aguilera

unread,
Jan 18, 2018, 8:00:26 AM1/18/18
to vagra...@googlegroups.com
Hello

for 1 you can contact the plugin person to see if he can add the conf part

for 2 you can use vi://user:password@server

if you got special characters you can escape them with the html codes ie # -> %23 i think, by memory but giving you the idea.

Thanks
Alvaro.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/996885d7-8393-4f18-abd9-a8b779c6d3b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Shashank Korada

unread,
Jan 18, 2018, 8:13:34 AM1/18/18
to Vagrant
Thank you Alvaro.

I just figured out 1. We could use the custom_vmx_settings and add what is required as a key value pair.
Thanks for the second one, will try escaping the special characters

-Shashank
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.



--
Alvaro

Alvaro Miranda Aguilera

unread,
Jan 18, 2018, 9:26:08 AM1/18/18
to vagra...@googlegroups.com
just to be sure

from this:


to this

vi://root:Password123@10.73.40.19/


To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/ad37e23e-e770-45a2-8485-93f2ff46b799%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Reply all
Reply to author
Forward
0 new messages