Hi Team, 

I am using the  *user-data *file to automatically complete the  installer  
configuration   on  ubuntu_server_20.04.3-live-server-amd64.iso image, but 
I am unable to set up the storage section in an automated way. 
This is my user-data file placed under http directory:
I have also attached the screenshot of storage page, kindly have a look. 

#cloud-config
autoinstall:
  version: 1
  interactive-sections:
    - storage
  locale: en_US
  keyboard:
    layout: en
    variant: us
  network:
    network:
      version: 2
      ethernets:
        ens33:
          dhcp4: true
  identity:
    hostname: ubuntu-server
    username: ubuntu
    password: ubuntu
  kernel:
    package: linux-generic
  ssh:
    allow-pw: true
    authorized-keys: []
    install-server: true
  user-data:
    disable_root: false
  packages: 
    - build-essential
    - network-manager
    - dkms
    - emacs-nox
    #- ubuntu-desktop-minimal^
  package_update: true
  package_upgrade: true
  late-commands:
    - 'sed -i "s/dhcp4: true/&\n      dhcp-identifier: mac/" 
/target/etc/netplan/00-installer-config.yaml'
    - echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/ubuntu
    - echo 'ubuntu-server ALL=(ALL) NOPASSWD:ALL' > 
/target/etc/sudoers.d/ubuntu
    - curtin in-target --target=/target -- chmod 440 /etc/sudoers.d/ubuntu
    - apt update -y
    - apt install cloud-init -y
    - apt install openssh-server -y
    - apt install nfs-common nfs-kernel-server -y
    - cat <<EOF > /etc/resolv.conf
    nameserver <ip>
    EOF
    - firewall-cmd --permanent --add-port=22/tcp  
    - firewall-cmd --permanent --add-port=80/tcp
    - firewall-cmd --permanent --add-port=443/tcp
    - firewall-cmd --permanent --add-port=2376/tcp
    - firewall-cmd --permanent --add-port=2379/tcp
    - firewall-cmd --reload
    - apt install iputils-ping open-vm-tools openssh-server net-tools perl 
open-iscsi ntp curl vim ifupdown zip unzip gnupg2 
software-properties-common apt-transport-https ca-certificates lsb-release 
python3-pip jq openvpn -y
    - service vmtoolsd restart


Any advice or pointers would be much appreciated.


-- 
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/hashicorp/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/4174e8e1-2e8e-4ee5-aec0-f1e441b05f41n%40googlegroups.com.

Reply via email to