[SOLVED] After upgrade from 5.2-5, my server is now named "CloudInit"?

cdukes

Active Member
Sep 11, 2015
88
5
28
Raleigh, NC
www.logzilla.net
I can't even imagine what I did wrong, but all I did was `apt get update; apt-get dist-upgrade`.
After reboot, the server's name is "CloudInit" and it no longer has `/etc/pve` mounted.

Even the hosts file is changed:

root@CloudInit [~]: # cat /etc/hosts
# Your system has configured 'manage_etc_hosts' as True.
# As a result, if you wish for changes to this file to persist
# then you will need to either
# a.) make changes to the master file in /etc/cloud/templates/hosts.tmpl
# b.) change or remove the value of 'manage_etc_hosts' in
# /etc/cloud/cloud.cfg or cloud-config from user-data
#
127.0.1.1 CloudInit CloudInit
127.0.0.1 localhost

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
 
It appears that after the upgrade, it's booting the wrong root?
See attached screenshot.
How do I get it to boot to the "root" and not the "vm-9000-cloudinit"?
 

Attachments

  • Screen Shot 2018-12-17 at 2.03.46 AM.png
    Screen Shot 2018-12-17 at 2.03.46 AM.png
    24.1 KB · Views: 14
did you install cloudinit on the host ?
 
can you post the output of '/etc/fstab', 'df -h', '/etc/default/grub' and 'dpkg -l | grep cloud'
 
can you post the output of '/etc/fstab', 'df -h', '/etc/default/grub' and 'dpkg -l | grep cloud'

#####################
# FSTAB
#####################
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/pve/root / ext4 errors=remount-ro 0 1
#/dev/pve/swap none swap sw 0 0
proc /proc proc defaults 0 0
/dev/sdb1 /mnt/disk2 ext4 errors=continue,noatime 0 0


#####################
# DF
#####################
Filesystem Size Used Avail Use% Mounted on
udev 95G 0 95G 0% /dev
tmpfs 19G 78M 19G 1% /run
/dev/mapper/pve-root 94G 45G 45G 50% /
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 95G 0 95G 0% /sys/fs/cgroup
/dev/sdb1 11T 7.3T 3.1T 71% /mnt/disk2
tmpfs 19G 0 19G 0% /run/user/1001

#####################
# GRUB
#####################
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Proxmox Virtual Environment"
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX=""

# Disable os-prober, it might add menu entries for each guest
GRUB_DISABLE_OS_PROBER=true

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"


#####################
# DPKG
#####################
ii cloud-init 0.7.9-2 all initialization system for infrastructure cloud instances


#####################
# END
#####################
 
I fixed it.
I can't even begin to imagine how this happened. But the fix was:
apt purge cloud-init
Then I restored the /etc/hosts file from a backup and rebooted and it came up.

In 20+ years of IT, this is easily the strangest thing I've seen.
 
I'm having this same problem, after setting up Cloud Init and starting up an Ubuntu VM with it, then rebooting Proxmox itself, the Proxmox hostname changed to the same name as the VM ("ubuntu-cloudinit-1") and everything seems to be messed up. The GUI isn't loading and local-lvm isn't mounted.

I should note that I was following the Cloud Init tutorial in the Proxmox documentation (just search Google for "Proxmox cloud init", it should be the first result.)

These are the commands I typed, according to my history on the box:
Code:
   51  wget <ubuntu cloud image -- redacted due to forum rules>
   52  cd /mnt/pve/vm-images/
   53  qm create 9000 --memory 2048 --net0 virtio,bridge=vmbr0
   54  ls
   55  ls template/iso/ubuntu-18.04.1.0-live-server-amd64.iso
   56  qm importdisk 9000 bionic-server-cloudimg-amd64.img local-lvm
   57  qm set 9000 --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-9000-disk-1
   58  qm set 9000 --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-9000-disk-0
   59  qm set 9000 --ide2 local-lvm:cloudinit
   60  qm set 9000 --boot c --bootdisk scsi0
   61  qm set 9000 --serial0 socket --vga serial0
   62  qm template 9000
   63  qm clone 9000 201 --name ubuntu-cloudinit-1
   64  qm set 201 --sshkey ~/.ssh/id_rsa.pub
   65  qm set 201 --ipconfig0 ip=192.168.1.91,gw=192.168.1.1
   66  qm set 201 --ipconfig0 ip=192.168.1.91/32,gw=192.168.1.1
   67  ssh 192.168.1.91
   68  ssh 192.168.1.91
   69  ssh ubuntu-cloudinit-1
   70  qm set 201 --sshkey ~/.ssh/id_rsa.pub
   71  qm set 201 --ipconfig0 ip=192.168.1.91/24,gw=192.168.1.1

I tried what cdukes did above, apt purge cloud-init, and rebooted, but the GUI is still not loading. Anyone know what in the world is going on here? This seems like a very serious issue because you can completely screw up Proxmox by following Proxmox's own Cloud Init documentation.
 
It depends...the very first command shown in the instructions on https://pve.proxmox.com/wiki/Cloud-Init_Support says to run "apt-get install cloud-init" but perhaps does not make quite it clear enough that this must be run in the VM you want to configure to use clou-init and not on the Proxmox node itself.

Is it possible that you might have accidentally run it on the node without realising you had done so? I've done similar things in the past by accident.

I think maybe that section should be moved elsewhere (maybe below the example), because the example explains how to download the cloud-init image, which already has cloud-init installed and configured correctly.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!