zeissoctopus 发表于 2012-09-02 17:33

VPS 子系統 Alpha 測驗版釋出

本帖最后由 zeissoctopus 于 2012-09-02 17:34 编辑

FreeBSD 最近喜事接二連三。

Klaus P. Ohrhallinger 君宣布釋出 VPS for FreeBSD 虛擬子系統的完整功能 Alpha 測試版。
這個測試版補丁只支援 FreeBSD 9.0-RELEASE

原文出處:freebsd-virtualization mailing list

轉載 Klaus文章介紹如何架構一個 freebsd vps 測試平台。原文 出處

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*    How to set up a test environment for FreeBSD VPS         *
*                                                             *
*    Klaus P. Ohrhallinger, http://www.7he.at/freebsd/vps/    *
*                                                             *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

$Id: setup_testenv.txt 120 2012-08-30 11:14:36Z klaus $

* Install FreeBSD 9.0-RELEASE

* Configure your network interfaces (following instructions assume
you are using ethernet).

* In order to use the live migration feature, ssh and root login
have to be enabled:

/etc/rc.conf:
sshd_enable=YES

/etc/ssh/sshd_config:
PermitRootLogin yes

* * * * Install VPS from binary package * * * *

Lookup URL for the right package on the website.
For example:
vps-fbsd90-119-i386-dbg.tbz
means: suited for FreeBSD 9.0; VPS revision 119; i386 machine; debug version

The debug versions are much slower than the prod(uction) versions;
but give more output for debugging and diagnostics.

# fetch http://www.7he.at/freebsd/vps/...
# pkg_add vps-fbsd90-*tbz

* * * * --- * * * *

* Reboot
# sync
# shutdown -r now

* Execute setup script (has to be redone after reboot, but you can add it to /etc/rc.local):
# /etc/rc.vpssetup.sh
(Ignore any errors about non-existent sysctls.)

Output of kldstat should like like this:
# kldstat
Id Refs Address            Size   Name
1   25 0xffffffff80200000 f23488   kernel
2    1 0xffffffff81212000 f0d      if_vps.ko
3    1 0xffffffff81213000 1c22   vps_dev.ko
4    1 0xffffffff81215000 aa5      vps_ddb.ko
5    1 0xffffffff81216000 1905   vps_libdump.ko
6    1 0xffffffff81218000 5db9   vps_snapst.ko
7    1 0xffffffff8121e000 917d   vps_restore.ko
8    1 0xffffffff81228000 1ab5   vps_suspend.ko
9    1 0xffffffff8122a000 1ef5   vps_account.ko
10    1 0xffffffff8122c000 37e8   vpsfs.ko
11    1 0xffffffff81230000 3f55   sysvmsg.ko
12    1 0xffffffff81234000 4dcd   sysvsem.ko
13    1 0xffffffff81239000 3bd9   sysvshm.ko
#

* * * * Creating virtual instances * * * *

* Create the virtual instance's filesystem:

# mkdir /usr/vps/test01
# fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/9.0-RELEASE/base.txz
# tar Jxpf base.txz -C /usr/vps/test01

* Edit /usr/vps/test01/etc/ttys and set all terminals to ''off''.
* Create /usr/vps/test01/etc/rc.conf:
root_rw_mount=NO
hostname="test01.lo"

* Create /usr/vps/test01/etc/rc.local:
ifconfig vps0 inet 192.168.98.100 netmask 255.255.255.255 up
route add default -iface vps0

* Set a root password:
chroot /usr/vps/test01 /usr/bin/passwd

* Create /etc/vps/vps_test01.conf (minimal example):
NAME = 'test01'
FSROOT = '/usr/vps/test01'
INIT = '/sbin/init'
NETIF_0_ADDRESS = '192.168.98.100'

* Start it up:
# vpsctl start test01
# vpsctl list

* To open a shell in 'test01'; do
# vpsctl shell test01

* For more information about the vpsctl command, see
# man vpsctl

* * * * End Of File * * * *
更詳細的 VPS 說明,請到 這裡

ulovko 发表于 2012-09-02 17:46



@lsstarboy @gvim @fender0107401

axlrose 发表于 2012-09-02 22:36

回复 1# zeissoctopus

果然是个好消息,赞一个
PS: 发现好的贴子,如何给积分啊?

   

send_linux 发表于 2012-09-02 23:00

axlrose 发表于 2012-09-02 22:36 static/image/common/back.gif
回复 1# zeissoctopus

果然是个好消息,赞一个


目前只有版主和荣誉版主有这个权限,别的用户暂时没有这个权限

axlrose 发表于 2012-09-03 12:21

:mrgreen:看来发现好贴子想送积分赞一下还是要版主才有搞头呀
页: [1]
查看完整版本: VPS 子系統 Alpha 測驗版釋出