Linux

Linux stuff

Sometimes we would like to access directly to the data of a XEN virtual machine just mounting the volume that act as physical device in the virtual machine, instead of booting it with a recovery cd, like in case of a faulty change in a configuration file inside the VM. Be careful!, this must be run stopping first the virtual machine. Let's start checking the name of the physical volume containing a linux virtual machine inside (it works with windows data, but check NTFS support in XEN first). [root@xenserver2 Read more...
Nowadays the hardisks are almost cheaper so creating a RAID1 is a good way to keep your data safe without waste too much money. If you have two disks with same size use them to create mirrored Storage Repository in XEN with the help of mdadm raid software, by default installed in a XEN distribution. SATA is always the best option to have a good I/O but as a test system IDE disks will be valid as well. Let's start. First, create the md devices in /dev # cd /dev # MAKEDEV md now create a RAID1 Read more...
Probably the funniest way of migrating a fully functional system is doing it while the system is up and running. You can migrate a live system to another remotely machine booted with a recovery cd that can be used to do a P2V (Physical to Virtual) or live system migration to  other physical one. To achive a network migration we can use the TCP/IP swiss army knife, NetCat (nc). First, boot a virtual machine or physical one with a recovery cd (like wifislax), be sure to have a disks with same Read more...
If your linux distribution comes with a "normal" vi editor (this means, whithout colored interface and reading), you can "upgrade" your vi with a more readable interface. Some versions before, after Vim5, vim supports syntax highlighting by default, but if it is not enabled, you can modify your .vimrc and add next lines: syntax on If using a dark background within the editing area and syntax highlighting turn on this option as well set background=dark And to have a jump to the last position Read more...
Let's imagine you have a .vmdk file with a virtual machine data inside and you want to migrate this disks, to a Xen source virtual machine... There are other "converters" provided by XEN, but this time we are going to do it manually. First, we can convert a virtual disk from preallocated to growable with this tool from VMware: # vmware-vdiskmanager -r vmware_image.vmdk -t 0 temporary_image.vmdk Install qemu (on Debian apt-get install qemu). You will need the qemu-img disk image manipulation Read more...