OpenVZ Forum


Home » General » Support » Can I run debian as vz with ubuntu host
Can I run debian as vz with ubuntu host [message #35764] Tue, 21 April 2009 07:54 Go to next message
satimis is currently offline  satimis
Messages: 39
Registered: August 2008
Member
Hi folks,

host - Ubuntu 8.04-i386
guest - Ubuntu 8.04-i386 minimal

I tried to install Debian 5.0 without success. Steps performed as follows;

$ cd /var/lib/vz/template/cache/

$ sudo vzctl create 105 --ostemplate debian-5.0-i386-minimal --config vps.basic
Creating VE private area (debian-5.0-i386-minimal)
Performing postcreate actions
VE private area was created



$ sudo vzctl set 104 --hostname vz4.satimis.com --save
Warning: distribution not specified default used /etc/vz/dists/default
Saved parameters for VE 104


$ cat /et/vz/dists/default
ADD_IP=redhat-add_ip.sh
DEL_IP=redhat-del_ip.sh
SET_HOSTNAME=redhat-set_hostname.sh
SET_DNS=set_dns.sh
SET_USERPASS=set_userpass.sh
SET_UGID_QUOTA=set_ugid_quota.sh
POST_CREATE=postcreate.sh



Please advise how to fix the problem. Whether it is NOT allowed running OS other than similar to the host? TIA


Edit:

Something strange happened here.

After googling a while without remedy solving my problem. I exited Ubuntu 8.04 and turned off the PC.

About half hour later I switched on the PC re-starting OpenVZ and performed following steps.

$ sudo vzctl destroy 104
$ sudo rm /etc/vz/conf/104.conf.destroyed
$ cd /var/lib/vz/template/cache/

$ sudo vzctl create 104 --ostemplate debian-5.0-i386-minimal --config vps.basic
Creating VE private area (debian-5.0-i386-minimal)
Performing postcreate actions
VE private area was created



$ sudo vzctl set 104 --hostname vzd4.satimis.com --save
Saved parameters for VE 104



$ sudo vzctl set 104 --ipadd 192.168.0.104 --save
Saved parameters for VE 104



$ sudo vzctl set 104 --nameserver 202.14.67.4 --nameserver 202.14.67.14 --save
Saved parameters for VE 104



$ sudo vzctl start 104
Starting VE ...
VE is mounted
Adding IP address(es): 192.168.0.104
Setting CPU units: 1000
Configure meminfo: 65536
Set hostname: vzd4.satimis.com
File resolv.conf was modified
VE start in progress...



$ sudo vzlist -a
      VEID      NPROC STATUS  IP_ADDR HOSTNAME                        
       101          3 running 192.168.0.101   vz1.satimis.com                 
       103          3 running 192.168.0.103   vz3.satimis.com                 
       104          6 running 192.168.0.104   vzd4.satimis.com                
       105          6 running -               -  

(remark: I'm going to remove 105)

To my surprise, this time it works. Referring to the notes taken down previously the only difference made in creating 104 is the hostname;

Old 104 vz.satimis.com
New 104 vzd4.satimis.com

I can't resolve WHY it would make the difference?


Actually I have tried several hours to solve the problem in running "apt-get update/upgrade" and "aptidute update/safe-upgrade" on 102 without result always having mistake. 102 was running Ubuntu 8.04. Therefore I install debian 5.0 instead


B.R.
satimis


[Updated on: Tue, 21 April 2009 09:38]

Report message to a moderator

Re: Can I run debian as vz with ubuntu host [message #35768 is a reply to message #35764] Tue, 21 April 2009 09:53 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hi,

Quote:


Whether it is NOT allowed running OS other than similar to the host? TIA


Of course, you can run VE based on OS which differs from host OS.

Could you please show VEs configuration file and global configuration file (vz.conf)?

Is this a typo?
Quote:


$ sudo vzctl create 105 --ostemplate debian-5.0-i386-minimal --config vps.basic
$ sudo vzctl set 104 --hostname vz4.satimis.com --save

Re: Can I run debian as vz with ubuntu host [message #35770 is a reply to message #35768] Tue, 21 April 2009 13:56 Go to previous messageGo to next message
satimis is currently offline  satimis
Messages: 39
Registered: August 2008
Member
maratrus wrote on Tue, 21 April 2009 17:53

Hi,
Of course, you can run VE based on OS which differs from host OS.


Hi maratrus,


Advice noted and thanks


Quote:


Could you please show VEs configuration file and global configuration file (vz.conf)?



# ls -l /etc/vz/conf/
total 28
-rw-r--r-- 1 root root  228 2008-04-21 22:19 0.conf
-rw-r--r-- 1 root root 1743 2009-04-03 14:32 101.conf
-rw-r--r-- 1 root root 1744 2009-04-21 17:47 102.conf
-rw-r--r-- 1 root root 1743 2009-04-19 18:29 103.conf
-rw-r--r-- 1 root root 1743 2009-04-21 17:09 104.conf
-rw-r--r-- 1 root root 1539 2008-04-21 22:19 ve-light.conf-sample
-rw-r--r-- 1 root root 1515 2008-04-21 22:19 ve-vps.basic.conf-sample



# ls -l /etc/vz/
total 20
drwxr-xr-x 2 root root 4096 2009-04-21 17:50 conf
drwxr-xr-x 2 root root 4096 2008-09-24 18:54 cron
drwxr-xr-x 3 root root 4096 2008-09-24 18:54 dists
drwxr-xr-x 2 root root 4096 2008-04-21 22:19 names
-rw-r--r-- 1 root root  988 2008-04-21 22:19 vz.conf



# ls -l /etc/vz/dists/
total 236
-rw-r--r-- 1 root root 1055 2008-04-21 22:19 altlinux-2.4.conf
-rw-r--r-- 1 root root 1080 2008-04-21 22:19 altlinux-3.0.conf
-rw-r--r-- 1 root root 1080 2008-04-21 22:19 altlinux-4.0.conf
-rw-r--r-- 1 root root 1080 2008-04-21 22:19 altlinux.conf
-rw-r--r-- 1 root root 1026 2008-04-21 22:19 arch-0.7.conf
-rw-r--r-- 1 root root 1026 2008-04-21 22:19 arch-0.8.conf
-rw-r--r-- 1 root root 1026 2008-04-21 22:19 arch.conf
-rw-r--r-- 1 root root  963 2008-04-21 22:19 centos-3.conf
-rw-r--r-- 1 root root  963 2008-04-21 22:19 centos-4.conf
-rw-r--r-- 1 root root  963 2008-04-21 22:19 centos.conf
-rw-r--r-- 1 root root 1047 2008-04-21 22:19 debian-3.0.conf
-rw-r--r-- 1 root root 1047 2008-04-21 22:19 debian-3.1.conf
-rw-r--r-- 1 root root 1047 2008-04-21 22:19 debian-4.0.conf
-rw-r--r-- 1 root root 1047 2008-04-21 22:19 debian.conf
-rw-r--r-- 1 root root  962 2008-04-21 22:19 default
-rw-r--r-- 1 root root 4457 2008-04-21 22:19 distribution.conf-template
-rw-r--r-- 1 root root 1047 2008-04-21 22:19 fedora-7.conf
-rw-r--r-- 1 root root 1047 2008-04-21 22:19 fedora-8.conf
-rw-r--r-- 1 root root 1047 2008-04-21 22:19 fedora-core-1.conf
-rw-r--r-- 1 root root 1047 2008-04-21 22:19 fedora-core-2.conf
-rw-r--r-- 1 root root 1047 2008-04-21 22:19 fedora-core-3.conf
-rw-r--r-- 1 root root 1047 2008-04-21 22:19 fedora-core-4.conf
-rw-r--r-- 1 root root 1047 2008-04-21 22:19 fedora-core-5.conf
-rw-r--r-- 1 root root 1047 2008-04-21 22:19 fedora-core-6.conf
-rw-r--r-- 1 root root 1047 2008-04-21 22:19 fedora-core-7.conf
-rw-r--r-- 1 root root 1047 2008-04-21 22:19 fedora-core.conf
-rw-r--r-- 1 root root 1054 2008-04-21 22:19 gentoo.conf
-rw-r--r-- 1 root root 1049 2008-04-21 22:19 mandrake.conf
-rw-r--r-- 1 root root 1040 2008-04-21 22:19 opensuse.conf
-rw-r--r-- 1 root root 1055 2008-04-21 22:19 owl.conf
-rw-r--r-- 1 root root 1055 2008-04-21 22:19 redhat-7.0.conf
-rw-r--r-- 1 root root 1055 2008-04-21 22:19 redhat-7.1.conf
-rw-r--r-- 1 root root 1055 2008-04-21 22:19 redhat-7.2.conf
-rw-r--r-- 1 root root 1055 2008-04-21 22:19 redhat-7.3.conf
-rw-r--r-- 1 root root 1061 2008-04-21 22:19 redhat-8.0.conf
-rw-r--r-- 1 root root 1061 2008-04-21 22:19 redhat-9.conf
-rw-r--r-- 1 root root 1061 2008-04-21 22:19 redhat.conf
-rw-r--r-- 1 root root 1106 2008-04-21 22:19 rhel-3.conf
-rw-r--r-- 1 root root 1106 2008-04-21 22:19 rhel-4.conf
drwxr-xr-x 2 root root 4096 2008-09-24 18:54 scripts
-rw-r--r-- 1 root root 1074 2008-04-21 22:19 slackware-10.0.conf
-rw-r--r-- 1 root root 1074 2008-04-21 22:19 slackware-10.1.conf
-rw-r--r-- 1 root root 1081 2008-04-21 22:19 slackware-9.0.conf
-rw-r--r-- 1 root root 1081 2008-04-21 22:19 slackware-9.1.conf
-rw-r--r-- 1 root root 1074 2008-04-21 22:19 slackware.conf
-rw-r--r-- 1 root root 1039 2008-04-21 22:19 sles-9.conf
-rw-r--r-- 1 root root 1039 2008-04-21 22:19 sles.conf
-rw-r--r-- 1 root root 1051 2008-04-21 22:19 suse-7.3.conf
-rw-r--r-- 1 root root 1051 2008-04-21 22:19 suse-8.0.conf
-rw-r--r-- 1 root root 1051 2008-04-21 22:19 suse-8.1.conf
-rw-r--r-- 1 root root 1051 2008-04-21 22:19 suse-8.2.conf
-rw-r--r-- 1 root root 1040 2008-04-21 22:19 suse-9.0.conf
-rw-r--r-- 1 root root 1040 2008-04-21 22:19 suse-9.1.conf
-rw-r--r-- 1 root root 1040 2008-04-21 22:19 suse-9.2.conf
-rw-r--r-- 1 root root 1040 2008-04-21 22:19 suse-9.3.conf
-rw-r--r-- 1 root root 1040 2008-04-21 22:19 suse.conf
-rw-r--r-- 1 root root 1047 2008-04-21 22:19 ubuntu-5.1.conf
-rw-r--r-- 1 root root 1047 2008-04-21 22:19 ubuntu.conf



# cat /etc/vz/vz.conf
## Global parameters
VIRTUOZZO=yes
LOCKDIR=/var/lib/vz/lock
DUMPDIR=/var/lib/vz/dump
VE0CPUUNITS=1000

## Logging parameters
LOGGING=yes
LOGFILE=/var/log/vzctl.log
LOG_LEVEL=0
VERBOSE=0

## Disk quota parameters
DISK_QUOTA=yes
VZFASTBOOT=no

# The name of the device whose ip address will be used as source ip for VE.
# By default automatically assigned.
#VE_ROUTE_SRC_DEV="eth0"

# Controls which interfaces to send ARP requests and modify APR tables on.
NEIGHBOUR_DEVS=detect

## Template parameters
TEMPLATE=/var/lib/vz/template

## Defaults for VEs
VE_ROOT=/var/lib/vz/root/$VEID
VE_PRIVATE=/var/lib/vz/private/$VEID
CONFIGFILE="vps.basic"
DEF_OSTEMPLATE="ubuntu"

## Load vzwdog module
VZWDOG="no"

## IPv4 iptables kernel modules
IPTABLES="ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mang$

## Enable IPv6
IPV6="no"

## IPv6 ip6tables kernel modules
IP6TABLES="ip6_tables ip6table_filter ip6table_mangle ip6t_REJECT"



Quote:


Is this a typo?
Quote:


$ sudo vzctl create 105 --ostemplate debian-5.0-i386-minimal --config vps.basic
$ sudo vzctl set 104 --hostname vz4.satimis.com --save



Sorry, it is a typing mistake. Should read "104"


B.R.
satimis
Re: Can I run debian as vz with ubuntu host [message #35775 is a reply to message #35770] Wed, 22 April 2009 06:23 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hi,

- I don't understand whether you solved the problem?
- you didn't show VEs configuration file only global vz.conf.
- please pay attention to OSTEMPLATE variable in VEs configuration file.
Re: Can I run debian as vz with ubuntu host [message #35784 is a reply to message #35775] Wed, 22 April 2009 11:16 Go to previous message
satimis is currently offline  satimis
Messages: 39
Registered: August 2008
Member
maratrus wrote on Wed, 22 April 2009 14:23

Hi,

- I don't understand whether you solved the problem?
- you didn't show VEs configuration file only global vz.conf.
- please pay attention to OSTEMPLATE variable in VEs configuration file.


Hi maratrus,


I have 5 VZs running;

$ sudo vzlist -a
[sudo] password for satimis: 
      VEID      NPROC STATUS  IP_ADDR         HOSTNAME                        
       101          3 running 192.168.0.101   vz1.satimis.com                 
       102          3 running 192.168.0.102   vz2.satimis.com                 
       103          3 running 192.168.0.103   vz3.satimis.com                 
       104          6 running 192.168.0.104   vzd4.satimis.com                
       105         12 running 192.168.0.105   vzd5.satimis.com 


It seems that they are working w/o problem. However they are only base OS without further installation.

101 - Ubuntu 8.04 minimal (created on template)
102 - Ubuntu 8.04 minimal (created on template)
103 - Ubuntu 8.04 minimal (duplicated on 101)
104 - Debian 5.0 minimal (created on template)
105 - Debian 5.0 full version (created on template)
(all 32bit)


$ cat /etc/vz/conf/104.conf
- snip -

ONBOOT="yes"

# UBC parameters (in form of barrier:limit)
KMEMSIZE="11055923:11377049"
LOCKEDPAGES="256:256"
PRIVVMPAGES="65536:69632"
SHMPAGES="21504:21504"
NUMPROC="240:240"
PHYSPAGES="0:2147483647"
VMGUARPAGES="33792:2147483647"
OOMGUARPAGES="26112:2147483647"
NUMTCPSOCK="360:360"
NUMFLOCK="188:206"
NUMPTY="16:16"
NUMSIGINFO="256:256"
TCPSNDBUF="1720320:2703360"
TCPRCVBUF="1720320:2703360"
OTHERSOCKBUF="1126080:2097152"
DGRAMRCVBUF="262144:262144"
NUMOTHERSOCK="360:360"
DCACHESIZE="3409920:3624960"
NUMFILE="9312:9312"
AVNUMPROC="180:180"
NUMIPTENT="128:128"

# Disk quota parameters (in form of softlimit:hardlimit)
DISKSPACE="1048576:1153024"
DISKINODES="200000:220000"
QUOTATIME="0"

# CPU fair sheduler parameter
CPUUNITS="1000"


VE_ROOT="/var/lib/vz/root/$VEID"
VE_PRIVATE="/var/lib/vz/private/$VEID"
OSTEMPLATE="debian-5.0-i386-minimal"
ORIGIN_SAMPLE="vps.basic"
HOSTNAME="vzd4.satimis.com"
IP_ADDRESS="192.168.0.104"
NAMESERVER="202.14.67.4 202.14.67.14"


B.R.
satimis

Previous Topic: veth and cpt and restore
Next Topic: HA cluster with DRBD and Heartbeat
Goto Forum:
  


Current Time: Wed Aug 14 02:14:34 GMT 2024

Total time taken to generate the page: 0.02820 seconds