proxmox
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
proxmox [2012/04/16 19:30] – jose | proxmox [2015/07/27 09:10] (current) – jose | ||
---|---|---|---|
Line 9: | Line 9: | ||
{{proxmox_template2.png|Template}} | {{proxmox_template2.png|Template}} | ||
+ | |||
+ | Nos descargamos la imagen que necesitemos: | ||
+ | |||
+ | {{proxmox_template3.png| Template}} | ||
+ | |||
+ | ===== Descargar manualmente ===== | ||
+ | Los templates de containers se guardan en: / | ||
+ | Por ejemplo en: / | ||
+ | |||
+ | Des de esta URL podemos descargarlos y copiarlos ahí: | ||
+ | |||
+ | http:// | ||
+ | |||
+ | http:// | ||
+ | |||
+ | |||
+ | |||
+ | ====== Sistema ====== | ||
+ | Instalar el paquete: | ||
+ | module-init-tools | ||
+ | para tener por ejemplo lsmod | ||
+ | |||
+ | |||
+ | ====== Comandos ====== | ||
+ | Listar los contenedores arrancados | ||
+ | < | ||
+ | root@proxmoxescorxador:/ | ||
+ | CTID NPROC STATUS | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | Listar todos los contenedores: | ||
+ | < | ||
+ | root@proxmoxescorxador:/ | ||
+ | CTID NPROC STATUS | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | Arrancar contenedor: | ||
+ | # vzctl start 103 | ||
+ | |||
+ | Starting container ... | ||
+ | Container is mounted | ||
+ | Setting CPU units: 1000 | ||
+ | Setting CPUs: 1 | ||
+ | Configure veth devices: veth103.0 | ||
+ | Adding interface veth103.0 to bridge vmbr0 on CT0 for CT103 | ||
+ | |||
+ | Conectar a la consola por ssh desde el servidor de proxmox: | ||
+ | |||
+ | # vzctl enter 103 | ||
+ | |||
+ | entered into CT 103 | ||
+ | root@vpn1escp:/# | ||
+ | |||
+ | |||
+ | ====== Cambiar IP ====== | ||
+ | |||
+ | Depnde contenedor, creamos fichero / | ||
+ | |||
+ | < | ||
+ | allow-hotplug eth0 | ||
+ | auto eth0 | ||
+ | iface eth0 inet static | ||
+ | address 192.168.1.104 | ||
+ | netmask 255.255.255.0 | ||
+ | gateway 192.168.1.1 | ||
+ | |||
+ | allow-hotplug eth1 | ||
+ | auto eth1 | ||
+ | iface eth1 inet static | ||
+ | address 10.139.67.104 | ||
+ | netmask 255.255.255.224 | ||
+ | |||
+ | up route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.139.67.97 dev eth1 | ||
+ | </ | ||
+ | |||
+ | |||
+ | ====== Ubicació màquines ====== | ||
+ | root@proxmoxescorxador:/ | ||
+ | |||
+ | ====== NFS ====== | ||
+ | Hay que habilitar el NFS al contenedor: | ||
+ | # vzctl set 102 --features " | ||
+ | | ||
+ | ====== Cambiar hora ====== | ||
+ | ln -s / | ||
+ | | ||
+ | ====== Debian 64 bits ====== | ||
+ | Hay un bug con el template de debian 64 bits que desistala upstart para instalar initctl al hacer dist-upgrade, | ||
+ | .init: timeout opening/ | ||
+ | hay que marcar el paquete así: | ||
+ | echo upstart hold | dpkg --set-selections | ||
+ | | ||
+ | ====== KVM ====== | ||
+ | |||
+ | |||
+ | root@proxmoxescorxador: | ||
+ | |||
+ | VMID NAME | ||
+ | 106 mik1escp.matarosensefils.net running | ||
+ | 108 voip2escp.matarosensefils.net stopped | ||
+ | 109 voip3escp.matarosensefils.net stopped | ||
+ | |||
+ | root@proxmoxescorxador: | ||
+ | | ||
+ | ====== Montar recursos ====== | ||
+ | Directorio configuración y recursos montados: | ||
+ | / | ||
+ | |||
+ | Ejemplo: | ||
+ | 102.mount | ||
+ | |||
+ | < | ||
+ | #!/bin/bash | ||
+ | if [ ! -e / | ||
+ | mount -n -t simfs /mnt/sdc / | ||
+ | |||
+ | if [ ! -e / | ||
+ | mount -n -t simfs /mnt/sdd / | ||
+ | |||
+ | if [ ! -e / | ||
+ | mount -n -t simfs /mnt/sdd2 / | ||
+ | </ | ||
+ | |||
+ | |||
+ |
proxmox.1334604601.txt.gz · Last modified: 2015/04/13 20:19 (external edit)