Hello
This is my suggestion based on what I would do if I was in your situation.
Replace:
"vmx_data": {
"virtualHW.version": "9",
"ethernet0.startConnected": "TRUE",
"ethernet0.present": "TRUE",
"ethernet0.virtualDev": "e1000",
"ethernet0.networkName": "vlan2",
"ethernet0.addressType": "generated",
"ethernet0.displayName": "vlan2",
"ethernet0.present": "TRUE",
"memsize": "1024",
"numvcpus": "1",
"cpuid.coresPerSocket": "1",
"scsi0:0.present": "TRUE",
"scsi0:0.redo": "",
"ide0:0.present": "FALSE"
}
To ethernet1.
Just let packer to create ethernet0.
When the machine starts, probably won't see eth0 due the lack of drivers,
so the ks should work as is.
as part of the provisioning, in packer you can install vmware tools, then:
When you finish to install, put on
/etc/sysconfig/network-scripts/ifcfg-eth0 and eth1, for dhcp on boot
At some point you can/could/should export the VM without nics or 1/2 nics
etc and will work in all the cases.
my 2 cents
Alvaro.
On Tue, Sep 6, 2016 at 12:36 PM, Anil Dasmala <[email protected]> wrote:
> Hi Alvaro,
>
> Thanks for the info.
> Finally I found another way to get past this issue of vmxnet3.
> create-vm.json attached.
> (Note : in json file i have to set "ethernet0.virtualDev": "e1000" ,
> otherwise packer build fails.)
>
> After running packer build myjsonfile and i see VM getting registered on
> esx in debug text, I'm using vsphere powercli to modify the network adapter
> to vmxnet3 type online.
> get-vm packer-vm | get-networkadapter|set-networkadapter -networkname
> "vlan2" -type vmxnet3 -connected:$true -confirm:$false
>
> I tested on centos7, the vmxnet3 driver is gettign loaded only after
> shutdown and power on, (if I just reboot instead of shutdown first time
> e1000 driver loaded).
>
> Thanks again Alvaro, your help is much appreciated.
>
> On Friday, September 2, 2016 at 11:48:36 PM UTC+5:30, Alvaro Miranda
> Aguilera wrote:
>>
>>
>> On Thu, Sep 1, 2016 at 9:30 AM, Anil Dasmala <[email protected]> wrote:
>>
>>> vmxnet3
>>
>>
>> Hello
>>
>> What he did is a new file.go that you can use to patch packer and build a
>> new binary.
>>
>> I think will be easier to ask him for a build version (binary) to test.
>>
>> Other option is create a custom iso / initrd
>>
>> https://vmwire.com/2011/06/11/vmware-tools-rpm-installation-
>> with-pxeboot-and-kickstart-3/
>>
>>
>> Can you share your packer templates and scripts?
>>
>> I have an ESX 5.5 where I can test
>>
>>
>> --
>> Alvaro
>> (+31)103400555
>>
> --
> 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/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/packer-tool/f1ecf513-a684-48f5-af7f-e4ccf2dc6d80%40googlegroups.com
> <https://groups.google.com/d/msgid/packer-tool/f1ecf513-a684-48f5-af7f-e4ccf2dc6d80%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
Alvaro
(+31)103400555
--
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/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/packer-tool/CAHqq0ewTs7mUDm6LfJnJjCowUB_uxC4NKzfS6H3TSrPw87Mvrw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.