Details
-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Duplicate
-
Fix Version/s: OpenVZ-legacy
-
Component/s: Containers::Userspace
-
Security Level: Public
-
Environment:Operating System: Other
Platform: Other
-
External issue URL:
-
External issue ID:776
Description
1. Create & start VE:
[root@ts27 vzt-vzctl]# vzctl create 200
Creating VE private area (fedora-core-5-i386-default)
Performing postcreate actions
VE private area was created
[root@ts27 vzt-vzctl]# vzctl start 200
Starting VE ...
VE is mounted
Setting CPU units: 1000
Configure meminfo: 65536
VE start in progress...
[root@ts27 vzt-vzctl]#
2. Check /etc/hosts inside VE:
[root@ts27 vzt-vzctl]# vzctl exec 200 cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
[root@ts27 vzt-vzctl]#
3. Set some hostname for VE:
[root@ts27 vzt-vzctl]# vzctl set 200 --hostname ve200 --save
Set hostname: ve200
Saved parameters for VE 200
[root@ts27 vzt-vzctl]#
4. Check hostname again:
[root@ts27 vzt-vzctl]# vzctl exec 200 cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
# Auto-generated hostname. Please do not remove this comment.
127.0.0.1 ve200
[root@ts27 vzt-vzctl]#
According to hosts(5) man page, 'For each host a single line should be present'.
[root@ts27 vzt-vzctl]# vzctl create 200
Creating VE private area (fedora-core-5-i386-default)
Performing postcreate actions
VE private area was created
[root@ts27 vzt-vzctl]# vzctl start 200
Starting VE ...
VE is mounted
Setting CPU units: 1000
Configure meminfo: 65536
VE start in progress...
[root@ts27 vzt-vzctl]#
2. Check /etc/hosts inside VE:
[root@ts27 vzt-vzctl]# vzctl exec 200 cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
[root@ts27 vzt-vzctl]#
3. Set some hostname for VE:
[root@ts27 vzt-vzctl]# vzctl set 200 --hostname ve200 --save
Set hostname: ve200
Saved parameters for VE 200
[root@ts27 vzt-vzctl]#
4. Check hostname again:
[root@ts27 vzt-vzctl]# vzctl exec 200 cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
# Auto-generated hostname. Please do not remove this comment.
127.0.0.1 ve200
[root@ts27 vzt-vzctl]#
According to hosts(5) man page, 'For each host a single line should be present'.
Attachments
Issue Links
- duplicates
-
OVZ-3996 /etc/hosts changes after reboot
- Closed