Undertake with CoLinux fictitious change
Tuesday, March 03, 2009 by rain
At present,With VmWare, Xen and Kernel-based Virtual Machine (KVM) undertake fictitious change very popular.But,Whether do you know to also can let Linux%26reg;With Microsoft%26reg;Windows%26reg;Have club?Article discussion Cooperative Linux (CoLinux) ,Introduce simply above all fictitious change,The way that talks CoLinux to use next.If where to be installed on Windows and run CoLinux,you still can understand.
When considering GNU/Linux and Microsoft Windows,The problem that cooperation may be final consideration,But the special skill that this is CoLinux kernel.To this self-distrust?That jumps " the advantage of CoLinux " .
A port that CoLinux is Linux operating system,It is carried out as a process in Microsoft operating system.Two kinds of operating systems are passed central processing unit (CPU) control advantageous position makes over to each other cooperation,Place of the 1 that be like a graph is shown.
Graph 1. Microsoft Windows and Linux are in CoLinux cooperation
Through using kernel driver,Still can share the physical resource such as network interface.This issue can discuss deep from the back.Above all,Look in light of us fictitious the meaning that change.
Fictitious change
Fictitious change a field
The article basically pays close attention to a kindPlatform is fictitious the synergic solution that change,But fictitious change this word to also apply at other technology.For example:In memory respect,Can a lot of disk fictitious change,Let them look like pool of a memory,Such OK space of storage of distribution according to need.Still can undertake to the network fictitious change,But this often is calledDivisional (Zoning).OS is fictitious change,This is one kind is compared simple fictitious change a form,It undertakes to the server that moves on an operating system fictitious change.
Fictitious change (Virtualization)It is a vocabulary that is abused.In the context of the article,What I point to is right platform undertakes fictitious change.To platform (or hardware) undertake fictitious change mean,Hardware assembles into a logistic platform from physical platform abstraction,The operating system is OK move on gather of this logistic platform.According to the simplest meaning,This is meant can move on same hardware platform (of identical or different type) many operating systems.
Offer fictitious the systematic element that change often is called fictitious machine monitor or management implement (Hypervisor) .The fictitious machine that every operating system uses him,Fictitious machine and management implement cooperation,The visit that decides pair of physics hardware thereby (see a picture 2) .
Graph 2. Manage implement the visit that decides pair of physics hardware
With operating system likeness,Practicable is fictitious change a method varied.About fictitious the more information that turn,Refer to reference material please.
CoLinux
A port that CoLinux is kernel of standard Linux.In other words,CoLinux is kernel of a Linux,It through revising,With moving with cooperation of another operating system.Lead plane operating system (Windows or Linux) the physical resource that controls an operating system,And caller (Guest) operating system (CoLinux) the fictitious abstraction that acquires hardware.Lead plane operating system must be offerred with prerogative level (Ring 0) the method of executive driver,Provide the means that allocates memory (see a picture 3) .
Graph 3. CoLinux serves as a process of lead plane operating system to carry out
The root file system of CoLinux is a groovy file in lead plane operating system.To Windows,It is a groovy file only;But to CoLinux,It is readable the system of Ext3 file that can keep.
The other character that place of Linux kernel needs (visit even net or video for instance) will come true through exterior representative.CoLinux can connect net character through visit of TUN/TAP driver (below " even the net " discuss in the section) .Say simply,The user space that this driver supplies pair of aether network equipment is visited,Can be sent so and receive data to wrap.Also should pass a representative to the visit of monitor.X Window System is a kind of agreement,Video is sent to output between lead plane according to this kind of agreement.Because of this,Through server of X Window System is being used on lead plane operating system,Can go to video output transmit server of practicable X.
Below,We install CoLinux and configuration connects net character and video presentation.
Install CoLinux
Installation CoLinux is very easy.This includes a few measure (specific depend on your need) ,But these measure are very simple,And any problems did not appear when be being installed on the machine of Windows XP in me.How section discussion installs CoLinux and enable originally wait for even the net the service.
The first pace is to download CoLinux to release edition.Visithttp://www.colinux.org Choose in left columnDownloads.If the browser did not enter SourceForge,So the link on choice page.The intermediate has CoLinux-stable package link of the page.Executable file of download CoLinux (to when writing the article,Newest version is CoLinux-0.6.4.exe) .The 0.6.4 version of CoLinux is kernel of 2.6.11 Linux.After the download that finish,Doubleclick this file to begin to install.
After accepting permissive agreement,Enquire you hope to install what component.Maintain these settings changeless (should choose all component) ,Include to download image of root file system.To make the operation from the back apter,the C:\ of target folder instead that installs CoLinuxColinux\ ,From the point of the angle that configures a file because of,The installation subdirectory that Colinux is a standard.
When should installing a program to ask to choose image of root file system,Choice Debian is released edition,Because it is the smallest issuance edition,There is 1GB only after solution is pressed.ChoiceInstall Will carry out installation and download of root file system.
After installation is finished,Still the job wants to do.It is next a folder is opened in installing subdirectory,So that be opposite,root file system undertakes solving pressing.
The README file of CoLinux contains a lot of information about other installation option.This file is installing subdirectory (C:\Colinux) in find.The file that there is a strange name with.bz2 ending here.Name this file again for Root_fs (the file of root file system that this is the acquiesce in configuration) .
Now,The installation of CoLinux was finished basically.Can command in Windows XP the CoLinux that start defends a process below in order to (carry out through commanding clew window) :
$ colinux-daemon.exe -c default.colinux.xml
Carrying outcolinux-daemon Later,Show guide the window (see a picture 4) .The identical guiding in conducting a process with traditional Linux is offerred here information.Notice,The guiding of CoLinux is very fast.
Graph 4. CoLinux guides the window
Still can show window of a console (see a picture 5) ,It joinscolinux-daemon.In this window,Can log onto CoLinux and as alternant as Shell.Acquiescent user name and password areroot/root.
Graph 5. CoLinux fictitious console (Shell)
Can see in graph 5,CoLinux console is comprised by two parts:Traditional console and fictitious console,Latter provides the information about monitor.
Link a network
From the point of the angle of Linux,When installation is finished,The support linking a network of CoLinux can have been used.Had laded in installing a process TAP driver.The user space that TAP driver is an aether net facility that manages to place of lead plane operating system joins.TAP driver makes caller operating system can write frame of primitive aether net equipment of network of a fictitious aether (of user space patulous) .Next,The equipment of fictitious aether network in user space delivers aether net frame the true aether network equipment in lead plane operating system.Read extraction process just in time contrary.Notice,What TAP driver delivers is aether net frame,And what TUP driver handles is Internet Protocol (IP) frame.
To support TAP driver,Lead plane operating system must share equipment of practicable aether network.Share to be enabled in Windows XP,Open face plate of Network Connections from Control Panel.The bureau region that chooses an activity joins,Open property next.Option of choice Advanced gets stuck,The Internet join that pitch on answer chooses casing to allow other network user to pass this computer will join (see a picture 6) .
Graph 6. Enable the attribute of bureau region join that network equipment shares
After enabling a network to share,Can start CoLinux and use a network as usual.Graph 7 shows carry outping Jussive result,This specification network is normal.
Graph 7. Through using TAP driver,Use the process that shares network equipment to CoLinux it is transparent
Need to be configured slightly only,CoLinux can offer the character that link a network.The more news that has linking a network about using TUN/TAP,Consult please reference material.
X Window System
Having console window is very pretty good,But if the graph turns window management implement better.Through using the X server of open source,For instance Xming,Xterms can be founded on CoLinux or use other figure to change applied course.Have a lot of feasible idea,For instance Virtual Network Computing (VNC) ,But my general explains how to use Xming.
The first pace is download Xming from SourceForge.After installation,The file that there is a need to update in installing subdirectory,X0.hosts.It includes the long-range leader that allows to visit X server.The IP address that wants the machine that adds progress of moving CoLinux only.Server of the Xming X that start and CoLinux,Execute the following order in CoLinux next:
colinux:~# export DISPLAY=192.168.1.3:0.0
colinux:~# xterm %26amp;
Notice,The IP address that the IP address that appoints here is CoLinux lead plane.After executive Xterm commands,Appear a new Xterm window,See a picture 8.
Graph 8. The Xterm that Xming founds
Patulous CoLinux
No matter download system of which root file,All things that it may not include you to need.But,System of easily patulous root file.For example,When use Debian GNU/Linux,Can use Advanced Packaging Tool (APT,System of a bag management) the bag that will install new package or be had newlier.The first pace is metadata of newer APT,These data safeguard the bag about installation (include new offerred package and the seat that win them) administrative information:
$ apt-get update
Now,The other bag that can need with you replaces root file system.For example,If hope,Ruby language is added in root file system,So executable the following command:
$ apt-get install ruby
According to this kind of means,Can use existing root file system to undertake adjustment according to his need.If CoLinux lacks the certain thing that you need,OK still from source code new form builds CoLinux.
The advantage of CoLinux
CoLinux is to use as good as a kind of experiment Linux method.With Cygwin likeness,CoLinux allows to be developed on Windows operating system and execute order of Linux application.Still can useapt-get Installation, newer or delete applied process,Maintain Linux operating system thereby.
What differ with Cygwin is,On CoLinux process of application of executive Linux does not need new form to build.From this angle for,CoLinux is the true Linux operating system with cooperation of Windows operating system.
The good point that CoLinux makes a person another times be interested is to be able to transplant quality.A CoLinux can be built to issue on lead plane of a Windows edition,Install a custom-built applied process in root file system.Next,Can change root file system another lead plane,Start afresh.Had a portable development platform so,The root file system after compressing can be put completely in USB of a standard to remember a bar in.
Finally,The rate of CoLinux is very rapid,Because it is substantially,move in this machine hardware.
The problem of CoLinux
The main drawback of CoLinux is it brings about whole machine to break down likely (include all operating systems that have club) ,Move in lead plane kernel with prerogative mode because of caller operating system.Its normal operation still relies on peripheral software (the window and the support that link a network) .Besides,The installation of CoLinux and configuration are very easy.During my use CoLinux,Had not encountered break down.
Last word
Although have a lot of fictitious change plan,But the means that CoLinux uses and offerred function are very novel.CoLinux itself offers on Windows fictitious the Linux that change.Plus a few otherer open source tool,The Linux that can build a complete maturity develops a system,Include to connect net and graphical user interface.CoLinux is faulty,But it is the good method that uses Linux on computer of desktop of standard Windows.
Textual link:Http://www.ibm.com/developerworks/cn/linux/l-virtualization-colinux/index.html