我需要安装 Xen 并开启 LVM我的专用根服务器。
Debian jessie 中的当前版本 Xen 4.4 不支持新的 Skylake intel 处理器。
我尝试了 Debian stretch
,它已经发布了 Xen 4.6,并且运行良好。
在生产系统上,我现在不想运行tretch
它,所以我想知道它是否可能,以及如何在 Debian 8.3 上安装 Xen 4.6?testing
据我所知,您可以将stretch
来源添加到
/etc/apt/sources.list.d/stretch.list
并为其赋予一定的 Pin 优先级,以便除非另有说明,否则不会使用它。然后您必须将 Xen 4.6 所需的所有包“固定”到stretch
.
有人已经这样做了吗?或者说,这种尝试存在着不可能的问题?
或者也许是一个更简单的解决方案?也许是购电协议?
答案1
您必须将stretch和stretch-updates固定到499,将jessie和jessie-updates固定到500,然后从stretch手动安装xen-hypervisor-4.6-amd64:
cat <<EOF | sudo tee /etc/apt/preferences.d/stretch-manual-only
Package: *
Pin: release n=jessie-updates
Pin-Priority: 500
Package: *
Pin: release n=jessie
Pin-Priority: 500
Package: *
Pin: release n=stretch-updates
Pin-Priority: 499
Package: *
Pin: release n=stretch
Pin-Priority: 499
EOF
创建拉伸的源列表:
sed -e 's/ \(stable\|jessie\)/ stretch/ig' /etc/apt/sources.list > /etc/apt/sources.list.d/debian-stretch.list
aptitude update
这些是 Xen 4.6 所需的软件包:
aptitude install xen-utils-common/stretch xen-utils-4.6/stretch xen-linux-system-amd64/stretch xen-tools xen-utils-4.6/stretch xen-hypervisor-4.6-amd64/stretch libncurses5/stretch libncursesw5/stretch libtinfo5/stretch
这将安装这些:
The following NEW packages will be installed:
bridge-utils{a} debootstrap{a} debugedit{a} grub-xen-bin{a} grub-xen-host{a} ipxe-qemu{a} libaio1{a} libasound2{a} libasound2-data{a} libasyncns0{a} libauthen-sasl-perl{a} libbluetooth3{a} libboost-system1.55.0{a} libboost-thread1.55.0{a} libbrlapi0.6{a} libcaca0{a} libconfig-inifiles-perl{a} libcurl3-gnutls{a} libdata-validate-domain-perl{a} libdata-validate-ip-perl{a} libdata-validate uri-perl{a} libdirectfb-1.2-9{a} libelf1{a} libencode-locale-perl{a} libexpect-perl{a} libfdt1{a} libfile-listing-perl{a} libfile-slurp perl{a} libfile-which-perl{a} libflac8{a} libfont-afm-perl{a} libhtml-form-perl{a} libhtml-format-perl{a} libhtml-parser-perl{a} libhtml-tagset-perl{a} libhtm -tree-perl{a} libhttp-cookies-perl{a} libhttp-daemon-perl{a} libhttp-date-perl{a} libhttp-message-perl{a} libhttp-negotiate-perl{a} libice6{a} libio-html-perl{a} libio-pty-perl{a} libio-socket-ssl-perl{a} libio-stty-perl{a} libiscsi2{a} libjpeg62-turbo{a} liblist-moreutils perl{a} liblog-message-perl{a} liblog-message-simple-perl{a} liblua5.2-0{a} liblwp-mediatypes-perl{a} liblwp-protocol-https-perl{a} libmailtools-perl{a} libnet-domain-tld-perl{a} libnet-http-perl{a} libnet-ipv6addr-perl{a} libnet-netmask-perl{a} libnet-smtp-ssl-perl{a} libnet-ssleay-perl{a} libnetaddr-ip-perl{a} libnetwork-ipv4addr-perl{a} libnspr4{a} libnss3{a} libogg0{a} libopus0{a} libpixman-1-0{a} libpulse0{a} libpython-stdlib{a} libpython2.7 minimal{a} libpython2.7-stdlib{a} librados2{a} librbd1{a} librpm3{a} librpmbuild3{a} librpmio3{a} librpmsign1{a} libsdl1.2debian{a} libseccomp2{a} libsm6{a} libsndfile1{a} libsocket6-perl{a} libspice-server1{a} libterm-size-perl{a} libterm-ui-perl{a} libtext-template-perl{a} libtimedate-perl{a} liburi perl{a} libusbredirparser1{a} libvdeplug2{a} libvorbis0a{a} libvorbisenc2{a} libwww-perl{a} libwww-robotrules-perl{a} libx11-6{a} libx11-data{a} libx11 xcb1{a} libxau6{a} libxcb1{a} libxdmcp6{a} libxen-4.4{a} libxen-4.6{a} libxenstore3.0{a} libxext6{a} libxi6{a} libxtst6{a} libyajl2{a} linux-image-4.3.0- -amd64 python{a} python-minimal{a} python2.7{a} python2.7-minimal{a} qemu-system-common{a} qemu-system-x86{a} qemu-utils{a} rinse{a} rpm{a} rpm common{a} rpm2cpio{a} seabios{a} sharutils{a} x11-common{a} xen-hypervisor-4.4-amd64{a} xen-hypervisor-4.6-amd64 xen-linux-system-4.3.0-1 amd64{a} xen-linux-system-amd64 xen-system-amd64 xen-tools xen-utils-4.4{a} xen-utils-4.6{b} xen-utils-common xenstore-utils{a}
The following packages will be upgraded:
libncurses5 libncursesw5 libtinfo5
3 packages upgraded, 133 newly installed, 0 to remove and 0 not upgraded.
Need to get 72,3 MB of archives. After unpacking 279 MB will be used.
继续更改 grub 中的引导顺序:
dpkg-divert --divert /etc/grub.d/08_linux_xen --rename /etc/grub.d/20_linux_xen
update-grub
按顺序检查 grub 菜单项:
grep -i "menuentry '" /boot/grub/grub.cfg|sed -r "s|--class .*$||g"|nl -v 0
现在第一行应该是
0 menuentry 'Debian GNU/Linux, with Xen hypervisor'
重新启动并玩得开心;)