Error en Proxmox
Moderador: frank
Re: Error en Proxmox
haber.. si sabes un poquito ingles aqui esta .. si no.. dame mas tiempo para traducirtelo al machucao como buen cubano.. GGG
Simple configuration with virtual Ethernet device
Assuming that 192.168.0.0/24 is being used on your LAN, the following sections show how to configure a container for the LAN using veth.
Start a CT
[host-node]# vzctl start 101
Add veth device to CT
[host-node]# vzctl set 101 --netif_add eth0 --save
This allocates a MAC address and associates it with the host eth0 port.
Configure devices in CT0
The following steps are needed when the CT is not bridged to a CT0 network interface. That is because the CT is connected to a virtual network that is "behind" CT0. CT0 must forward packets between its physical network interface and the virtual network interface where CT is located. The first step below to configure the interface is not necessary if the container has been started, since the device will have been initialized.
[host-node]# ifconfig veth101.0 0
[host-node]# echo 1 > /proc/sys/net/ipv4/conf/veth101.0/forwarding
[host-node]# echo 1 > /proc/sys/net/ipv4/conf/veth101.0/proxy_arp
[host-node]# echo 1 > /proc/sys/net/ipv4/conf/eth0/forwarding
[host-node]# echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
Configure device in CT
The following steps show an example of a quick manual configuration of the CT network interface. Typically, you would configure the network settings in /etc/network/interfaces (Debian, see below) or however it is normally configured on your distribution. You can also comment or remove the configuration for venet0, if it exists, because that device will not be used.
[host-node]# vzctl enter 101
[ve-101]# /sbin/ifconfig eth0 0
[ve-101]# /sbin/ip addr add 192.168.0.101 dev eth0
[ve-101]# /sbin/ip route add default dev eth0
Notes:
Until you ifconfig eth0 it won't appear. When you do it will use the mac address netif_add added earlier
192.168.0.101 is chosen to be an unrouteable private ip address. Where 101 reminds you that it is node 101.
The "ip route" tells all traffic to head to "device eth0"
In theory you could use dhcpd with OpenVZ and dhclient to pick up an DHCP address from your router instead of hardwiring it
http://openvz.org/pipermail/users/2005- ... 00020.html
Add route in CT0
Since CT0 is acting as a router between its physical network interface and the virtual network interface of the CT, we need to add a route to the CT to direct traffic to the right destination.
[host-node]# ip route add 192.168.0.101 dev veth101.0
para que se quede al reiniciar el contenedor
In a Debian container, you can configure this permanently by using /etc/network/interfaces:
auto eth0
iface eth0 inet static
address 10.0.0.1
netmask 255.255.255.255
up /sbin/ip route add 192.168.0.1 dev eth0
up /sbin/ip route add default via 192.168.0.1
The problem here is that the veth interface appears in CT0 after VPS has started, therefore we cannot directly use the commands in the mount script. We launch a shell script (enclosed by { }) in background (operator &) that waits for the interface to be ready and then adds the IP route.
Contents of the mount script /etc/vz/conf/101.mount:
#!/bin/bash
# This script source VPS configuration files in the same order as vzctl does
# if one of these files does not exist then something is really broken
[ -f /etc/vz/vz.conf ] || exit 1
[ -f $VE_CONFFILE ] || exit 1
# source both files. Note the order, it is important
. /etc/vz/vz.conf
. $VE_CONFFILE
# Configure veth with IP after VPS has started
{
IP=X.Y.Z.T
DEV=veth101.0
while sleep 1; do
/sbin/ifconfig $DEV 0 >/dev/null 2>&1
if [ $? -eq 0 ]; then
/sbin/ip route add $IP dev $DEV
break
fi
done
} &
Make sure IPv4 forwarding is enabled in CT0
[host-node]# echo 1 > /proc/sys/net/ipv4/ip_forward
[host-node]# echo 1 > /proc/sys/net/ipv4/conf/eth0/forwarding
[host-node]# echo 1 > /proc/sys/net/ipv4/conf/veth101.0/forwarding
You can permanently set this by using /etc/sysctl.conf.
Si tienes dudas.. tira pa caa..
Simple configuration with virtual Ethernet device
Assuming that 192.168.0.0/24 is being used on your LAN, the following sections show how to configure a container for the LAN using veth.
Start a CT
[host-node]# vzctl start 101
Add veth device to CT
[host-node]# vzctl set 101 --netif_add eth0 --save
This allocates a MAC address and associates it with the host eth0 port.
Configure devices in CT0
The following steps are needed when the CT is not bridged to a CT0 network interface. That is because the CT is connected to a virtual network that is "behind" CT0. CT0 must forward packets between its physical network interface and the virtual network interface where CT is located. The first step below to configure the interface is not necessary if the container has been started, since the device will have been initialized.
[host-node]# ifconfig veth101.0 0
[host-node]# echo 1 > /proc/sys/net/ipv4/conf/veth101.0/forwarding
[host-node]# echo 1 > /proc/sys/net/ipv4/conf/veth101.0/proxy_arp
[host-node]# echo 1 > /proc/sys/net/ipv4/conf/eth0/forwarding
[host-node]# echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
Configure device in CT
The following steps show an example of a quick manual configuration of the CT network interface. Typically, you would configure the network settings in /etc/network/interfaces (Debian, see below) or however it is normally configured on your distribution. You can also comment or remove the configuration for venet0, if it exists, because that device will not be used.
[host-node]# vzctl enter 101
[ve-101]# /sbin/ifconfig eth0 0
[ve-101]# /sbin/ip addr add 192.168.0.101 dev eth0
[ve-101]# /sbin/ip route add default dev eth0
Notes:
Until you ifconfig eth0 it won't appear. When you do it will use the mac address netif_add added earlier
192.168.0.101 is chosen to be an unrouteable private ip address. Where 101 reminds you that it is node 101.
The "ip route" tells all traffic to head to "device eth0"
In theory you could use dhcpd with OpenVZ and dhclient to pick up an DHCP address from your router instead of hardwiring it
http://openvz.org/pipermail/users/2005- ... 00020.html
Add route in CT0
Since CT0 is acting as a router between its physical network interface and the virtual network interface of the CT, we need to add a route to the CT to direct traffic to the right destination.
[host-node]# ip route add 192.168.0.101 dev veth101.0
para que se quede al reiniciar el contenedor
In a Debian container, you can configure this permanently by using /etc/network/interfaces:
auto eth0
iface eth0 inet static
address 10.0.0.1
netmask 255.255.255.255
up /sbin/ip route add 192.168.0.1 dev eth0
up /sbin/ip route add default via 192.168.0.1
The problem here is that the veth interface appears in CT0 after VPS has started, therefore we cannot directly use the commands in the mount script. We launch a shell script (enclosed by { }) in background (operator &) that waits for the interface to be ready and then adds the IP route.
Contents of the mount script /etc/vz/conf/101.mount:
#!/bin/bash
# This script source VPS configuration files in the same order as vzctl does
# if one of these files does not exist then something is really broken
[ -f /etc/vz/vz.conf ] || exit 1
[ -f $VE_CONFFILE ] || exit 1
# source both files. Note the order, it is important
. /etc/vz/vz.conf
. $VE_CONFFILE
# Configure veth with IP after VPS has started
{
IP=X.Y.Z.T
DEV=veth101.0
while sleep 1; do
/sbin/ifconfig $DEV 0 >/dev/null 2>&1
if [ $? -eq 0 ]; then
/sbin/ip route add $IP dev $DEV
break
fi
done
} &
Make sure IPv4 forwarding is enabled in CT0
[host-node]# echo 1 > /proc/sys/net/ipv4/ip_forward
[host-node]# echo 1 > /proc/sys/net/ipv4/conf/eth0/forwarding
[host-node]# echo 1 > /proc/sys/net/ipv4/conf/veth101.0/forwarding
You can permanently set this by using /etc/sysctl.conf.
Si tienes dudas.. tira pa caa..
Re: Error en Proxmox
ahber mira. el ejemplo anterior es para enlazar la interfas de red fisica con el contenedor openvz, ojo que cambian cosas como por ejeplo el ID de los contenedores, tambien debes tener en cuanta algunos detalles como donde dice host-node(ahi se habla del host fisico) y donde dice ve-101(es el contenedor virtual)
ahora.. lo otro que debes hacer es entrar al contenedor de debian.
haslo asi
abre un terminal y pon este comando
vzctl enter 101 --- el 101 en mi caso es el ID del contenedor..
Luego que pongas esto ya entraras al sistema de la raiz del contenenor en el cual puedes modificar el source.list y demas cosas necesarias..
ahora.. lo otro que debes hacer es entrar al contenedor de debian.
haslo asi
abre un terminal y pon este comando
vzctl enter 101 --- el 101 en mi caso es el ID del contenedor..
Luego que pongas esto ya entraras al sistema de la raiz del contenenor en el cual puedes modificar el source.list y demas cosas necesarias..
Re: Error en Proxmox
tambien te recomiendo instalar un visor de escritorio remoto como remmina
claro que esta en linux. Es para que te puedas conectar ha escritorio remoto a las pc vituales asi como a los contenedores si lo deseas. Hai otra variante, instalado un plugin icecat con java y se accede por el navegador web, pero creeeme que lo probe y no me cuadra porque no es muy estable y lo otr que me consume muucho recurso.. digase micro.
claro que esta en linux. Es para que te puedas conectar ha escritorio remoto a las pc vituales asi como a los contenedores si lo deseas. Hai otra variante, instalado un plugin icecat con java y se accede por el navegador web, pero creeeme que lo probe y no me cuadra porque no es muy estable y lo otr que me consume muucho recurso.. digase micro.
Re: Error en Proxmox
donde escribo esos comandos en la pc virtual o en el proxmox?
Re: Error en Proxmox
haber.. se escriben en los 2.. primero.. dime algo.. que conocimiento tienes de GNU/LINUX
??
Eres un usuario limitado o uno avanzado?? Es para ayudarte>>
haber mira.. los comandos que llean adelante (host-node) esos se escriben el el host fisico.. o sea en el proxmox. Y los que dicen (ve-101) en el contenedor>!
la diferencia va en que los contenedores tiene diferentes ID tales como 100, 101 y asi susecivamente dependiendo cuantos tengas.
??
Eres un usuario limitado o uno avanzado?? Es para ayudarte>>
haber mira.. los comandos que llean adelante (host-node) esos se escriben el el host fisico.. o sea en el proxmox. Y los que dicen (ve-101) en el contenedor>!
la diferencia va en que los contenedores tiene diferentes ID tales como 100, 101 y asi susecivamente dependiendo cuantos tengas.
Re: Error en Proxmox
ya entendi, y soy un usuario limitado en linux
Re: Error en Proxmox
Wheno brother.. te voy ha hablar al estilo nuestro.. el oriental
Echa pa ca pa mi pincha un dia.. yo trabajo en San Antonio del Sur. ASi que si quieres puedes darte un volteo para que veas como he machucado el proxmox y cojas ideas..
O si no llamame al 877230 que es la Direccion Municipal de vivienda aqui en el municipio..
Y tu donde pinchas??? Me pareces conocido??
Echa pa ca pa mi pincha un dia.. yo trabajo en San Antonio del Sur. ASi que si quieres puedes darte un volteo para que veas como he machucado el proxmox y cojas ideas..
O si no llamame al 877230 que es la Direccion Municipal de vivienda aqui en el municipio..
Y tu donde pinchas??? Me pareces conocido??
Re: Error en Proxmox
por casualidad tienes algun jabber?, el mio es gilmar@divepgtm.co.cu
Re: Error en Proxmox
yo trabajo en divep y mi telefono es 21321383
Re: Error en Proxmox
mirael error que medio en el primer comando: root@pve:~# vzctl set 100 --netif_add eth0 --save
Configure veth devices: veth100.0
missing bridge parameter at /usr/sbin/vznetaddbr line 16.
/usr/sbin/vznetcfg exited with error
Error: failed to apply some parameters, not saving configuration file!
Configure veth devices: veth100.0
missing bridge parameter at /usr/sbin/vznetaddbr line 16.
/usr/sbin/vznetcfg exited with error
Error: failed to apply some parameters, not saving configuration file!