Xen en CentOS 5.6 32 bits crear máquinas virtuales usando Xen

Para crear una máquina virtual (VM) nueva con la imagen o el template descargado:

1. Descomprimir el archivo.
2. Reubicar .cfg en /etc/xen
3. Reubicar .img en /xen
4. xm create vm01-centos.cfg
5. xm list (para ver el listado de nuestras máquinas Xen)
6. xm console vm01-centos (para ingresar a la consola de la máquina)

Acá abajo dejo pegado lo que aṕarece en el sitio http://www.stacklet.com/doc/filesystem/image_resize
Que sirve para agrandar el tamaño de la VM.

Enlarge an Image (.img) File

This HOWTO will allow you to increase the size of .img files distributed on Stacklet. Note that this process changes the on-disk image in place and hence it is highly recommended that you back up the image first. Also, make sure the image is not already mounted or backing a live domain or virtual machine! This process is *not* recommended for decreasing the overall size of an image and would likely cause the image itself to be corrupted if attempted.
Replace image_file and size_in_MB appropriately
# dd if=/dev/zero of=image_file bs=1M conv=notrunc count=1 seek=size_in_MB
# losetup /dev/loop0 image_file
# e2fsck -f /dev/loop0
# resize2fs /dev/loop0
# e2fsck -f /dev/loop0
# losetup -d /dev/loop0
Existe una forma alternativa de crear una máquina virtual que sea únicamente de CentOS bajo Xen utilizando los repositorios de CentOS:

[root@cloudmin01 ~]# virt-install --prompt
What is the name of your virtual machine? vm03-centos.img
 How much RAM should be allocated (in megabytes)? 512
 What would you like to use as the disk (file path)? /xen/vm03-centos.img
 How large would you like the disk (/xen/vm03-centos.img) to be (in gigabytes)? 20
 Disk /xen/vm03-centos.img is already in use by another guest!

Do you really want to use this disk (yes or no) yes
 What is the install URL? http://centos.arcticnetwork.ca/5.6/os/i386/

Luego comienza la instalación descargando todo del sitio de CentOS seleccionado en la url, hay incluso una opción para habilitar VNC y pasarse al modo gráfico si fuera necesario.
Se verá algo como lo siguiente:

Disk /xen/vm03-centos.img is already in use by another guest!
Do you really want to use this disk (yes or no) yes
What is the install URL? http://centos.arcticnetwork.ca/5.6/os/i386/
Starting install...
Retrieving file .treeinfo...                                                                                   |  412 B     00:00     
Retrieving file vmlinuz...                                                                                     | 2.2 MB     00:36  
Éxitos!

Comentarios

Entradas populares