Comments (2)
There's not a native method in the Packer Builder for VMware vSphere to use static IP address assignment. Although this has been mentions / requested in #37.
Options to enable this include:
Ubuntu 18.04
Update the ks.cfg preseed file.
# Networking
d-i netcfg/disable_autoconfig boolean true
# IPv4 Setup
d-i netcfg/get_ipaddress string <static_ipv4_address>
d-i netcfg/get_netmask string <static_ipv4_netmask>
d-i netcfg/get_gateway string <static_ipv4_gateways>
d-i netcfg/get_nameservers string <static_ipv4_dnsservers>
d-i netcfg/confirm_static boolean true
Ubuntu 20.04 and later
Update the user-data
used by cloud-init.
network:
network:
version: 2
ethernets:
ens33:
addresses: <static_ipv4_address_cidr>
gateway4: <static_ipv4_gateway>
nameservers:
addresses: [<static_ipv4_dnsservers>]
Windows Server
Update the Autounattend.xml with Ipv4Settings.
<component name="Microsoft-Windows-TCPIP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Interfaces>
<Interface wcm:action="add">
<Ipv4Settings>
<DhcpEnabled>false</DhcpEnabled>
</Ipv4Settings>
<Ipv6Settings>
<DhcpEnabled>false</DhcpEnabled>
</Ipv6Settings>
<Identifier>Ethernet0</Identifier>
<UnicastIpAddresses>
<IpAddress wcm:action="add" wcm:keyValue="1"><!--REPLACE WITH IPCIDR--></IpAddress>
</UnicastIpAddresses>
<Routes>
<Route wcm:action="add">
<Identifier>1</Identifier>
<Prefix>0.0.0.0/0</Prefix>
<NextHopAddress><!--REPLACE WITH GATEWAY--></NextHopAddress>
</Route>
</Routes>
</Interface>
</Interfaces>
</component>
</component>
Thanks,
Ryan
from packer-examples-for-vsphere.
This can be addressed by modifying the config files per #17 (comment).
from packer-examples-for-vsphere.
Related Issues (20)
- Add Fedora Server Linux distribution HOT 7
- Add Amazon Linux distribution HOT 3
- Add Ubuntu Server 24.04 LTS HOT 1
- can't find product key from Unattended file HOT 1
- Windows 11 and 10 Evaluation builds fail to start HOT 3
- Ansible gather problem with Fedora 40 HOT 6
- Windows Server 2022 Failed to read ProducKey from unattend file HOT 2
- Windows Server 2025 wrong variables HOT 4
- WinRMOperationTimeoutError
- Correct a typo in builds/linux/ubuntu/24-04-lts/data/user-data.pkrtpl.hc HOT 2
- Add variable validation for build user case and length HOT 7
- WinRM Operation Timeout HOT 3
- Debian 12 instalation halts with the message that no network mirror was selected, and then fails if manually advanced. HOT 5
- Syntax error in one of the Linux ansible playbook HOT 5
- develop: Error ansible with RHEL 9.3 HOT 2
- There is a line of comment repeated in 'builds/linux/ubuntu-20-04-lts/data/user-data.pkrtpl.hcl' HOT 3
- Cloud-init is disabled in Ubuntu 24.04 images with `vm_guest_os_cloudinit=true` HOT 7
- Unable to use var.common_data_source = "disk" for debian 12 provisionning HOT 15
- Rocky 9 installation failed when using vm_guest_os_cloudinit=true HOT 1
- Dev Container build failure HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from packer-examples-for-vsphere.