Jan 2 2009

Vacaciones

Las vacaciones vinieron y se fueron. Dejaron recuerdos, alegrías, asombro, festejos y cansancio. Va el relato:

Todo comenzó el viernes 19 de diciembre. No, más bien, todo comenzó el jueves 18, con mucho trabajo pendiente aún antes de poder irme sin preocupaciones. Después de salir tarde del trabajo, tratando de avanzar lo más posible, me resigné y preferí llegar el viernes muy temprano para terminarlo, sobre todo porque de todas maneras debía yo ir el viernes. Además, ya era hora de llegar a la casa para la cena con Álvaro. Pasé a comprar las botellas de vino para acompañar al fettuccine con salmón que Aline iba a preparar y Álvaro a aprender. La cena estuvo deliciosa como siempre y el vino no se quedó atrás. Nos pusimos a platicar mientras duró la botella y aún nos faltaba poner nuestra maleta. Luego de que Álvaro se retiró, comenzamos a preparar la maleta porque el viernes nuestro vuelo partía a las 2:45 pm. Pero además yo tenía que terminar otro documento para otro proyecto que traigo, por lo que después de terminar con los preparativos para el viaje, me puse a trabajar. Me dormí a las 3:30 am y me levanté a las 6 am. Tratando de verle el lado bueno, ya que ese día era el día que comenzaban las vacaciones, llegué a la oficina a las 7 am a terminar las cosas que dejé pendientes el día anterior. Salí a las 11 am y regresé a la casa. Preparamos la maleta, bañamos a Tristán, revisamos la lista de pendientes y cuando vimos que ya no nos faltaba nada, desayunamos. Tomamos el taxi y nos dirigimos al aeropuerto: dos largas horas de espera, hacer fila para documentar las maletas, Tristán feliz corriendo por todos los lugares a donde no está permitido pasar, comer comida carísima en el aeropuerto; lo normal en estos casos. Abordamos. Tratamos de mantener despierto a Tristán para que viera el avión pero media hora antes de subir cayó rendido. Cuando abordamos el avión lo desperté rápido para que viera el avión (le encantan) pensando que se dormiría nuevamente. Pues no. Se fue todo el vuelo (dos horas) despierto. El problema no es que estuviera despierto, sino que no hubo manera de convencerlo de estarse quieto y no echarse a correr por los pasillos. ¡Toda una hazaña! Al fin, y a pesar de todos los pronósticos en contra, llegamos a Cancún sin que Tristán hiciera del avión su patio de juegos.

Yo no nací para climas cálidos. Prefiero soportar el frío que aguantar el calor. Ya me había hecho a la idea de que me la iba a pasar con la ropa empapada de sudor y pegada al cuerpo. No fue tanto, aunque si es notable el cambio de clima. Nunca había ido al sureste mexicano. Todo mundo me hablaba maravillas de él. Además, tenía un interés especial por conocer Cobá. Hasta bromeaba diciendo que me iba a llevar mi banderita para ir a reclamar el legado de mis antepasados. Pues al fin estaba allá. Llegamos a las 5:30 pm y ya estaba oscureciendo. Esa noche solamente tuvimos tiempo de rentar un auto, cenar en un restaurante mega caro (aunque rico, eso sí) y hacer el check in en el hotel.

En realidad el viaje a Cancún era para asistir a la boda de Mariana, la mejor amiga de Aline, pero fue el pretexto perfecto para conocer esos lugares. La boda era hasta el lunes, lo que nos dejaba libres el sábado y domingo. Desgraciadamente muy poco tiempo para conocer tantos lugares, así que lo aprovechamos lo mejor que pudimos. El sábado nos levantamos temprano, desayunamos y nos fuimos a Tulum. Hermoso, irrealmente paradisiaco. El lugar más hermoso sobre este planeta. De todos los lugares a donde fuimos en estas vacaciones es el que más se me grabó en el alma. El mar es absolutamente hipnotizante. El aire y la vegetación junto con las ruinas sobre la tierra y la arena blanca de la playa le dan un toque mágico que te hace imaginar los tiempos cuando esta zona estaba poblada por sus habitantes originales. Debió se maravilloso vivir en un mundo así. Yo llevaba cargando a Tristán, quería cargarlo cuando viera por primera vez el mar. En algún momento, entre las ruinas, divisamos el mar azul y se lo señale a Tristán. No se que habrá pensado o si para el era igual de trascendente que para mi ese momento. Desde que llegamos a Tulum y comprábamos los boletos para entra a las ruinas arqueológicas comencé a sentir un imperioso deseo de ver el mar. Cada paso que nos acercaba cerca del mar hacia que fuera más grande e irresistible ese deseo. No se si la sangre llama, pero se lo que sentí y por eso cargué a Tristán, para que juntos sintieramos eso. Aline venía a mi lado, emocionada y feliz de estar ahí conmigo y con Tristán. Yo estaba más que feliz de estar ahí con ellos. Hasta ese momento no había comprendido la magnitud de esa visita. Finalmente llegamos a la orilla del mar. Y ahí, Tristán, Aline y yo contemplamos el mar milenario que tantos habían visto antes que yo. En el que tantos se habían sumergido regresado a la matriz del mundo. Definitivamente hay algo en el agua que encanta, que atrae. No aguanté más y sin esperar a los demás me bajé con Tristán las escaleras hasta la playa. Sentí la arena blanca tantas veces descrita. Tristán se empezó a poner nervioso con las olas, con la majestuosidad del mar. Cuando traté de ponerlo sobre la arena comenzó a llorar. Vimos las olas romper contra la arena, sentimos a arena, vimos el horizonte. Aline y sus papás llegaron y nos dispusimos a meternos al mar. Yo no lo pensé dos segundos y, nuevamente sin esperar a los demás, me metí al agua. ¡Oh maravilla! Volver a lo básico, a lo primitivo del hombre. A sus primeras experiencias con el mundo infinito, inabarcable e incomprensible, lleno de misterios y magia; cuando el hombre era más uno con el mundo que en esta época de aviones y compra de boletos a Cancún por internet. Salí por Tristán e intenté que se metiera al mar o que al menos se mojara los pies con las olas que llegaban a la playa. No hubo manera. ¡Vaya que es firme en sus decisiones este niño! Decidió que el mar era demasiado extraño para animarse. Lo cargué y me metí con él hasta que el agua le llegó a las rodillas mientras que yo lo cargaba. Lloraba asustado, así que lo regresé a la playa y se quedó ahí con sus abuelos jugando con la arena. Yo me quedé en el agua todo el tiempo. Aline me alcanzó. Pero el tiempo pasa muy rápido cuando eres feliz. Y llegó el momento de irnos. Me resistía a salir del agua, pero Cobá nos esperaba. Después de varios kilometros y un vuelta mal dado que nos llevo a visitar por accidente Yucatán, llegamos a la zona arqueológica de Cobá. Aline y yo subimos la pirámide Nohoch Mul, que es la principal de Cobá. Una vista impresionante desde arriba. Tomamos fotos, nos sentamos, entramos. También tomé 5 piedritas de la cima de la pirámide como gesto simbólico de la toma de posesión de mis terruños. :) Y de los de Tristán también.

Ese día en la noche fuimos a conocer Playa del Carmen, que es donde nos estuvimos quedando. Cenamos y nos fuimos a dormir.

El domingo nos fuimos a Xel-Há. Muy bonito, muchas actividades, mucha comida y bebida. Mucho buceo con Aline. Bajar el rio buceando con ella es uno de esos momentos memorables. Tristán maravillado viendo iguanas, delfines, tucanes y peces. El clima maravilloso, la comida muy rica, el sol muy agradable. En la noche ya estábamos muy cansados y solamente llegamos a dormir al hotel. Al día siguiente era la boda.

Boda en lunes. Inusual. Se nos hizo tarde y no encontrábamos la iglesia, pero llegamos justo al medio día y al medio de la boda. Después la fiesta en una palapa al lado del mar de Cancún. No pudimos entrar al agua, ya que íbamos muy bien arregladitos. Tristán hasta corbata azul se puso. Después de la fiesta, de la que nos retiramos como a las 8 pm porque el viento al lado del mar estaba imposible de soportar y menos con Tristán saliendo de una gripe, nos fuimos a una plaza comercial muy peculiar llamada La Isla. Ahí, después de darle la obligatoria vuelta para ver las tiendas, cenamos fondue de queso y vino (aunque no tan bueno como los que hace Aline) en un restaurante italiano.

Ya solamente nos quedaba medio día en Cancún y queriamos aprovecharlo, así que el martes muy tempranos nos fuimos a la playa de Playa del Carmen. No tan bonita como Tulum, pero bonita. Tristán nuevamente no se acercó al agua. Solamente Aline y yo. Los papás de Aline y Tristán se quedaron en las sillas jugando en la arena.

Finalmente regresamos al hotel a arreglarnos y hacer el check out. Entregamos el auto y nos llevaron al aeropuerto. Esta vez Tristán pudo ver el avión todo el tiempo y se durmió durante el viaje lo cual fue un par de horas de tranquilidad para nosotros. Llegamos a la Ciudad de México a las 9 con tráfico y toda la cosa. Solamente llegamos a aventar las cosas y preparar nuevamente la maleta porque ahora seguía Puebla.

Salimos a las 6 am, después de dormir 5 horas. Llegamos Aline, Tristán, mi mamá y mi primo a las 10am del 24 de diciembre. Justo a tiempo para iniciar los preparativos de la fiesta que se avecinaba. Al día siguiente se bautizaba mi sobrino.Pero antes, el 24 comimos y cenamos muy rico. Al día siguiente fue el bautizo y luego más comida rica. Ya para entonces resentíamos el cansancio, así que el viernes nos dedicamos a descansar.

Pero el sábado nuevamente a las andadas, nos fuimos a visitar el pueblo del que son originarios mi familia. En medio de las montañas de la sierra negra de Puebla, fuimos a visitar la casa donde crecieron mi mamá y mis tios. Muy tranquilo, muy relajante y muy lejos del bullicio de la ciudad. Regresamos de noche por una carretera que aunque de día parecía muy bonita por los paisajes, por las noches es muy peligrosa, ya que está absolutamente sin señalización. De hecho hay puntos donde no sabes en que carril vas y solamente te guías por las luces de los demás automóviles o de plano, donde no hay automóviles, por los gritos asustados de Aline de que ya estábamos saliéndonos de la carretera. :)

Para entonces ya extrañábamos muchísimo nuestra propia cama. Tristán ya estaba harto de tanto viajar en coche y además el lunes regresaba yo a trabajar, así que el domingo al medio día tomamos camino nuevamente a la Ciudad de Mexico. Y para terminar con broche de oro estas vacaciones, con el cuerpo muerto de cansancio y con ganas de llegar y acostarnos, nuestra casa nos recibió con los brazos abiertos y un tiradero que exigía limpieza inmediata. Ni modo, a limpiar. Como a las 8 de la noche terminamos y nos pusimos a ver una película, tomarnos una cerveza y descansar lo poco que se pudiera de estas ajetreadas pero muy divertidas y memorables vacaciones antes de regresar a la rutina de siempre y al trabajo.


Dec 30 2008

Seaside, Gemstone/S, KVM and Debian Lenny amd64

Here are the posts for using Seaside and Gemstone/S under KVM on Debian Lenny amd64:

Goodbye VirtualBox, welcome KVM/virt-manager

Create a Virtual Machine with Debian Etch amd64 on KVM with virt-manager

Install Gemstone/S 64 on a KVM virtual machine

Install Squeak/Seaside on a KVM virtual machine

Development environment for Seaside

Enjoy.


Dec 15 2008

Returning to WordPress

After giving MovableType a very long try, we finally decided to switch back to WordPress. We found some things we didn’t like:

  • Not easy way to add a blogroll (it is just a link, man!)
  • Slow workflow from login to publish post
  • Few choices for themes
  • Problems with the non-commercial/commercial/enterprise scheme of licensing
  • Good plugins costs $$$

After using both, we think that, although MT is now an open source project, it needs more time to reach the usability and feature level of WP.


Nov 28 2008

Development environment for Seaside

This is my development environment for Seaside.

One virtual machine (vm1) is for Seaside over Squeak development. I work here most time, forwarding X to my host machine and testing the application by pointing to http://vm1:8080/seaside/myapp. Details here.

The second machine (vm0) is for testing integration of my Seaside application on Gemstone/S 64. After loading my app to Gemstone I test the app by pointing to http://vm0:8080/seaside/myapp. Details here.

Finally, in my host machine I have Debian GNU/Linux 5.0 amd64 (Lenny) for my every day work (writing docs, hearing music, watching videos, browsing internet, writing blog posts, IM, etc). Also, from my host machine I can fire the stress tools to test either the load capacity or the load balancing of the application.

Advantages:

  • I start the virtual machines only when I need them.
  • My host laptop boot time it is minimal.
  • I don’t have to create a 32 bit chroot inside my laptop
  • I have a clean 32 bit Debian and a clean 64 bit Debian for other uses
  • I can test having the static content in a virtual machine and the application in other and use a proxy to redirect to the correct machine.
  • I can test having my application behind a proxy
  • I can test load balancing of my servers

Disadvantages:

  • More machines to administer
  • More configuration and setup involved
  • You need a 64 bit machine and a decent amount of RAM and a capable CPU (I have 4GB RAM and a AMD Turion 64 X2 CPU)
  • You need to be comfortable administering several machines

But, for me, it works. Maybe it can work for you too.


Nov 27 2008

Install Squeak/Seaside on a KVM virtual machine

Host Machine
Architecture: x86_64
Name: laptop
OS: Debian GNU/Linux 5.0 amd64 (Lenny)
Virtual Machine
Architecture: i386
Name: vm1
OS: Debian GNU/Linux 4.0 i386 (Etch)
Virtual Machine Software
GemTools 2.3
Seaside One Click Experience 2.8.3

Install the virtual machine following this
instructions. Be sure to select CPU Architecture: x86_64, but install a 32 bit OS.
After installation add the IP address assigned to the virtual machine to
/etc/hosts on the host machine.

I have only installed the Starndard System. That is, no X or desktop environment. Why, because I want to forward X and use my host machine as the X server.

In the virtual machine, install the package xbase-client. This package and its dependencies are the minimal packages necessary to forward X apps to another server. As root:

vm1:~# aptitude install xbase-clients

Now, log out and login again but with a different syntax. Instead of

miguel@laptop:~$ ssh vm1

Log in with the -X option enabled (you can make this option enabled always in .ssh/config. See the man page from ssh)

miguel@laptop:~$ ssh -X vm1

And proceed to download Seaside and the GemTools:

miguel@vm1:~$ wget http://www.seaside.st/distributions/Seaside-2.8.3.app.zip

miguel@vm1:~$ wget http://seaside.gemstone.com/squeak/GemTools-2.3.zip

Unzip them and try them.

Seaside:

miguel@vm1:~$ unzip Seaside-2.8.3.app.zip
miguel@vm1:~$ cd Seaside-2.8-578.app/
miguel@vm1:~/Seaside-2.8-578.app$ ./Seaside.sh

You should see the Seaside Squeak image open as a window on your host machine X server.

The same applies to the GemTools Squeak image. But before trying to connect to the remote Gemstone/S server, you must do some tasks:

1. Add the remote server IP to the virtual machine /etc/hosts. In my case I’m going to connect from vm1 to vm0 (the Gemstone/S server) so I added this line to vm1’s /etc/hosts:

192.168.122.137 vm0

2. You need to add

# Local services
gs64ldi 50377/tcp # Gemstone netldi

to your virtual machine’s /etc/services file. This is because GemTools use this name instead of the port number to connect to Gemstone/S. If you don’t add this line, you must use the port number in the Login window of the GemTools image.
After doing this changes, unzip the GemTools and start the image:

miguel@vm1:~$ unzip GemTools-2.3.zip
miguel@vm1:~$ /home/miguel/GemTools-2.3.app/GemTools.sh

You must start the image using the full path to the script or the connection won’t work because of a softlink pointing to a nonexistant directory. In the Gemstone/S Login window from the GemTools image, write vm0 in the Stone section’s “!tcp@” parameter and in the Gem section’s “!tcp@” parameter. Make sure the Gemstone/S is running on your server and press the Login button. You shouldn’t have any problem.

These instructions are an adaptation from Dale Henrichs and James Foster ones.

There is something very important to have in mind. You are working ON THE REMOTE (virtual machine in this case) machine. You are ONLY viewing the graphics on the local X server. If you modify something, you’re modifying it in the remote machine. Also, the network address, this will be resolved from the perspective of the remote machine. Don’t forget it.

As you can see, by using a 64 bit KVM virtual machine on your x86_64 hardware with a 32 bit OS, you can run a squeak image on a 32bit squeak virtual machine without any problem. What is more, in the case of Debian, you don’t have to create a 32 bit chroot inside your amd64 installation. Very clean.

Enjoy.


Nov 27 2008

Install Gemstone/S 64 on a KVM virtual machine

This instructions are very similar to the slicehost setup from James Foster’s post, but this time on a KVM virtual machine.

Host Machine
Architecture: x86_64
Name: laptop
OS: Debian GNU/Linux 5.0 amd64 (Lenny)
Virtual Machine
Architecture: x86_64
Name: vm0
OS: Debian GNU/Linux 4.0 amd64 (Etch)
Virtual Machine Software
Gemstone/S 64 Web Edition 2.3

Install the virtual machine following those instructions. Add the IP address assigned to the virtual machine to /etc/hosts on the host machine. Log in to the virtual machine and, as root, add your normal user to the sudoers file

vm0:~# visudo

The last lines of the file should be like this:

# User privilege specification
root ALL=(ALL) ALL
miguel ALL=(ALL) ALL

Save changes and as normal user on the virtual machine, download Gemstone/S (Note: this instructions are identical to the ones from James Foster’s post);

miguel@vm0:~$ wget http://seaside.gemstone.com/scripts/installGemstone2.3-Linux.sh
miguel@vm0:~$ sh installGemstone2.3-Linux.sh

This will ask for your user password and then will download and install Gemstone/S 64 Web Edition to the virtual machine’s /opt/gemstone.

Reload your sysctl changes. Either running:

miguel@vm0:~$ sudo sysctl -p

or rebooting the virtual machine:

miguel@vm0:~$ sudo reboot

Log in again to the virtual machine if needed and execute:

miguel@vm0:~$ echo “SHR_PAGE_CACHE_SIZE_KB = 100000;” >> /opt/gemstone/product/seaside/data/system.conf

Start the start the Gemstone/S 64 Web Edition:

miguel@vm0:~$ source /opt/gemstone/product/seaside/defSeaside
miguel@vm0:~$ startGemstone
miguel@vm0:~$ startSeaside_Hyper 8080

And, from your host machine, test Seaside by pointing your web browser to:

http://vm0:8080/seaside

To stop Hyper press Ctrl+C and then stop Gemstone:

miguel@vm0:~$ stopGemstone

That’s all.


Nov 25 2008

Create a Virtual Machine with Debian Etch amd64 on KVM with virt-manager

This is the way I create virtual machines using KVM and virt-manager on my Debian Lenny 64 bit laptop:

  • I will create a 64 bit virtual machine
  • I will install Debian Etch 64 bit
  • I will install a Standard system. After installation I will install the required software as needed.
  • The machine will have a dynamic growing image file.
  • I will use the default network provided by virt-manager (see this). This means that:
    • the laptop (the host machine) will get a second IP address (192.168.122.1) that will be the default router for the virtual machines
    • the virtual machines will get addresses in the range 192.168.122.2 - 192.168.122.254
  • I will create a pair of ssh keys to log in to the machine without password

Here we go:

1. Make sure you have hardware virtualization enabled on your BIOS.
Search google for the instructions

2. Install KVM and virt-manager
Follow this instructions

3. Open virt-manager and connect to localhost

4. Start the network if you don’t have it configured for autostart
On the localhost host machine, select “Details” and then the “Virtual networks” tab. Select the “default” network and press the “Start” button.

5. Create a new virtual machine
On the localhost host machine, select “New”

6. “Naming your virtual system” window
Name your virtual machine, for example kvm

7. “Choosing a virtualization method”
I don’t have Xen, so the “Paravirtualized” options is disabled.
With “Fully virtualized” you can emulate a wider range of CPU architectures. In this time we are only interested in the x86_64 architecture. So we choose CPU Architecture: x86_64 and Hypervisor: kvm.

8. “Choosing installation method”
Here we choose the source installation media. I have an ISO image file from Debian Etch amd64, but you can also use networks install trees over HTTP, FTP or NFS or directly boot with PXE from a network server. When you chose OS Type and OS Variant, virt-manager preselects sensible defaults for the virtual machine, like ACPI support. We choose OS Type: Linux and OS Variant: Debian Etch.

9. “Locating installation media”
If you selected local install media in the previous step, you must choose either the ISO image location or the CD-ROM/DVD device where the install media resides. If you chose another option in the previous step, this window will differ. Enter the correct parameters here.

10. “Assigning storage space”
We choose “Simple File” unless you want to use a spare disk partition for your virtual machine. Select the File Location where you want your virtual machine image to reside and select an appropriate File Size. I left the defaults untouched. Uncheck the option “Allocate entire virtual disk now?”. This way the disk will grow as needed, unless you run out of disk space in your host machine.

11. “Connect to host network”
Unless you know what you are doing, do like me and choose “Virtual Network”. Select the “default” network from the list.

12. “Allocate memory and CPU”
Select the amount of RAM that you want to assign to the virtual machine. I wrote 256M both for VM Max Memory and VM Startup Memory. For VCPU choose the number of CPUs for the virtual machine. I chose 1 VCPU.

The image will be created and the virtual machine will boot up. By default virt-manager doesn’t open a VNC connection to the newly created machine. Double click the machine from the list below localhost to open it.
Follow the installation as always. Create a normal user (I created a user named miguel) and in the window titled “Software Selection” select the packages you want to install (I only left “Standard system” selected; after install you can install more software with aptitude). When the installation is over, it will reboot and you should log in without problems. As root check the IP assigned by the KVM DHCP. Mine has 192.168.122.137.
Now, in your host machine, add a new line for the virtual machine to your /etc/hosts. This is mine:

127.0.0.1 localhost
127.0.1.1 laptop.localdomain laptop
192.168.122.137 kvm

Save it and check that you can reach the virtual machine.

# ping kvm

should respond the pings.

Now, as the normal user from the host machine, create a pair of keys. Accept the default path for the keys and leave the passphrase empty.

miguel@laptop:~$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/miguel/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/miguel/.ssh/id_rsa.
Your public key has been saved in /home/miguel/.ssh/id_rsa.pub.
The key fingerprint is:
70:b5:bf:39:e4:4d:14:1d:ad:c6:f0:1f:c7:8f:26:15 miguel@laptop

This should have created 2 files inside .ssh/ in your home directory: id_rsa and id_rsa.pub
Now copy your identity to the virtual machine:

miguel@laptop:~$ ssh-copy-id kvm
miguel@kvm’s password:

Write your password and the key will be copied to the virtual machine. Test that you can log in without password:

miguel@laptop:~$ ssh kvm
Linux kvm 2.6.18-6-amd64 #1 SMP Wed Oct 15 10:07:11 UTC 2008 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Nov 25 16:08:19 2008 from laptop
miguel@kvm:~$

There you have it. A virtual machine running from KVM, with hardware virtualization, a minimal install and that you can log in without password.

You can also create a virtual machine and host a 32 bit OS. Just follow the previous steps but instead of installing from a Debian Etch amd64 ISO image, install from a Debian Etch i386 ISO image. That is, select a 64 bit virtual machine but install a 32 bit OS. This works for any operating system.

Of course you can choose CPU Architecture: i686, but the only hypervisor available will be qemu that will emulate by software (instead of doing hardware virtualization) the i386 (or sparc or ppc) architecture. This can be potentially slower than hardware virtualization.

Enjoy!


Nov 25 2008

Segundo aniversario

Hoy hace dos años me casé con Aline.
Hemos vivido muchas cosas que nos han hecho  estar más juntos, más unidos. Nos hemos conocido más el uno al otro también. Hemos reido, llorado, bailado, jugado, comido, bebido, divertido como nunca antes lo habiamos hecho. Y eso es lo maravilloso de lo que tenemos: lo profundo de nuestra fusión, de la comprensión del otro que cada uno de nosotros ha descubierto. Eso nos hace fuertes y al mismo tiempo nos da seguridad. No sé como sean otras parejas, pero sé, con certeza absoluta, que esto es lo más maravilloso que me ha pasado.
Soy muy feliz con mi familia, con Aline y con Tristán y esta fecha conmemora el inicio de esa felicidad.


Nov 22 2008

Boda

Al fin le llegó el día a Talina.
Se casa.
Con Markus.
Y habrá pachanga.
Y vestido y perfume.
También abrazos y buenos deseos.
Y cuentan que una luna de miel en Cancún.

Así que en nombre de mis amigos y mi familia, les deseamos a Talina y Markus:

MUCHAS FELICIDADES Y NUESTROS MEJORES DESEOS.

Congratulations Herr Wagner and Frau Eslava.


Nov 22 2008

Goodbye VirtualBox, welcome KVM/virt-manager

In fact I don’t have anything against VirtualBox, either the full version or the OSE version. What is more, it is a wonderful piece of software and it never gave me any serious problem. The interface it is one of the most friendly and easy to use that I have found.
In spite of that, I felt that VirtualBox was more focused to the user having a couple of virtual machines running for short periods of time (note: It never had a problem when I let it run several days continuously) than aimed to the datacenter where there are dozens of vms running uninterrupted.
On the other side, when I wanted to have a 64bit guest (in times of VirtualBox 1.5, version 2 supports 64 bit guests and hardware virtualization without problem) it didn’t have support for it. So, searching I found KVM and, in principle at least, it had the same functionality than VirtualBox. But it had some additional very interesting. For example, the ability to migrate the vm (while running) from one host to another. Or at least so they said. The problem. It didn’t have a decent GUI. All controlled by the command line. Of course I don’t have any problem with that, as my blog title very clearly states. But for some simple activities, the number of parameters to write was very overwhelming and, accustomed to VirtualBox simplicity, it was too much typing.
Well, this guys at Red Hat have created virt-manager. And it really aimed high in order to easy the management of vms. I am glad that they are succeeding in their goal, because virt-manager it is ready to take the datacenters by storm. In fact, Ubuntu 8.10 it is fully committed to the virtualization trend and virt-manager it is the tool they chose.
Well, enough words, I want to say to the VirtualBox team, thank you very much, your software it is marvelous and have showed what it is possible. At the same time I say welcome to KVM/virt-manager that, by the way, it is completely integrated to the Linux kernel and in the long term this will result in a very strong contender in the virtualization arena.

So, I followed the instructions from the debian wiki:

# aptitude install kvm virt-manager

Added myself to the libvirt group:

# adduser miguel libvirt

According to the instructions you must now log out and log in in order to use virt-manager and start creating vms for the dozen. But no, there is something you must do before. You must fix the network for virt-manager. Keep reading.

First stop dnsmasq:

# /etc/init.d/dnsmasq stop

Disable autostart for it editing /etc/default/dnsmasq and changing:

ENABLED=1

to

ENABLED=0

This is because virt-manager and libvirtd will start the dnsmasq with the appropriate configuration and the default config for dnsmasq conflicts with it and prevents the “default” network from virt-manager to start.

Now, log out, log in again, restart the libvirtd (or restart the machine) in order to the changes to take effect.

If everything works ok, you should see something like this in your processlist:

$ ps ax|grep dnsmasq
14482 ?        S      0:00 dnsmasq –keep-in-foreground –strict-order –bind-interfaces –pid-file  –conf-file  –listen-address 192.168.122.1 –except-interface lo –dhcp-leasefile=/var/lib/libvirt/dhcp-default.leases –dhcp-range 192.168.122.2,192.168.122.254

If you see a dnsmasq process with status Z (zombie), then review your configuration and the instructions.

Ok, with dnsmasq working correctly, start virt-manager as your user and try to connect to the localhost machine you’ll see in the virt-manager window. Before creating the first virtual machine, we must start the network. Click the “Details” button, after selecting localhost and you’ll see the “Host Details” dialog box. Select the “Virtual Network” tab. There you’ll see the “default” network in an inactive status (it only appears if you are connected to the machine). Start it. Now you can create your virtual machines without problems.

As you can see, the “default” network isn’t configured to autostart itself. And after a while, you get tired of starting it before running or creating a vm. To enable autostart, run the following in the command line (because I didn’t find a way to do it with the GUI):

$ virsh net-autostart default

From now on, the network will always start with the libvirtd.

Now, grab your prefered OS instalation CDs and proceed to create all the virtual machines you want.

Right now we have only used the functionality to create virtual machines in a analogous way to VirtualBox, but if you check the documentation for KVM and virt-manager, you’ll see that you can have a lot of host machines, remotely managed, where you can create virtual machines on demand. Also, you can monitor the resources consumed; start and stop the machines and to configure some kind of network storage for your virtual machines to use. Very enterprisey isn’t? Check the output of

$ virsh help

to have an idea that will come.