Problems with cloud-init to use gpt instead mbr

417 views Asked by At

I downloaded iso "CentOS-7-x86_64-GenericCloud-2009.qcow2" for create a template of Centos 7 for kvm containers Proxmox.

All is ok. But if I assign a disk with more than 2TB when I go to clone the container cloud-init resize the disk to the limit of 2TB because the disk type is mbr instead of gpt.

This is my /etc/cloud/cloud.cfg

users:
 - default

disable_root: 0
ssh_pwauth:   0

#mount_default_fields: [~, ~, 'auto', 'defaults,nofail,x-systemd.requires=cloud-init.service', '0', '2']
#resize_rootfs_tmp: /dev
resize_rootfs: false
disk_setup:
  /dev/sda:
    table_type: gpt
    layout: True
    overwrite: True
fs_setup:
  - label: None,
    filesystem: ext4
    device: /dev/sda
    partition: sda1



ssh_deletekeys:   1
ssh_genkeytypes:  ~
syslog_fix_perms: ~
disable_vmware_customization: false

cloud_init_modules:
 - disk_setup
 - migrator
 - bootcmd
 - write-files
 - growpart
 - resizefs
 - set_hostname
 - update_hostname
 - update_etc_hosts
 - rsyslog
 - users-groups
 - ssh

cloud_config_modules:
 - mounts
 - locale
 - set-passwords
 - rh_subscription
 - yum-add-repo
 - package-update-upgrade-install
 - timezone
 - puppet
 - chef
 - salt-minion
 - mcollective
 - disable-ec2-metadata
 - runcmd

cloud_final_modules:
 - rightscale_userdata
 - 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_info:
  default_user:
    name: root
    lock_passwd: false
    gecos: Cloud User
    groups: [adm, systemd-journal]
    sudo: ["ALL=(ALL) NOPASSWD:ALL"]
    shell: /bin/bash
  distro: rhel
  paths:
    cloud_dir: /var/lib/cloud
    templates_dir: /etc/cloud/templates
  ssh_svcname: sshd

When I starts the container cloned this ignore my conf and resize the partition / to 2TB with mbr.

Can you help me please?

0

There are 0 answers