Hello,
I'm trying to make a debian 10 template with cloud-init.
Virtualizing in KVM on Proxmox Virtual Environment 6.1-8
If there's anyone who can help me
When I clone the template and add freespace on the clone and booting I got this line in the log :
In put this in the cloud.cfg :
I'm trying to make a debian 10 template with cloud-init.
Virtualizing in KVM on Proxmox Virtual Environment 6.1-8
If there's anyone who can help me
When I clone the template and add freespace on the clone and booting I got this line in the log :
Code:
2020-04-25 17:57:19,864 - util.py[DEBUG]: resize_devices took 0.019 seconds
2020-04-25 17:57:19,864 - cc_growpart.py[DEBUG]: '/' SKIPPED: device_part_info(/dev/mapper/debian--vg-root) failed: /dev/mapper/debian--vg-root not a partition
2020-04-25 17:57:19,864 - handlers.py[DEBUG]: finish: init-network/config-growpart: SUCCESS: config-growpart ran successfully
2020-04-25 17:57:19,864 - stages.py[DEBUG]: Running module resizefs (<module 'cloudinit.config.cc_resizefs' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_resizefs.py'>) with frequency always
2020-04-25 17:57:19,865 - handlers.py[DEBUG]: start: init-network/config-resizefs: running config-resizefs with frequency always
2020-04-25 17:57:19,865 - helpers.py[DEBUG]: Running config-resizefs using lock (<cloudinit.helpers.DummyLock object at 0x7fce90683ac8>)
2020-04-25 17:57:19,890 - util.py[DEBUG]: Reading from /proc/369/mountinfo (quiet=False)
2020-04-25 17:57:19,890 - util.py[DEBUG]: Read 2788 bytes from /proc/369/mountinfo
2020-04-25 17:57:19,890 - cc_resizefs.py[DEBUG]: resize_info: dev=/dev/mapper/debian--vg-root mnt_point=/ path=/
2020-04-25 17:57:19,890 - util.py[DEBUG]: Running command ['systemd-detect-virt', '--quiet', '--container'] with allowed return codes [0] (shell=False, capture=True)
2020-04-25 17:57:19,897 - util.py[DEBUG]: Running command ['running-in-container'] with allowed return codes [0] (shell=False, capture=True)
2020-04-25 17:57:19,899 - util.py[DEBUG]: Running command ['lxc-is-container'] with allowed return codes [0] (shell=False, capture=True)
2020-04-25 17:57:19,901 - util.py[DEBUG]: Reading from /proc/1/environ (quiet=False)
2020-04-25 17:57:19,901 - util.py[DEBUG]: Read 143 bytes from /proc/1/environ
2020-04-25 17:57:19,901 - util.py[DEBUG]: Reading from /proc/self/status (quiet=False)
2020-04-25 17:57:19,901 - util.py[DEBUG]: Read 1013 bytes from /proc/self/status
2020-04-25 17:57:19,901 - cc_resizefs.py[DEBUG]: Resizing / (ext4) using resize2fs /dev/mapper/debian--vg-root
2020-04-25 17:57:19,901 - util.py[DEBUG]: Running command ('resize2fs', '/dev/mapper/debian--vg-root') with allowed return codes [0] (shell=False, capture=True)
2020-04-25 17:57:20,024 - util.py[DEBUG]: Resizing took 0.123 seconds
2020-04-25 17:57:20,024 - cc_resizefs.py[DEBUG]: Resized root filesystem (type=ext4, val=True)
2020-04-25 17:57:20,025 - handlers.py[DEBUG]: finish: init-network/config-resizefs: SUCCESS: config-resizefs ran successfully
In put this in the cloud.cfg :
Code:
# The top level settings are used as module
# and system configuration.
# A set of users which may be applied and/or used by various modules
# when a 'default' entry is found it will reference the 'default_user'
# from the distro configuration specified below
users:
- default
# If this is set, 'root' will not be able to ssh in and they
# will get a message to login instead as the above $user (debian)
disable_root: false
# This will cause the set+update hostname module to not operate (if true)
preserve_hostname: false
resize_rootfs: true
growpart:
mode: auto
devices: ['/']
ignore_growroot_disabled: false
# Example datasource config
# datasource:
# Ec2:
# metadata_urls: [ 'blah.com' ]
# timeout: 5 # (defaults to 50 seconds)
# max_wait: 10 # (defaults to 120 seconds)
# The modules that run in the 'init' stage
cloud_init_modules:
- migrator
- seed_random
- bootcmd
- write-files
- growpart
- resizefs
- disk_setup
- mounts
- set_hostname
- update_hostname
- update_etc_hosts
- ca-certs
- rsyslog
- users-groups
- ssh
# The modules that run in the 'config' stage
cloud_config_modules:
# Emit the cloud config ready event
# this can be used by upstart jobs for 'start on cloud-config'.
- emit_upstart
- ssh-import-id
- locale
- set-passwords
- grub-dpkg
- apt-pipelining
- apt-configure
- ntp
- timezone
- runcmd
- byobu
# The modules that run in the 'final' stage
cloud_final_modules:
- package-update-upgrade-install
- rightscale_userdata
- scripts-vendor
- scripts-per-once
- scripts-per-boot
- scripts-per-instance
- scripts-user
- ssh-authkey-fingerprints
- keys-to-console
- phone-home
- final-message
- power-state-change
# System and/or distro specific settings
# (not accessible to handlers/transforms)
system_info:
# This will affect which distro class gets used
distro: debian
# Default user name + that default users groups (if added/used)
default_user:
name: debian
lock_passwd: True
gecos: Debian
groups: [adm, audio, cdrom, dialout, dip, floppy, netdev, plugdev, sudo, video]
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
shell: /bin/bash
# Other config here will be given to the distro class and/or path classes
paths:
cloud_dir: /var/lib/cloud/
templates_dir: /etc/cloud/templates/
upstart_dir: /etc/init/
package_mirrors:
- arches: [default]
failsafe:
primary: http://deb.debian.org/debian
security: http://security.debian.org/
ssh_svcname: ssh