特殊:Badtitle/NS100:XenVirtualMachine:修订间差异
小无编辑摘要 |
小无编辑摘要 |
||
第62行: | 第62行: | ||
MarkChang: Feb 26, 2006. In general, a Xen 3 on Breezy works fine. Basically the same as /XenOnUbuntuHoary. No need to build a new kernel if you don't really want to. Get the tarball install from the Xen site, and unpack it and follow the instructions. Some notes: | MarkChang: Feb 26, 2006. In general, a Xen 3 on Breezy works fine. Basically the same as /XenOnUbuntuHoary. No need to build a new kernel if you don't really want to. Get the tarball install from the Xen site, and unpack it and follow the instructions. Some notes: | ||
** In some versions of the tarball, the instructions for the grub kernel are wrong. Here is what I use: | ** In some versions of the tarball, the instructions for the grub kernel are wrong. Here is what I use: | ||
**** <pre><nowiki> | **** | ||
<pre><nowiki> | |||
title Xen 3.0 / XenLinux 2.6.12 | title Xen 3.0 / XenLinux 2.6.12 | ||
root (hd0,0) | root (hd0,0) |
2007年5月24日 (四) 14:12的版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/XenVirtualMachine }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/af | • {{#if: UbuntuHelp:XenVirtualMachine|Afrikaans| [[::XenVirtualMachine/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/ar | • {{#if: UbuntuHelp:XenVirtualMachine|العربية| [[::XenVirtualMachine/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/az | • {{#if: UbuntuHelp:XenVirtualMachine|azərbaycanca| [[::XenVirtualMachine/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/bcc | • {{#if: UbuntuHelp:XenVirtualMachine|جهلسری بلوچی| [[::XenVirtualMachine/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/bg | • {{#if: UbuntuHelp:XenVirtualMachine|български| [[::XenVirtualMachine/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/br | • {{#if: UbuntuHelp:XenVirtualMachine|brezhoneg| [[::XenVirtualMachine/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/ca | • {{#if: UbuntuHelp:XenVirtualMachine|català| [[::XenVirtualMachine/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/cs | • {{#if: UbuntuHelp:XenVirtualMachine|čeština| [[::XenVirtualMachine/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/de | • {{#if: UbuntuHelp:XenVirtualMachine|Deutsch| [[::XenVirtualMachine/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/el | • {{#if: UbuntuHelp:XenVirtualMachine|Ελληνικά| [[::XenVirtualMachine/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/es | • {{#if: UbuntuHelp:XenVirtualMachine|español| [[::XenVirtualMachine/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/fa | • {{#if: UbuntuHelp:XenVirtualMachine|فارسی| [[::XenVirtualMachine/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/fi | • {{#if: UbuntuHelp:XenVirtualMachine|suomi| [[::XenVirtualMachine/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/fr | • {{#if: UbuntuHelp:XenVirtualMachine|français| [[::XenVirtualMachine/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/gu | • {{#if: UbuntuHelp:XenVirtualMachine|ગુજરાતી| [[::XenVirtualMachine/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/he | • {{#if: UbuntuHelp:XenVirtualMachine|עברית| [[::XenVirtualMachine/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/hu | • {{#if: UbuntuHelp:XenVirtualMachine|magyar| [[::XenVirtualMachine/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/id | • {{#if: UbuntuHelp:XenVirtualMachine|Bahasa Indonesia| [[::XenVirtualMachine/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/it | • {{#if: UbuntuHelp:XenVirtualMachine|italiano| [[::XenVirtualMachine/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/ja | • {{#if: UbuntuHelp:XenVirtualMachine|日本語| [[::XenVirtualMachine/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/ko | • {{#if: UbuntuHelp:XenVirtualMachine|한국어| [[::XenVirtualMachine/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/ksh | • {{#if: UbuntuHelp:XenVirtualMachine|Ripoarisch| [[::XenVirtualMachine/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/mr | • {{#if: UbuntuHelp:XenVirtualMachine|मराठी| [[::XenVirtualMachine/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/ms | • {{#if: UbuntuHelp:XenVirtualMachine|Bahasa Melayu| [[::XenVirtualMachine/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/nl | • {{#if: UbuntuHelp:XenVirtualMachine|Nederlands| [[::XenVirtualMachine/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/no | • {{#if: UbuntuHelp:XenVirtualMachine|norsk| [[::XenVirtualMachine/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/oc | • {{#if: UbuntuHelp:XenVirtualMachine|occitan| [[::XenVirtualMachine/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/pl | • {{#if: UbuntuHelp:XenVirtualMachine|polski| [[::XenVirtualMachine/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/pt | • {{#if: UbuntuHelp:XenVirtualMachine|português| [[::XenVirtualMachine/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/ro | • {{#if: UbuntuHelp:XenVirtualMachine|română| [[::XenVirtualMachine/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/ru | • {{#if: UbuntuHelp:XenVirtualMachine|русский| [[::XenVirtualMachine/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/si | • {{#if: UbuntuHelp:XenVirtualMachine|සිංහල| [[::XenVirtualMachine/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/sq | • {{#if: UbuntuHelp:XenVirtualMachine|shqip| [[::XenVirtualMachine/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/sr | • {{#if: UbuntuHelp:XenVirtualMachine|српски / srpski| [[::XenVirtualMachine/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/sv | • {{#if: UbuntuHelp:XenVirtualMachine|svenska| [[::XenVirtualMachine/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/th | • {{#if: UbuntuHelp:XenVirtualMachine|ไทย| [[::XenVirtualMachine/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/tr | • {{#if: UbuntuHelp:XenVirtualMachine|Türkçe| [[::XenVirtualMachine/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/vi | • {{#if: UbuntuHelp:XenVirtualMachine|Tiếng Việt| [[::XenVirtualMachine/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/yue | • {{#if: UbuntuHelp:XenVirtualMachine|粵語| [[::XenVirtualMachine/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/zh | • {{#if: UbuntuHelp:XenVirtualMachine|中文| [[::XenVirtualMachine/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/zh-hans | • {{#if: UbuntuHelp:XenVirtualMachine|中文(简体)| [[::XenVirtualMachine/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:XenVirtualMachine | UbuntuHelp:XenVirtualMachine | {{#if: | :}}XenVirtualMachine}}/zh-hant | • {{#if: UbuntuHelp:XenVirtualMachine|中文(繁體)| [[::XenVirtualMachine/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:XenVirtualMachine|:XenVirtualMachine|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :XenVirtualMachine/zh | | {{#ifexist: XenVirtualMachine/zh | | {{#ifeq: {{#titleparts:XenVirtualMachine|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:XenVirtualMachine|1|-1|}} | zh | | }}
Xen virtualization allows you to run other Operating Systems inside Ubuntu. These may be either specially modifed guest OSs (like Ubuntu or other Linux distros), or if your CPU has hardware support for virtualization it, unmodifed Operating Systems (like Windows).
Xen began as a research project at the University of Cambridge. XenSource is a spinoff that's attempting to improve and market Xen to commercial users. They also host a lot of useful documentation, much of it in the Xen Wiki.
Installing Xen on Ubuntu
Since release 6.10 (Edgy Eft), Ubuntu contains packages for the xen virtualization technology. The packages can be found within the universe repository, a tutorial is available in /XenOnUbuntuEdgy
Earlier Ubuntu releases required you to install Xen by other means. Most often this would be from binary packages of Xen kernels and utilities made available by the Xen project. There are two wiki pages: XenOnUbuntuBinaryInstall and UbuntuHelp:/XenOnUbuntuBreezy.
Other interesting writeups about Xen on Ubuntu or other Linuxes:
- Installing Xen from the Clarkson Open Source Institute, mostly about using Ubuntu
- Xen 3.0 on Dapper at Howto forge
Xen 3.03 on Feisty
Go to XenVirtualMachine/XenOnUbuntuFeisty
Xen 3.03 on Edgy
Go to XenVirtualMachine/XenOnUbuntuEdgy
Xen 3.03 on Dapper
My rationale is simple: I'm setting this sucker up using Dapper because it's a server, and I prefer the longer term of support (and stability) over having the lastest versions of things. So even though Edgy makes it easier, Xen on Dapper seems to me to be a pretty sensible server setup. Ideally I'll not be updating this until I'm changing the hardware again...
For the most part the Xen installation was guided by the writeup from Hoto Forge, referenced above. A rough manual diff while it's fresh:
- used the 6.06.1-server-install-i386 for base install; added a few tools (openssh-server, eg.)
- install was on a 3ware mirror pair, and I used a single 3G root (sda1) plus LVM - this changes names, which is trivial, and is IMHO far better than using looped files as in the base document
- used Xen 3.03 tarball instead of 3.01: unpacks to a directory named dist
- iproute already installed; python ditto *or* was pulled in as a dep of twisted
- instead of symlinking libcrypto (as in XenOnUbuntuBinaryInstall), I installed libssl0.9.7
- used update-rc.d xend defaults 30 31 and update-rc.d xendomains defaults 31 30 - I took the use of defaults from one (rather than unnecessary magic number lists), and avoiding an already busy number area from the other. At least on this install, 30 was free space...
- with 3.03, the hacks to create directories in /var/run seem not to be necessary.
- fixing the LOCKFILE path in xend's init script still seemed like a good idea; did it.
...and that brings us up to the point in the process where I'm ssh'd in and getting ready to setup a guest domain (again - this was the "do it right and take better notes" reinstall). LATER: had to leave this for a while; came back, noticed 3.0.4 tarballs were online, gave that a try. WARNING: 3.0.4's xend (or was it xendomain?) REQUIRES TLS. Yep, the same thing that Xen itself doesn't like (using Dapper's glibc). I am now, somewhat reluctantly, giving Edgy a spin, though having a shorter support lifetime for the Dom0 is really, really backwards from what I'd hoped for. But with Xen's move to requiring TLS for its infrastructure, that seems better than supporting my own libc spin with nonegseg on Dapper. Maybe by the time Edgy loses support KVM will be ready for production...
Creating Guest Systems and Running Them
there are notes on this in the various Xen documents, each of which seems to include something that others omit. A thorough cleanup could pull this (mostly Ubuntu version independent?) into one better version. If things go well, I'll be doing some work on that as I get a server consolidation project going here... gotta learn the questions first so I can answer them :-)
One thing I want to record before I lose track of it again is the section from the Sarge installation guide titled Installing Debian GNU/Linux from a Unix/Linux System. I had been trying to remember where I saw the neat trick of chrooting into the semi-installed system image to complete its setup - this is it.
Running Windows inside Xen
See /XenOnUbuntuEdgy for a tutorial howto setup xen on VT HArdware to run Windows. For ubuntu versions prior to 6.10 (Edgy Eft), the following document http://www.iku-ag.de/opensource/xen-on-sles.jsp for SuSE should also be adaptable to Ubuntu.
Older documentation and Discussion
MarkChang: As of 10.03.2005, I can't get to the Clarkson mirror to get any of the debs for Xen. [they changed the name of the file, go up a directory ;) ] However, I have met with great success with a mostly-manual install. Documented in /XenOnUbuntuHoary
MarkChang: Feb 26, 2006. In general, a Xen 3 on Breezy works fine. Basically the same as /XenOnUbuntuHoary. No need to build a new kernel if you don't really want to. Get the tarball install from the Xen site, and unpack it and follow the instructions. Some notes:
- In some versions of the tarball, the instructions for the grub kernel are wrong. Here is what I use:
- In some versions of the tarball, the instructions for the grub kernel are wrong. Here is what I use:
title Xen 3.0 / XenLinux 2.6.12 root (hd0,0) kernel /boot/xen.gz dom0_mem=65536 module /boot/vmlinuz-2.6.12.6-xen0 root=/dev/sda1 ro savedefault boot
- You can probably use /boot/vmlinuz-2.6-xen0, as it is symlinked in the right place
KynanCheng: May 6, 2006. Xen3.0 on Dapper Beta 2 works well using the manual install method. The only difference is that the current tarball uses one universal -xen kernel instead of the -xen0/U kernels. In order to get the system to boot, you will have to create an initrd file and add one more line to the Xen grub stanza module /boot/initrd.img-xen-2.6
(NOTE: it's a module line not an initrd line)
See http://wiki.xensource.com/xenwiki/InstallationNotes?highlight=%28grub%29 and http://wiki.xensource.com/xenwiki/GettingStarted?highlight=%28initrd%29 for more information.
- In some versions of the tarball, the Xen folks packed it with weird UIDs. Make certain that before you execute the install script you chown everything to root, ie. "
chown -R root: *
" from the place you unpacked the install tarball.
- In some versions of the tarball, the Xen folks packed it with weird UIDs. Make certain that before you execute the install script you chown everything to root, ie. "
JasonSmithThailand: I am working on a Xen-on-Breezy document in /XenOnUbuntuBreezy.
I have packages mocked up right now, and they're nearly usable, although I have to fix the dependencies on them. I'll upload them somewhere to my website soon
I have confirmed that Ubuntu Hoary still uses devfs for dev entries in their initrds, so if you the default Xen kernel configs don't work for you, you may want to use an initrd and be sure you compile devfs in.
From redjar Wed Mar 30 22:35:37 +0100 2005 From: redjar Date: Wed, 30 Mar 2005 22:35:37 +0100 Subject: ubuntu/xen install howto Message-ID: <20050330223537+0100@https://www.ubuntulinux.org>
Came across this page: http://cosi.clarkson.edu/knowledge/workshops/sp05/installingxen/xen-tutorial.html
I have tested it, it works fine, but the files names have changed.
MartinManey: I'm starting out to try this on a fresh "server" install of Hoary. Of the packages they list as needed, I found bridge-utils, gcc, python-twisted, and the libcurl2-* packages were not already installed. At least without universe there don't appear to be any lubcurl2 packages, so my first attempt will be with libcurl3. Probably didn't need libcurl-dev or gcc to use the install kit. Worked well as far as getting Xen0 running. Getting the (expected) tls warning, but no visible problems so far. Lost eth0 config; patched in by adding "auto eth0" in /etc/network/interfaces for now. Had to create directories /var/lib/xen/xend-db/domain and .../vnet by hand before xend would run. I've since gotten a Fedora Core 3 image, built using the rpmstrap tool, to boot, but have been busy with other work since getting to that point.
JimKleckner: It would be good to have a brief discussion here (or if too big, a separate page) of whether it makes sense to eventually have Xen an option as part of a standard version of Ubuntu or not. What are the barriers?
JasonSmithThailand: I would very much like it if Xen were a standard part of Ubuntu. Virtualization is one of those things that you cannot live without, once you play with it. I think if Xen were known to run on the majory of Linux systems, there would be good opportunities for new kinds of cool software or tools. The reason I stopped halfway through documenting /XenOnUbuntuBreezy is becuase the kernel patches seemed mutually exclusive at the time, so it was not possible to augment an otherwise stock Ubuntu kernel with Xen. The only solution is doing a lot of work but still having a (slightly) incompatible kernel (mostly removing some drivers, IIRC) as other Ubuntu users.
chris.steelMontreal: Xen is really important and powerful. Para-virtualization totally rocks. Too bad I had to go back to a Hoary server in order to use it. The Ubuntu xen3 install page had some good clues but that mountain was too high! Perhaps a few 'history > xen3onbreezy.txt' links and a good Ubuntu kernel patch doc and the edited .h files might have got me through but my head was spinning and I caved. Hopefully Dapper will have a nice xen3 kernel selection and an initrd with at least LVM support and the other basic I/O etc. Any more breadcrumbs would be helpful ; )
JackWasey: Xen 3.0 merged with unstable debian: http://www.debian-administration.org/articles/396
--- Cartel: I have had success with Xen 3.0.2 under Dapper and have published unnofficial packages for it. See here: https://wiki.ubuntu.com/XenVirtualMachine/XenOnUbuntuDapper. Basically everything works except some uncommon hardware.