Monday, September 30. 2013KVM for Debian GNU/Linux![]() ![]()
KVM stands for Kernel based Virtual Machine, is the official virtualization system to Linux kernel, it is implemented as a Linux kernel module and becomes the running Linux in an hypervisor.
Without going deep, the virtualization systems can be divided in some groups: -Emulation: VM simulates the full hardware, you can manage new hardware but you get low performance (qemu) -Full virtualization: similar to the first one but OS's in guess machines will have to be from the same architecture (VirtualBox, KVM, XEN + VT, VMWare, Hyper-V) -Paravirtualization: VM has the same architecture, high performance, no VT required. Cons: you need to modify host machine (with a Linux kernel module) (XEN, KVM, Hyper-V) -OS level virtualization: there are some examples LXC, OpenVZ, FreeBSD Jails, ... (thanks to @JavierCelaya) LXC stands for Linux Containers see more info in its home page. FreeBSD Jails allows to split a FreeBSD box into virtual environments running on the host machine called jails. INSTALL WINDOWS7 (a perfectly legal one, of course ![]() As use case to introduce KVM I'm going to explain the installation process from virt-manager tool of Windows 7, feel free to use virt-install command to make the same process. Before starting to install Windows 7 it's necessary install some packages to be able to use KVM on Debian GNU/Linux, here is the command used:
Let start with the set up process: Select Create a new virtual machine option. NOTE: If virt-manager detects that there is created img files with the same name of the new virtual machine it shows a message: The following storage already exists, but is not in use by any virtual machine:/var/lib/libvirt/images/windows7.img IMPORTANT: Check customize configuration before install option Just as simple advice it would be fine check Advanced options, here we could play with network settings (perhaps I'll talk about this in a future blog entry) When you press Finish button a window appears to setup new hardware or remove the existing one, in our case I want to add other ISO image with libvirtio drivers to Windows7 see Virtio. NOTE: In add hardware window if you select a hardware you'll get the following error, I don't know why but it seems that XML properties related to the virtual machine are not completely written. Error refreshing hardware page: unsupported operand type(s) for /: 'NoneType' and 'int' Press add hardware option, select managed or other existing storage Why install these drivers? Para-virtualized drivers enhance the performance of fully virtualized guests. With the para-virtualized drivers guest I/O latency decreases and throughput increases to near bare-metal levels. It is recommended to use the para-virtualized drivers for fully virtualized guests running I/O heavy tasks and applications. From here. You could download drivers file from here. Now we can press Begin Installation button. Just remember that you will have to select the virtio drivers from the extra storage that previously it has created, when Windows7 install process let you do it Custom Advanced > Load Driver > Browser. Some useful commands (thanks @FranLopez): Mount the CD-ROM iso (taking into account CD-ROM as IDE device):
Change the CD-ROM:
Remove the CD-ROM:
MISSING POINTS 1. Assigning Host USB device to a Guest VM take a look to this URL. 2. You could improve disk I/O permance reading links like this. 3. And last but not worst if you need make a snapshop or convert an img storage file you could read this page. REMOVE PREVIOUS WINDOWS7 INSTALLATION I include this point in my entry because it could useful to know how remove virtual machines when you are doing tests with KVM. $ virsh --connect qemu:///system undefine windows7 If you have virt-manager opened you will see as after executing the previous command the virtual machine windows7 disapears from the list of managed virtual machines.It's not necessary to say that I'm not a virtualization expert, with this post I only want to collect some information about KVM that I've used installing some Windows virtual machines. --- Stay hungry, stay foolish S.J. Sunday, January 29. 2012Novag Citrine under Debian GNU/Linux![]() ![]() ![]()
This is my first blog entry and I'd like to explain the steps that I followed to play chess with my Novag Citrine connected to my Debian GNU/Linux wheezy box.
The main reason to connect Citrine with the PC is able to store my games against the machine and this way I can analyze all movements and learn what I did wrong. Moreover you could choose other engines installed in your PC (GNU Chess 4/5, Crafty, Sjeng, ...) to play your games using citrine board as a simple interface, even play on Free Internet Chess Server with the board. Really it's not very difficult achieve that Citrine 'talk' with GNU/Linux, mainly because there is a user space driver developed by Maximiliano Pin here that works very well, so in this entry I only want to collect instructions, step by step, followed in my system. 1. Download novagdrv driver from here: $ wget http://download.savannah.gnu.org/releases/novagdrv/novagdrv-0.3.tgz 2. In order to verify program which we just downloaded, we must download the project keyring from here File downloaded novagdrv-keyring.gpg 3. Import project keyring (public keys from project members) into your public key store. $ gpg --import novagdrv-keyring.gpg 4. Verify downloaded file: $ gpg --verify novagdrv-0.3.tgz.sig novagdrv-0.3.tgz 5. After verify successfully this file we are going to decompress and compile the driver. $ tar xvzf novagdrv-0.3.tgz 6. When we take a look in current directory we discover that novagdrv binary file has been created, and we move binary file into a /usr/local/bin, for example (any place inside our PATH environment variable): # mv novagdrv /usr/local/bin 7. The driver uses /dev/ttyS0 as default COM device, so if we connect Citrine to other device we previously must create a text file $HOME/.novagdrvrc with this content: device=/dev/ttyUSB0 We could use a USB to serial RS232 adapter if your computer hasn't a COM device. 8. In order to test the driver you can connect Citrine and run the binary file and if all it's OK you'll see the movements made in the board written on the terminal. $ novagdrv & Once driver works we need applications to analyze and play games. In the first place we are going to install ChessDB. CHESSDB First of all we download sources from here. We should get MD5 and SHA1 fingerprints from its download page. MD5: 6aee2e4eca26576cbe6e63dc6b8d55db 1. Again we check downloaded file integrity. $ echo "6aee2e4eca26576cbe6e63dc6b8d55db ChessDB-3.6.18.tar.gz" > chessdb.md5 Also we can check with SHA1 checksum, although obviously it's not necessary verify twice downloaded file. $ echo "456ff217ebdb0f6231a507ce737747c964f77f6e ChessDB-3.6.18.tar.gz" > chessdb.sha1 2. Decompress and apply patch found with novag user space driver: $ tar xvzf ChessDB-3.6.18.tar.gz Be sure that our system satisfies all software requirements to be able to compile sources files, in my case I had to install two packages: # aptitude install tcl8.5-dev tk8.5-dev If you want to test your Tcl/Tk version you can run: $ tclsh 3. Edit configure script to add a new location for X11 libraries (I had forgotten to say that my Debian is 64 bits version):
And that's all to ChessDB Debian installation $ chessdb Tools -> Novag Chess Computer. EBOARD Installation procedure to Eboard is very similar to the previous one so we're going to comment only some steps. Download source code from here 1. Apply novag patch: $ tar xvjf eboard-1.1.1.tar.bz2 2. Prepare to compilation process (note that previously I had to install libgtk2.0-dev debian package): $ ./configure 3. My dirty solution at this point to fix the problem was to remove 'const' restriction in append method editing two files ntext.h and ntext.cc: $ vim ntext.h 4. Now it's time to install eboard-extras package to avoid eboard doesn't find some resources:
$ eboard -novagport /dev/ttyUSB0 Now it's time to enjoy your Citrine! --- Man, the living creature, the creating individual, is always more important than any stablished style or system Preserving the art and philosophy of Jeet Kune do
(Page 1 of 1, totaling 2 entries)
|
Calendar
QuicksearchBlog AdministrationPowered byStatisticsLast entry: 2013-09-30 19:10
2 entries written
2 comments have been made
Recent Entries
|