hi,

I'm trying to use the datasource "vmware". It partly works as I'm able to get 
from cloud-init query --all the information pushed on the  to work as once the 
system as rebooted, I'm able to get the information hold in the enveloppe of 
vmware in guestinfo.userdata and in guestinfo.metadata. But, for a reason that 
I do not understand, it does not configure the machine with this information. 
What am I missing ?

the userdata is as follow
```yaml
users:
  - default
  - name: admin
    sudo: ALL=(ALL) NOPASSWD:ALL
    ssh-authorized-keys:
      - ssh-rsa AAAAB3N... username@nodename
```

the metadata is as follow
```yaml
instance-id: ipv6-caca
localhostname: ipv6-caca
hostname: ipv6-caca
fqdn: ipv6-caca.ceti.etat-ge.ch
manage_etc_hosts: true

# doc for network: 
https://cloudinit.readthedocs.io/en/latest/reference/network-config-format-v2.html
network:
  version: 2
  ethernets:
    id0:
      match:
        name: ens*
      dhcp: false
      dchp6: false
      addresse:
        - a07:2911:4084:10::ced:3/64
      gateway6: 2a07:2911:4084:10::1
      nameservers:
        addresses: [2a07:2911:4084:10::d64]
```

>From the guest, I have
```bash
hostnamectl  hostname
  # ipv6-caca-caca


# a raw config from cloud-init with
tail /etc/cloud/cloud.cfg
  # ...
  # ...
  # # added at the end
  # disable_vmware_customization: false

cat /etc/cloud/cloud.cfg.d/cloud.cfg.d/99-vmware-guest-customization.cfg
  # # doc: 
https://cloudinit.readthedocs.io/en/latest/reference/datasources/vmware.html
  #
  # datasource:
  #   VMware:
  #     vmware_cust_file_max_wait: 10
  #     allow_raw_data: false
```

/var/log/cloud-init-output.log
```log
Cloud-init v. 22.4.2 running 'init-local' at Wed, 19 Feb 2025 10:49:34 +0000. 
Up 3.88 seconds.
Cloud-init v. 22.4.2 running 'init' at Wed, 19 Feb 2025 10:49:50 +0000. Up 
19.49 seconds.
ci-info: +++++++++++++++++++++++++++++++++++++Net device 
info+++++++++++++++++++++++++++++++++++++
ci-info: 
+--------+------+------------------------------+-----------+--------+-------------------+
ci-info: | Device |  Up  |           Address            |    Mask   | Scope  |  
   Hw-Address    |
ci-info: 
+--------+------+------------------------------+-----------+--------+-------------------+
ci-info: | ens192 | True | 2a07:2911:4084:10::caca:1/64 |     .     | global | 
00:50:56:8c:00:d2 |
ci-info: | ens192 | True |  fe80::250:56ff:fe8c:d2/64   |     .     |  link  | 
00:50:56:8c:00:d2 |
ci-info: |   lo   | True |          127.0.0.1           | 255.0.0.0 |  host  |  
       .         |
ci-info: |   lo   | True |           ::1/128            |     .     |  host  |  
       .         |
ci-info: 
+--------+------+------------------------------+-----------+--------+-------------------+
ci-info: +++++++++++++++++++++++++++++++Route IPv6 
info+++++++++++++++++++++++++++++++
ci-info: 
+-------+------------------------+----------------------+-----------+-------+
ci-info: | Route |      Destination       |       Gateway        | Interface | 
Flags |
ci-info: 
+-------+------------------------+----------------------+-----------+-------+
ci-info: |   0   | 2a07:2911:4084:10::/64 |          ::          |   ens192  |  
 U   |
ci-info: |   1   |       fe80::/64        |          ::          |   ens192  |  
 U   |
ci-info: |   2   |          ::/0          | 2a07:2911:4084:10::1 |   ens192  |  
 UG  |
ci-info: |   4   |       multicast        |          ::          |   ens192  |  
 U   |
ci-info: 
+-------+------------------------+----------------------+-----------+-------+
2025-02-19 10:49:50,519 - DataSourceVMware.py[WARNING]: device ens192 has more 
than one ipv6 address: [{'addr': '2a07:2911:4084:10::caca:1', 'netmask': 
'ffff:ffff:ffff:ffff::/64'}, {'addr': 'fe80::250:56ff:fe8c:d2%ens192', 
'netmask': 'ffff:ffff:ffff:ffff::/64'}]
2025-02-19 10:49:50,535 - __init__.py[WARNING]: Unhandled non-multipart 
(text/x-not-multipart) userdata: 'b'users:'...'
Generating public/private rsa key pair.
Your identification has been saved in /etc/ssh/ssh_host_rsa_key
Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub
The key fingerprint is:
SHA256:YnRSSFL01rlfAcgL6EEshHlH/wATon/ogvF1z4Wz/jc root@ipv6-caca-caca
The key's randomart image is:
+---[RSA 3072]----+
|   ++BX+.. ..    |
|  o.oo**..o. .   |
|  .. +o.*.o.  .  |
|   . o.+ +..   . |
|.   + = S +   .  |
| + o + + + . .   |
|. o .   +   .    |
|   .   .    E    |
|        .... .   |
+----[SHA256]-----+
Generating public/private dsa key pair.
Your identification has been saved in /etc/ssh/ssh_host_dsa_key
Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub
The key fingerprint is:
SHA256:ItxeqJvZsGUInU6laLUtY9Z89NfHMNIFzmmz796BcBU root@ipv6-caca-caca
The key's randomart image is:
+---[DSA 1024]----+
|              .E.|
|             + o.|
|    . . .   . X. |
|   = X o .   +.* |
|  + & B S ....o o|
| . * B +   .o .o |
|    = +      . ..|
|     X         .o|
|    = .        .+|
+----[SHA256]-----+
Generating public/private ecdsa key pair.
Your identification has been saved in /etc/ssh/ssh_host_ecdsa_key
Your public key has been saved in /etc/ssh/ssh_host_ecdsa_key.pub
The key fingerprint is:
SHA256:oHlRauUGabpDWwr9sL8B5CL3ruvcFyEQtT+YTNp7c00 root@ipv6-caca-caca
The key's randomart image is:
+---[ECDSA 256]---+
|  .o. ..o        |
|  .  .o*         |
|   o+o= o        |
|  .B*Bo+         |
|. +oXX+.S E      |
| o o*+o. o       |
|    oo+.. .      |
| . o .o+         |
| .=oo...         |
+----[SHA256]-----+
Generating public/private ed25519 key pair.
Your identification has been saved in /etc/ssh/ssh_host_ed25519_key
Your public key has been saved in /etc/ssh/ssh_host_ed25519_key.pub
The key fingerprint is:
SHA256:Wq8VRRu+xuAViG1gVk11afXVX71ktKs4Hwgq3jvh6Qc root@ipv6-caca-caca
The key's randomart image is:
+--[ED25519 256]--+
|        +=.+=.o.O|
|       o. +o.+ *B|
|         .. = +.=|
|         . = . .o|
|        S.o +  . |
|       E...oo .  |
|     .o.+ o+ o   |
|    . o+ +  o .  |
|     ..+=    .   |
+----[SHA256]-----+
Cloud-init v. 22.4.2 running 'modules:config' at Wed, 19 Feb 2025 10:49:52 
+0000. Up 21.32 seconds.
Cloud-init v. 22.4.2 running 'modules:final' at Wed, 19 Feb 2025 10:49:53 
+0000. Up 22.03 seconds.
Cloud-init v. 22.4.2 finished at Wed, 19 Feb 2025 10:49:53 +0000. Datasource 
DataSourceVMware.  Up 22.16 seconds
```

Thanks in advance for your help.
Cédric BRINER

-- 
Mailing list: https://launchpad.net/~cloud-init
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~cloud-init
More help   : https://help.launchpad.net/ListHelp

Reply via email to