RT
虚拟化是Hyper-V,基础镜像是debian-13-genericcloud-amd64.qcow2,用qemu-img转成vhdx,再在Hyper-V控制台载入硬盘
想要用cloud-init初始化Debian网络
在user-data里面写了network,想要设置静态IP 192.168.35.135,但不生效,系统起来后还是DHCP得的IP 192.168.35.140
查了路由器,确认192.168.35.135并未被占用
查/var/log/cloud-init-output.log,用户名密码公钥这些都生效了,只有network小节没生效
找了Red Hat的文档来看,也不像是写错了,看起来是一模一样的,文档地址:https://docs.redhat.com/zh-cn/documentation/red_hat_enterprise_linux/8/html/configuring_and_managing_cloud-init_for_rhel_8/setting-up-a-static-networking-configuration-with-cloud-init_configuring-cloud-init

到了这里已经没有头绪了
求大佬帮我看看这是为什么


附:user-data

#cloud-configusers:  - name: root    ssh_pwauth: True    ssh_authorized_keys:      - ssh-ed25519 <keys>chpasswd:  list: |    root:<password>  expire: falsessh:  emit_keys_to_console: falsessh_genkeytypes: [ed25519]timezone: Asia/Shanghainetwork:  version: 1  config:    - type: physical      name: eth0      subnets:        - type: static          address: 192.168.35.135/24          gateway: 192.168.35.1

附:cloud-init-output.log