I created this cheatsheet to help me remember some useful kvm commands. There are two versions, the simplest one and the extended one. Commands shown in the cheatsheet are not all the existent ones, so please, read the documentation for more info.
Recently I tried to import a VMDK disc into a new VM using the old and commercial Citrix XenCenter 6.2 (build 1069). It created a process that hanged and a virtual machine kept running in the background.
I started the import process and selected DHCP as network configuration mode for the process of importing when I had no DHCP configured on the particular VLAN. This caused that the import process to get blocked and later it failed. Everything was fine until the network guy told me that he was receiving alerts from his switch that a certain MAC was trying to get IP by DHCP.
I checked in XenCenter all the VM’s and didn’t found the MAC. The mac was neither in the host.
Here is what I did:
Is the MAC assigned to your virtual switch?:
Which is the VM assigned to this MAC?:
Which is the name of the VM with this UID?:
uuid ( RO) : 071e54a2-0b3b-5e61-1f84-1f3575e49f8f
name-label ( RW): Transfer VM for VDI b660621f-6eeb-4e61-b2b4-a33a3b14c46b
power-state ( RO): running
Get more info about 071e54a2-0b3b-5e61-1f84-1f3575e49f8f:
Find the VDI:
[codesyntax lang="bash" lines="no" container="none" blockstate="expanded"]
[root@xenserver /]# xe vdi-list
uuid ( RO) : b660621f-6eeb-4e61-b2b4-a33a3b14c46b
name-label ( RW): Virtual Disk
name-description ( RW): Created by XenCenter Disk Image Import
sr-uuid ( RO): a2a537a6-10ce-15ad-389d-a8c54a5f2bc3
virtual-size ( RO): 32212254720
sharable ( RO): false
read-only ( RO): false
More info about the VDI:
uuid ( RO) : 70185847-43a5-b9c6-2964-f737f24f6e38
vm-uuid ( RO): 071e54a2-0b3b-5e61-1f84-1f3575e49f8f
vm-name-label ( RO): Transfer VM for VDI b660621f-6eeb-4e61-b2b4-a33a3b14c46b
vdi-uuid ( RO): b660621f-6eeb-4e61-b2b4-a33a3b14c46b
empty ( RO): false
device ( RO): xvdb
Stop&destroy the machine:
[root@xenserver /]# xe vm-destroy uuid=071e54a2-0b3b-5e61-1f84-1f3575e49f8f
I wanted to create some UML schemas for my understanding about Tivoli TSM internals.I couldn’t find any schema in IBM neither in the internet, so I created a simple script that, given a list of “table_name, column, type”, creates a very basic Gnome DIA diagram.
The query to create the input file for my script is:
or if you want only the tables for TSM Instance and not internal the tables for internal schemas:
Feel free to download and test the script. Call the input file “taules_columnes_tsm3” or modify dbdump variable in genera_tot() function. I didn’t tune it so its ugly but you can improve it if you want in a few minutes.
Attach to the daemon with gdb
- You’ll need to be root (or the owner of the daemon process).
- You’ll want to do this first part “briskly” since the daemon will be stopped until you give the “continue” command.
- This is reasonably invasive; be prepared to restart the daemon if something goes wrong.
In this post I’ll briefly show an use case of Alternatives command available in Fedora, Ubuntu, Debian, and other GNU/Linux flavours.
alternatives – maintain symbolic links determining default commands
If you want to create a custom link to some command or application on the Gnome3 activities menu, and you don’t want to install tools like Alacarte, just do the following:
1. Create a <name>.desktop in ~/.local/share/applications/
[lipi@i5-moll applications]$ pwd /home/lipi/.local/share/applications [lipi@i5-moll applications]$ cat oracle-task-input.desktop [Desktop Entry] Type=Application Name=Oracle Task Input Comment=Llança el gestor de tasques Oracle Exec=/home/lipi/projects/task_management.sh Icon=/home/lipi/projects/oracle-icon.png Terminal=false Encoding=UTF-8
And that’s all!
If you want to see the icons that are defined in the system, take a look into /usr/share/applications/
Recently I wanted to make a “black-box” style laptop limiting access to a non-privileged Linux user to only insert characters with the keyboard, this is: no ctrl+alt+del, only one tty, no graphical environment, no action for power, suspend, and other laptop buttons, no mouse, … so, only the keyboard input.
It is a very very easy thing.
Es ven pis a Ciutadella de Menorca – Illes Balears – Espanya, en bon estat, al centre del poble. Disposa de tres habitacions, dues dobles i una individual que es pot convertir en despatx, biblioteca, etc. Té un bany compartit amb banyera, cuina, sala d’estar – menjador amb llar de foc, entrada i un pati interior on hi ha el rentaplats, rentadora i pica.
Es ven per 150.000€.
Podeu veure una fotografia interactiva de la sala d’estar – menjador, i la cuina.
You just need to setup some iptables rules and turn on the ip_forward feature in the Linux kernel, assign some IPs and Routes and voila, your PC will become a router.
For example, suppose you have a laptop connected to Internet through a wifi card (let’s call it eth1) and you want to connect a PC to Internet through it, using an ethernet cable.
Interessant vídeo sobre el finançament i cultura de les Balears al llarg del temps.