[SOLVED] changing hostname messed

  • Thread starter Thread starter pats
  • Start date Start date
P

pats

Guest
Hi,

I changed hostname in Debian and also followed what i read in this forum "You also need to fix /etc/hosts (and reboot), and then rename the directory where the VM configs are stored (/etc/pve/nodes/[NODENAME]) "
# mv /etc/pve/nodes/server /etc/pve/nodes/prox1

After that i tried to login in Proxmox but got error - login failed, though username/password was correct.

When i do root@prox1:~# pvecm updatecerts get error "unable to get IP for node 'prox1' - node offline?"

i was getting this error also:

root@prox1:~# dpkg-reconfigure pve-manager
Restarting PVE Daemon: pvedaemon.
Restarting PVE Status Daemon: pvestatd.
Syntax error on line 13 of /etc/apache2/sites-enabled/pve-redirect.conf:
SSLCertificateFile: file '/etc/pve/local/pve-ssl.pem' does not exist or is empty
Action 'configtest' failed.
The Apache error log may have more information.
failed!
invoke-rc.d: initscript apache2, action "restart" failed.

Then i saw pve-ssl.pem in /etc/pve/nodes/ so i coped them

root@prox1:~# cp /etc/pve/nodes/pve*.* /etc/pve/local/
cp: target `/etc/pve/local/' is not a directory

root@prox1:~# ls -l /etc/pve/local/
ls: cannot access /etc/pve/local/: No such file or directory
drwxr-x--- 6 root www-data 4096 Jul 21 16:06 nodes
root@prox1:~# mkdir /etc/pve/local
root@prox1:~# cp /etc/pve/nodes/pve*.* /etc/pve/local/
root@prox1:~# dpkg-reconfigure pve-manager
Restarting PVE Daemon: pvedaemon.
Restarting PVE Status Daemon: pvestatd.
Restarting web server: apache2.

help pls...
 
Last edited by a moderator:
from SSH, i rebooted the server 2-3 times... no help..
- i can't login to Proxmox 'root@pam'
- still getting error, # pvecm updatecerts -> "unable to get IP for node 'prox1' - node offline?"
- also i'm not sure if the file i copied, SSLCertificateFile pve-ssl.pem was correct or not. Though it removed the error message as mentioned above.

:confused:
 
root@prox1:~# cat /etc/hostname
prox1

root@prox1:~# cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
74.91.18.1 prox1.xyzdns.com prox1 pvelocalhost

# 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
root@prox1:~#

these both look ok to me, however i find files/folders missing in '/etc/pve' maybe due to 'pvecm updatecerts' & 'dpkg-reconfigure pve-manager' not able to complete properly
How to correct/rebuild? (This standalone node had only 1 Container CT100)

root@prox1:~# ls -l /etc/pve
total 8
drwxr-xr-x 2 root root 4096 Jul 21 16:09 local
drwxr-x--- 3 root www-data 4096 Jul 22 01:51 nodes
root@prox1:~#
 
Last edited by a moderator:
as i mentioned, i have one live OpenVZ container CT100 in the node. And i also have Dump of that CT100 on 2nd Hard Drive.

Can i re-install and re-create CT100 (Restore from the Dump) without any issue?

root@prox1:/BackupD1# ls -l dump
total 48063252
-rw-r--r-- 1 root root 256426590 Jul 1 13:01 vzdump-openvz-100-2012_07_01-12_00_06.log
-rw-r--r-- 1 root root 11663701304 Jul 1 13:00 vzdump-openvz-100-2012_07_01-12_00_06.tar.lzo
-rw-r--r-- 1 root root 679 Jul 8 16:27 vzdump-openvz-100-2012_07_08-12_00_07.log
-rw-r--r-- 1 root root 37248544106 Jul 8 16:27 vzdump-openvz-100-2012_07_08-12_00_07.tar.lzo
-rw-r--r-- 1 root root 796 Jul 15 12:00 vzdump-openvz-100-2012_07_15-12_00_05.log
root@prox1:/BackupD1#
 
Last edited by a moderator:
vzrestore should work. But what is the output of

# /etc/pve/pve-cluster start

Does that recreate the missing files? If not, any hints in /var/log/syslog.
 
Cluster? this is standalone Proxmox bare-metal with 1 node..

root@prox1:~# /etc/pve/pve-cluster start
-bash: /etc/pve/pve-cluster: No such file or directory


root@prox1:~# tail -f -n 50 /var/log/syslog
Jul 23 01:00:18 server pvestatd[1520]: WARNING: ipcc_send_rec failed: Connection refused
Jul 23 01:00:18 server pvestatd[1520]: WARNING: ipcc_send_rec failed: Connection refused
Jul 23 01:00:28 server pvestatd[1520]: WARNING: ipcc_send_rec failed: Connection refused
Jul 23 01:00:28 server pvestatd[1520]: WARNING: ipcc_send_rec failed: Connection refused
Jul 23 01:00:28 server pvestatd[1520]: WARNING: ipcc_send_rec failed: Connection refused
Jul 23 01:00:28 server pvestatd[1520]: WARNING: ipcc_send_rec failed: Connection refused
Jul 23 01:00:28 server pvestatd[1520]: WARNING: ipcc_send_rec failed: Connection refused
Jul 23 01:00:28 server pvestatd[1520]: WARNING: ipcc_send_rec failed: Connection refused
Jul 23 01:00:38 server pvestatd[1520]: WARNING: ipcc_send_rec failed: Connection refused
Jul 23 01:00:38 server pvestatd[1520]: WARNING: ipcc_send_rec failed: Connection refused

and then i searched for this new error "WARNING: ipcc_send_rec failed: Connection refused" and found a post in this forum, so i tried..
root@prox1:~# pveversion -v
pve-manager: 2.1-12 (pve-manager/2.1/be112d89)
running kernel: 2.6.32-13-pve
proxmox-ve-2.6.32: 2.1-71
pve-kernel-2.6.32-11-pve: 2.6.32-66
pve-kernel-2.6.32-13-pve: 2.6.32-71
lvm2: 2.02.95-1pve2
clvm: 2.02.95-1pve2
corosync-pve: 1.4.3-1
openais-pve: 1.1.4-2
libqb: 0.10.1-2
redhat-cluster-pve: 3.1.92-2
resource-agents-pve: 3.9.2-3
fence-agents-pve: 3.1.8-1
pve-cluster: 1.0-27
qemu-server: 2.0-45
pve-firmware: 1.0-17
libpve-common-perl: 1.0-28
libpve-access-control: 1.0-24
libpve-storage-perl: 2.0-25
vncterm: 1.0-2
vzctl: 3.0.30-2pve5
vzprocps: 2.0.11-2
vzquota: 3.0.12-3
pve-qemu-kvm: 1.1-6
ksm-control-daemon: 1.1-1
root@prox1:~#


root@prox1:~# /etc/init.d/cman start
root@prox1:~# /etc/init.d/pve-cluster restart
Restarting pve cluster filesystem: pve-clusterfuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option
[main] crit: fuse_mount error: No such file or directory
[main] notice: exit proxmox configuration filesystem (-1)
(warning).
root@prox1:~#

problem is similar to http://forum.proxmox.com/archive/index.php/t-9889.html where 2ns last command says The directory '/etc/pve/' needs to be empty.

root@prox1:~# ls -l /etc/pve
total 8
drwxr-xr-x 2 root www-data 4096 Jul 22 15:26 local
drwxr-x--- 4 root www-data 4096 Jul 22 13:42 nodes
root@prox1:~#

Should i 'rm -rf local' & 'nodes' to make it empty?

thanks
 
Last edited by a moderator:
ok now i can login to Proxmox gui but Datacenter view is below

Datacenter
|--prox1 (green light - up)
. . |--local(prox1) - hard disk
. . |--BKD1(prox1) - backup drive
|--server (red light - down)
. . |--100 (VZ container - down)

The container is under previous hostname 'server' while the storage under the new hostname 'prox1'.
How to move the container CT 100 under 'prox1' ?

root@prox1:/etc/pve/nodes# ls -l
total 0
drwxr-x--- 2 root www-data 0 Jul 21 15:49 prox1
drwxr-x--- 2 root www-data 0 Jun 26 09:37 server
root@prox1:/etc/pve/nodes# ls -l server
total 1
drwxr-x--- 2 root www-data 0 Jun 26 09:37 openvz
drwx------ 2 root www-data 0 Jun 26 09:37 priv
-rw-r----- 1 root www-data 1675 Jun 26 09:37 pve-ssl.key
-rw-r----- 1 root www-data 1346 Jun 26 09:37 pve-ssl.pem
drwxr-x--- 2 root www-data 0 Jun 26 09:37 qemu-server
root@prox1:/etc/pve/nodes# ls -l prox1
total 1
drwxr-x--- 2 root www-data 0 Jul 23 04:03 openvz
drwx------ 2 root www-data 0 Jul 23 04:03 priv
-rw-r----- 1 root www-data 1675 Jul 23 04:03 pve-ssl.key
-rw-r----- 1 root www-data 1342 Jul 23 04:03 pve-ssl.pem
drwxr-x--- 2 root www-data 0 Jul 21 15:49 qemu-server
root@prox1:/etc/pve/nodes# ls -l prox1/openvz
total 0
root@prox1:/etc/pve/nodes# ls -l server/openvz
total 1
-rw-r----- 1 root www-data 933 Jun 29 04:33 100.conf
-rwxr----- 1 root www-data 206 Jul 13 06:11 100.mount
root@prox1:/etc/pve/nodes#


Can i move -
# mv /etc/pve/nodes/server/openvz/* /etc/pve/nodes/prox1/openvz/
or
# mv /etc/pve/nodes/server/* /etc/pve/nodes/prox1/ (so that it moves the keys also pve-ssl.key , pve-ssl.pem)

i'm also thinking that some reference of old hostname is still there thats why after making /etc/pve empty and 'dpkg-reconfigure pve-manager', its putting CT100 under old hostname.
where to find that reference and correct it...

thanks
 
Last edited by a moderator:
:cool: Thanks !!!

Datacenter
|--prox1 (green light - up)
. . |--100 (VZ container - green)
. . |--local(prox1) - hard disk
. . |--BKD1(prox1) - backup drive
 
Last edited by a moderator: