You are not logged in.

#26 2012-03-19 16:15:22

TuxLyn
Member
From: United States
Registered: 2011-10-26
Posts: 283

Re: [SOLVED] Arch Linux 2011.08.19 - OpenVZ Template

Good luck to you mate. If you find a fix do share here.


::: Using Arch Linux Since October 25, 2011 :::
::: Tutorials: http://distrogeeks.com/ :::

Offline

#27 2012-03-19 16:22:32

autonymous
Member
Registered: 2008-02-24
Posts: 31

Re: [SOLVED] Arch Linux 2011.08.19 - OpenVZ Template

Will do. Probably involve reconstructing that udev pkg so it doesn't try to remove that one loop device (as a workaround)

Offline

#28 2012-03-19 16:27:33

autonymous
Member
Registered: 2008-02-24
Posts: 31

Re: [SOLVED] Arch Linux 2011.08.19 - OpenVZ Template

...a newer contrib template than 2010.05 would be awesome, though!

Last edited by autonymous (2012-03-19 16:27:53)

Offline

#29 2012-03-20 15:53:13

Lucky
Member
From: /dev/random
Registered: 2009-08-07
Posts: 28

Re: [SOLVED] Arch Linux 2011.08.19 - OpenVZ Template

Yes a updated template would be nice. I think a new template release every 6-12 month is the best for a rolling release distro like arch.

But wonder if you update it please include netcfg package in your template, because i want submit new ip scripts to vzctl upstream. rc.conf network config is depreciated for more then one ip adress and netcfg is the way we should go.

Offline

#30 2012-08-24 09:15:54

jancici
Member
From: svk
Registered: 2011-12-04
Posts: 190

Re: [SOLVED] Arch Linux 2011.08.19 - OpenVZ Template

hi, I am just updating my serve.
looks that I neet netcfg, please, is there any tutorial how to update to netcfg? because I don;t want to cut off my server from net.
then I want to migrate to systemd, do you think do I need netcfg or I can go without that?

thanks

Offline

#31 2012-08-24 09:33:51

TuxLyn
Member
From: United States
Registered: 2011-10-26
Posts: 283

Re: [SOLVED] Arch Linux 2011.08.19 - OpenVZ Template

@jancici, according to http://www.archlinux.org/news/netcfg-28 … atibility/
/etc/rc.conf has been deprecated, but I still use it in rc.conf without any issues smile

If you like to configure netcfg, I think first thing you need to do is install it "pacman -S netcfg"
then see /etc/conf.d/netcfg file. Also, so https://wiki.archlinux.org/index.php/Netcfg  for more details.

Last edited by TuxLyn (2012-08-24 09:35:46)


::: Using Arch Linux Since October 25, 2011 :::
::: Tutorials: http://distrogeeks.com/ :::

Offline

#32 2012-08-24 23:41:42

Lucky
Member
From: /dev/random
Registered: 2009-08-07
Posts: 28

Re: [SOLVED] Arch Linux 2011.08.19 - OpenVZ Template

Hi,
rc.conf network is still working and supported by vzctl right now, but its also deprecated and pain for an IPv6 setup and not simple.

So i switch to a netcfg setup for the Archlinux guests. But i don't use systemd right now, so maybe you need to change something.

pacman -S netcfg

cat /etc/conf.d/netcfg

NETWORKS=(venet)
WIRED_INTERFACE="venet0"

cat /etc/network/venet

CONNECTION='ethernet'
DESCRIPTION='OpenVZ connection'
INTERFACE='venet0'
IP='static'
IPCFG=(
#default
'addr add 127.0.0.1/32 broadcast 0.0.0.0 dev venet0'
#IPv4 address
'addr add xxx.xxx.xxx.xxx/32 broadcast 0.0.0.0 dev venet0'
#IPv4 route
'route add default dev venet0'
#IPv6 address
'addr add xxxx:xx:xx::x/128 dev venet0'
#IPv6 route
'-6 route add default dev venet0'
)

DNS=('xxx.xxx.xxx.xxx' 'xxx.xxx.xxx.xxx')

If you change a ip/dns with vzctl (remove/add/change) you need to edit /etc/network/venet and run netcfg -r venet

You can also add more then one IPv4 or IPv6 address, but i only use one in this sample.

Set your netcfg settings? Then can you switch with (maybe u need to run in a screen/tmux session): rc.d stop network && netcfg venet

Only if it works!!! If it fails, you need only reboot your server and it works again.
/etc/rc.conf
on DAEMONS line add "net-profiles" and disable "network" or remove it.

Last edited by Lucky (2012-08-25 22:51:36)

Offline

#33 2012-08-25 21:57:58

jancici
Member
From: svk
Registered: 2011-12-04
Posts: 190

Re: [SOLVED] Arch Linux 2011.08.19 - OpenVZ Template

thanks lucky
I did already try something similar, so I did follow your help, but I am not succsefull.

I did redit my /etc/conf.d/netcgf and then /etc/network.d/venet.
I did run netcfg -l to see if venet profile is there, and it is there.
then I did modified rc.conf { did change only one line}
old line
#DAEMONS=(syslog-ng iptables network @crond @sshd mysqld @httpd @dovecot postfix)
new line
DAEMONS=(syslog-ng iptables net-profiles @crond @sshd mysqld @httpd @dovecot postfix)

run screeen and run rc.d stop network && netcfg venet
and my server is not responding any more
here is output

root@izo ~ ### rc.d stop network && netcfg venet
Warning: Your network settings are deprecated.
  Please refer to 'man 5 rc.conf' on how to define a single wired
  connection, or use a utility such as netcfg.

after reboot over web admin of vps provider my server is still not responding, so I need recovery server from backup {done just before runnig that screen}

so I am bit sutck, I don;t want to backup and recevory my server all the time unitl I find problem, and I don;t know where is the problem.

thank for any tip / help

Offline

#34 2012-08-25 22:44:52

Lucky
Member
From: /dev/random
Registered: 2009-08-07
Posts: 28

Re: [SOLVED] Arch Linux 2011.08.19 - OpenVZ Template

Hi jancici,
sry that you need to recover your server. I test again this setup and found the problem.

1. replace NOT DAEMONS arry in rc.conf (only if netcfg works!), because if it fails you need only to reboot your machine and not recover
2. The problem is part of the network script (or the ugly network config @ rc.conf <- i think thats the problem wink). rc.d stop network fails everytime. Because i have access to the HOST i go into the GUEST and found out that stop network only removes the route, but not the ip address. netcfg (ip) can't set the same ip address to the device again so it also fails. At the End, no connection.

Workaround
rc.d stop network && ip addr flush venet0 && netcfg venet

If it also not work or you want to be sure that this works pls post or pm me the output of "ip a" & "ip r" and your netcfg network conf (venet) and conf.d/netcfg.

If it works you can change your DAEMONS on rc.conf.

//edit
change to ip flush, this is now the proper way.

Last edited by Lucky (2012-08-27 21:48:17)

Offline

#35 2012-08-27 20:24:27

jancici
Member
From: svk
Registered: 2011-12-04
Posts: 190

Re: [SOLVED] Arch Linux 2011.08.19 - OpenVZ Template

aha, I did comment out network configuration from rc.conf so reason why rc.d netwrok stop did not work is clear ;-)

I did try only wrkaround 2
here is output :

rc.d stop network && netcfg venet || netcfg venet
Warning: Your network settings are deprecated.
  Please refer to 'man 5 rc.conf' on how to define a single wired
  connection, or use a utility such as netcfg.
:: Stopping network                                                                              [FAIL] 
:: venet up                                                                                      [BUSY]
 RTNETLINK answers: File exists
 > Could not configure interface (addr add 127.0.0.1/32 broadcast 0.0.0.0 dev venet0).
                                                                                                 [FAIL] 
:: venet up                                                                                      [BUSY] 
/usr/lib/network/connections/ethernet: line 208: echo: write error: Operation not permitted
 > Cannot set hostname to xxxxxxx

looks that there is problem with my hostname {well I did override true name}
and I did check /etc/hostname which contain corect name

here is configuration

cat /etc/conf.d/netcfg 
NETWORKS=(venet)
WIRED_INTERFACE="venet0"
cat /etc/network.d/venet 
CONNECTION='ethernet'
DESCRIPTION='OpenVZ connection'
INTERFACE='venet0'
IP='static'
IPCFG=(
#default
'addr add 127.0.0.1/32 broadcast 0.0.0.0 dev venet0'
#IPv4 address
'addr add xxx.xxx.xxx.xxx/32 broadcast 0.0.0.0 dev venet0'
#IPv4 route
'route add default dev venet0'
##IPv6 address
##'addr add xxxx:xx:xx::x/128 dev venet0'
##IPv6 route
##'-6 route add default dev venet0'
)

DNS=('AA.CC.BB.DD' 'T0.W9.1X.J')
ip ad
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
3: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    link/void 
    inet 127.0.0.1/32 scope host venet0
    inet x.x.x.x/32 scope global venet0:0

ip ro
default dev venet0  scope link

thanks

Offline

#36 2012-08-27 20:51:13

Lucky
Member
From: /dev/random
Registered: 2009-08-07
Posts: 28

Re: [SOLVED] Arch Linux 2011.08.19 - OpenVZ Template

Hi,

did netcfg venet work? only this "error"message?

What did "echo $HOSTNAME" say? Your correct hostname?

//edit

cat /proc/sys/kernel/hostname

is your hostname?

echo "moo" > /proc/sys/kernel/hostname

works, without error? Then echo "yourhostname" back.

output of:
uname -a ???

Maybe you VSP use old kernel or you had not the permission by HOST.

The Problem part. That says, if echo $HOSTNAME fails -> errormessage. But i don't think this is a problem

205     # Set hostname
206     if [[ -n "$HOSTNAME" ]]; then
207         report_debug ethernet_up hostname "$HOSTNAME"
208         if ! echo "$HOSTNAME" > /proc/sys/kernel/hostname; then
209             report_iproute "Cannot set hostname to $HOSTNAME"
210         fi
211     fi

Last edited by Lucky (2012-08-27 21:33:06)

Offline

#37 2012-09-08 18:42:40

canercandan
Member
Registered: 2012-09-08
Posts: 5

Re: [SOLVED] Arch Linux 2011.08.19 - OpenVZ Template

Hi guys,

Let's share with you my little contribution; I just created an openvz template for archlinux based on the 2010.05 version of arch. But of course updated in fixing all the issues introduced with the last revisions. Here is the link to download: http://candan.fr/arch-2012-09-08-x86_64 … ion.tar.gz
and the checksum: http://candan.fr/arch-2012-09-08-x86_64 … tar.gz.md5

Don't forget to generate your own pacman pgp key before using the template in calling the command line: pacman-key --init

Tip: here is the way to create your VE with it: http://wiki.openvz.org/Application_Templates

Cheers,
Caner

Offline

#38 2013-04-04 22:00:02

esente
Member
Registered: 2013-04-04
Posts: 5

Re: [SOLVED] Arch Linux 2011.08.19 - OpenVZ Template

canercandan wrote:

Hi guys,

Let's share with you my little contribution; I just created an openvz template for archlinux based on the 2010.05 version of arch. But of course updated in fixing all the issues introduced with the last revisions. Here is the link to download: http://candan.fr/arch-2012-09-08-x86_64 … ion.tar.gz
and the checksum: http://candan.fr/arch-2012-09-08-x86_64 … tar.gz.md5

Don't forget to generate your own pacman pgp key before using the template in calling the command line: pacman-key --init

Tip: here is the way to create your VE with it: http://wiki.openvz.org/Application_Templates

Cheers,
Caner

Hi,

My VPS server switched to your template for me, and I have a problem that I could SSH in, but there is no outbound connection at all. I can't ping www.google.com or 8.8.8.8.

Is there any advice on this?

Offline

#39 2013-04-04 22:14:55

Lucky
Member
From: /dev/random
Registered: 2009-08-07
Posts: 28

Re: [SOLVED] Arch Linux 2011.08.19 - OpenVZ Template

Hi esente,

- which distri do you use as host system? please give output of uname -a
- which version of vzctl do you have? vzctl --version
- ip a inside the container (please remove your ip with xxx.xxx and so on)
- output of cat /etc/resolv.conf

Then maybe i could help.

Last edited by Lucky (2013-04-04 22:30:47)

Offline

#40 2013-04-04 22:25:14

esente
Member
Registered: 2013-04-04
Posts: 5

Re: [SOLVED] Arch Linux 2011.08.19 - OpenVZ Template

Lucky wrote:

Hi esente,

- which distri do you use as host system? please give output of uname -a
- which version of vzctl do you have? vzctl --version
- ip -a inside the container (please remove your ip with xxx.xxx and so on)

Then maybe i could help.

Hi Lucky,

I have no access to the host system, I just rent a VPS from them.

I could ask the provider to give it to me.

For the third one, the VM does not take -a option.

ip -help
Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }
       ip [ -force ] -batch filename
where  OBJECT := { link | addr | addrlabel | route | rule | neigh | ntable |
                   tunnel | tuntap | maddr | mroute | mrule | monitor | xfrm |
                   netns | l2tp }
       OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |
                    -f[amily] { inet | inet6 | ipx | dnet | bridge | link } |
                    -l[oops] { maximum-addr-flush-attempts } |
                    -o[neline] | -t[imestamp] | -b[atch] [filename] |
                    -rc[vbuf] [size]}

Offline

#41 2013-04-04 22:30:31

Lucky
Member
From: /dev/random
Registered: 2009-08-07
Posts: 28

Re: [SOLVED] Arch Linux 2011.08.19 - OpenVZ Template

sry was my fault.

ip a not ip -a
and cat /etc/resolv.conf
uname -a can you use inside the container too, but i think is a centos system with offical kernel

Last edited by Lucky (2013-04-04 22:31:35)

Offline

#42 2013-04-04 22:35:28

esente
Member
Registered: 2013-04-04
Posts: 5

Re: [SOLVED] Arch Linux 2011.08.19 - OpenVZ Template

Here you go.

[root@eggs ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
3: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
    link/void
    inet 127.0.0.1/32 scope host venet0
    inet 10.10.xxx.xxx/24 scope global venet0:0
    inet xxx.xx.xxx.xxx/32 scope global venet0:1

[root@eggs ~]# uname -a
Linux domain.com 2.6.32-042stab076.5 #1 SMP Mon Mar 18 20:41:34 MSK 2013 x86_64 GNU/Linux

[root@eggs ~]# cat /etc/resolv.conf
# Generated by dhcpcd
# /etc/resolv.conf.head can replace this line
# /etc/resolv.conf.tail can replace this line
search candan.fr
nameserver 8.8.8.8
nameserver 4.2.2.2

Offline

#43 2013-04-04 22:43:36

Lucky
Member
From: /dev/random
Registered: 2009-08-07
Posts: 28

Re: [SOLVED] Arch Linux 2011.08.19 - OpenVZ Template

ip a looks ok
uname -a looks like centos (rhel) with latest offical kernel

the output of 'ip r' is
default dev venet0  scope link

right?

can you ping your server from home (outside?)

Offline

#44 2013-04-04 22:45:08

esente
Member
Registered: 2013-04-04
Posts: 5

Re: [SOLVED] Arch Linux 2011.08.19 - OpenVZ Template

Yep, the output of `ip r` is exactly that.

I can ping the server just fine.

Offline

#45 2013-04-04 23:32:53

Lucky
Member
From: /dev/random
Registered: 2009-08-07
Posts: 28

Re: [SOLVED] Arch Linux 2011.08.19 - OpenVZ Template

@esente
I found the problem. big_smile Thanks for giving me root access and the trust, so i can debug the problem.

The problem is the template provided by canercandan, because he modify some stuff he needed and do not provide a clean template!
canercandan uses private ips in the config files for his container setup, this is ok for him but not for public. There are the problem parts:

template: arch-2012-09-08-x86_64-minimal-caner-version.tar.gz
file: /etc/rc.conf
line: venet0_0="venet0:0 10.10.105.10 netmask 255.255.255.0 broadcast 0.0.0.0"

template: arch-2012-11-19-x86_64-minimal-caner-version.tar.gz
file: /etc/rc.conf
line:  venet0_0="venet0:0 10.10.104.241 netmask 255.255.255.0 broadcast 0.0.0.0"

1. Comment this venet0_0 line out!

2. delete this ip with (replace xxx with the right numbers!): ip addr del 10.10.xxx.xxx/32 dev venet0:0

3. ping should work fine

4. maybe you want also to change/clean /etc/resolv.conf because there is:
search candan.fr
nameserver 127.0.0.1
nameserver 213.186.33.99

with (google dns server):
nameserver 8.8.8.8
nameserver 8.8.4.4

@canercandan
Thank you for providing these templates, but please remove private stuff thanks.

// EDIT ARGGGGGGG
I found more stuff, why do you install yaourt and pacman-color? I need to remove this shit for updating the system! And why do you add archlinuxfr repo?

@ALL
I'm working on a systemd template right now, but waiting for netctl switched to core.

Last edited by Lucky (2013-04-04 23:42:49)

Offline

#46 2013-04-05 03:36:27

esente
Member
Registered: 2013-04-04
Posts: 5

Re: [SOLVED] Arch Linux 2011.08.19 - OpenVZ Template

Wow, thank you so much for taking your time to invest for me! I'm totally new with the template, and @canercandan's one is the newest I could find for my hosting provider. I will try to do the guide step by step again to understand more.

Again, thank you Lucky!

Offline

#47 2013-04-10 09:19:16

canercandan
Member
Registered: 2012-09-08
Posts: 5

Re: [SOLVED] Arch Linux 2011.08.19 - OpenVZ Template

You're welcome ;-) and you're right there are a few packages and configs made for personnal use, I am gonna make a new clear version of this template ASAP.

@Lucky Why dont you propose the version you actually have ?

Offline

#48 2013-04-10 19:36:26

Lucky
Member
From: /dev/random
Registered: 2009-08-07
Posts: 28

Re: [SOLVED] Arch Linux 2011.08.19 - OpenVZ Template

Thats nice, thank you.

It's because i want a clean systemd version with systemd services/programms and one part of this is netctl and this is not at core right now. And there are a few bugs with systemd version which i need to fix before we can provide a stable release.

I also talked to thanil 1 month ago about this problems and a solution how we can fix this.
https://wiki.archlinux.org/index.php/Vi … to_systemd
https://bbs.archlinux.org/viewtopic.php?id=156376

Offline

#49 2013-05-05 19:58:55

canercandan
Member
Registered: 2012-09-08
Posts: 5

Re: [SOLVED] Arch Linux 2011.08.19 - OpenVZ Template

Since I needed to prepare an update of the VZ for a task I am working on I should also like to take this opportunity to share with you an updated version of the previously proposed template:

http://candan.fr/arch-2013-05-05-x86_64 … ion.tar.gz
http://candan.fr/arch-2013-05-05-x86_64 … tar.gz.md5

Here is the changelog:

DONE:
* last updates
* fixed this issue https://bbs.archlinux.org/viewtopic.php?pid=1123209
* fixed an issue with dbus (user missing)
* fixed an issue with systemd-tmpfiles-clean.timer

NOT DONE YET:
* removed personal use packages (cf. htop, yaourt, …)
* ported network from rc.d to systemd
* and others things I was planned to do (will do it ASAP)

Offline

#50 2013-05-05 20:00:20

canercandan
Member
Registered: 2012-09-08
Posts: 5

Re: [SOLVED] Arch Linux 2011.08.19 - OpenVZ Template

maybe it should be a good idea to create a repository (cf. GIT) to insert all the patches needed to get a archlinux template working.

Offline

Board footer

Powered by FluxBB