在Debian Etch版本的系統中使用Xen3.3.1進行虛擬化應用
翻譯文章:http://www.howtoforge.com/virtualization-with-xen-3.3.1-on-debian-etch
小弟第一次翻譯,還請大家多多支持。
在Debian Etch版本的系統中使用Xen3.3.1進行虛擬化應用
版本 1.0
原作者: Falko Timme <ft falkotimme com>
翻譯作者:Topkey <tinybiz163.com>
最後編輯 02/08/2009
這個教程提供手把手的指導,來教會你怎樣在Debian Etch(4.0)的系統中安裝Xen。
Xen可以幫助你在使用*nix類系統(比如Linux和Freebsd)的主操作系統中創建客戶操作系統,也可以叫做「虛擬機」或者domUs,你可以使用Xen在相同的硬體條件下,把你的應用安裝在不同的虛擬機當中,這些虛擬機是相互獨立的。例如一台虛擬機是作為郵件伺服器,一台是作為大流量的web站點,另外的一台作為你的服務客戶的web站點,或者創建一個作為Dns伺服器的虛擬機等等,這樣做的話,不單可以節約你的資金,更重要的是可以大大提升系統的安全性。如果你的作為Dns伺服器的虛擬機被入侵了,並不會對你其他的虛擬機產生任何影響.更值得一提的是,你可以移動虛擬機從一台Xen伺服器到另外一台。
我不保證這篇論文會適合你!
1 前言
我使用主機名為server1.example.com和IP地址為192.168.0.100的Debian Etch系統來作為我的主系統(dom0).我同時也會在主系統中安裝Debian Etch系統來作為我的虛擬機(domU)。
這個教程會為你講解怎樣安裝Image-based虛擬機和LVM-based虛擬機。
注意:Xen 3.3.1配合使用的相當老的2.6.18內核。如果你使用新的硬體,這個系統可能由於找不到驅動而不能啟動。
2.安裝Xen
在我們安裝Xen之前,我們必須要安裝一些系統依賴的軟體包。
apt-get install make gcc libc6-dev zlib1g-dev python python-dev python-twisted bridge-utils iproute libcurl3 libcurl3-dev bzip2 module-init-tools transfig tgif libncurses5-dev patch libvncserver-dev
libsdl-dev libjpeg62-dev bcc bin86 gawk pciutils-dev mercurial build-essential
安裝完成後,我們下載Xen 3.3.1
cd /usr/src
wget http://bits.xensource.com/oss-xen/release/3.3.1/xen-3.3.1.tar.gz
並且解壓它:
tar -xvzf xen-3.3.1.tar.gz
cd xen-3.3.1
現在我們就可以用下面的命令來編譯它了:
make world && make dist
這將會花掉一些時間,請耐心等待,編譯完成後,我們就可以安裝Xen了:
./install.sh
安裝的過程中會顯示類似下面的輸出:
server1:/usr/src/xen-3.3.1# ./install.sh
Installing Xen from './dist/install' to '/'...
- installing for udev-based system
- modifying permissions
All done.
Checking to see whether prerequisite tools are installed...
Xen CHECK-INSTALL Sun Feb 8 21:22:39 CET 2009
Checking check_brctl: OK
Checking check_crypto_lib: OK
Checking check_curl: unused, OK
Checking check_iproute: OK
Checking check_python: OK
Checking check_python_xml: OK
Checking check_udev: OK
Checking check_xml2: unused, OK
Checking check_zlib_lib: OK
All done.
server1:/usr/src/xen-3.3.1#
運行
mv /lib/tls /lib/tls.disabled
然後為Xen創建系統啟動項:
update-rc.d xend defaults 20 21
update-rc.d xendomains defaults 21 20
然後我們打開/etc/modules文件並且確保這個文件中有loop max_loop=64這一行(特別注意:這一步驟僅僅是針對你想常見image-based的虛擬機,如果你想創建lvm-based的虛擬機你可以取消這一步驟):
vi /etc/modules
loop max_loop=64
現在我們來看一下/boot文件夾里的東西:
ls -l /boot/
server1:/usr/src/xen-3.3.1# ls -l /boot/
total 15546
-rw-r--r-- 1 root root 71818 2007-03-26 18:32 config-2.6.18-4-486
-rw-r--r-- 1 root root 66264 2009-02-08 21:21 config-2.6.18.8-xen
drwxr-xr-x 2 root root 1024 2008-12-14 00:07 grub
-rw-r--r-- 1 root root 4845777 2008-12-14 00:04 initrd.img-2.6.18-4-486
drwx------ 2 root root 12288 2008-12-13 23:59 lost+found
-rw-r--r-- 1 root root 716728 2007-03-27 00:39 System.map-2.6.18-4-486
-rw-r--r-- 1 root root 752541 2009-02-08 21:21 System.map-2.6.18.8-xen
-rw-r--r-- 1 root root 1220128 2007-03-27 00:39 vmlinuz-2.6.18-4-486
-rw-r--r-- 1 root root 1541626 2009-02-08 21:21 vmlinuz-2.6.18.8-xen
-rw-r--r-- 1 root root 433689 2009-02-08 21:14 xen-3.3.1.gz
lrwxrwxrwx 1 root root 12 2009-02-08 21:22 xen-3.3.gz -> xen-3.3.1.gz
lrwxrwxrwx 1 root root 12 2009-02-08 21:22 xen-3.gz -> xen-3.3.1.gz
lrwxrwxrwx 1 root root 12 2009-02-08 21:22 xen.gz -> xen-3.3.1.gz
-rw-r--r-- 1 root root 6180789 2009-02-08 21:14 xen-syms-3.3.1
server1:/usr/src/xen-3.3.1#
正如你所看到的,這裡顯示的是新內核2.6.18.8-xen,但是這裡沒有ramdisk,因此我們來創建一個。
depmod 2.6.18.8-xen
update-initramfs -c -k 2.6.18.8-xen
升級我們的啟動引導
update-grub
然後我們重啟下系統
reboot
啟動完后我們運行命令
uname –r
這時系統的新的Xen內核就會被顯示出來
server1:~# uname -r
2.6.18.8-xen
server1:~#
3.安裝xen-tools
我們將會使用Xen-tools來創建虛擬機。Xen-tools可以很容易的創建虛擬機,請閱讀這個教程來獲取更多信息http://www.howtoforge.com/xen_tools_xen_shell_argo.
我們不從 Debian Etch的軟體庫里安裝xen-tools(因為版本相當老),而是直接從開發者的軟體庫安裝,這樣的話我們就可以獲取最新的版本,打開/etc/apt/sources.list文件。
vi /etc/apt/sources.list
添加下面一行
deb http://apt.steve.org.uk/etch etch main non-free contrib
然後運行
wget -q http://apt.steve.org.uk/apt-key.gpg -O- | apt-key add - && apt-get update
安裝xen-tools:
apt-get install xen-tools
《解決方案》
4.創建 Image-Based的虛擬機
現在我們編輯/etc/xen-tools/xen-tools.conf.這個文件包含了xen-create-image腳本使用的默認的參數,無需你在命令行中定義其他的參數。我改變下面的參數並且其他的都設置為默認。
vi /etc/xen-tools/xen-tools.conf
[...]
dir = /home/xen
[...]
dist = etch # Default distribution to install.
[...]
gateway = 192.168.0.1
netmask = 255.255.255.0
broadcast = 192.168.0.255
[...]
passwd = 1
[...]
kernel = /boot/vmlinuz-`uname -r`
initrd = /boot/initrd.img-`uname -r`
[...]
mirror = http://ftp.de.debian.org/debian/
[...]
serial_device = hvc0 #default
[...]
disk_device = xvda #default
[...]
Dir這一行定義虛擬機的鏡像存儲的位置。
Dist確定將要在虛擬機里安裝的版本(Debian Etch)(文件里有一個註釋說明所有支持的版本)。
Passwd=1可以使你定義一個創建新的客戶域時的root密碼。
Mirror定義離你最近的Debian鏡像
確保你定義了網關,子網掩碼和廣播地址。如果你不這樣做的話,當你使用xen-create-image命令時,即使你確定了一個IP地址,你的客戶域也不能正常工作。
最重要的是在文件中需添加serial_device = hvc0 (or serial_device = xvc0)這一行,否則你的虛擬機可能不能正常啟動。
在我們繼續下面的操作之前,我們需要創建虛擬機鏡像存儲文件的目錄。
mkdir /home/xen
現在我們來創建我們的第一個客戶域,xen1.example.com,所使用的Ip地址是192.168.0.101:
xen-create-image --hostname=xen1.example.com --size=4Gb --swap=256Mb --ip=192.168.0.101 --memory=128Mb --arch=i386 --role=udev
操作已經在/etc/xen-tools/xen-tools.conf文件中定義的命令,在操作你沒有在/etc/xen-tools/xen-tools.conf定義的命令時,請確保你在命令中加入了--role=udev,否則你的虛擬機可能不能正常啟動!
要學習更多的可用參數說明,請查看xen-create-image的man說明。
man xen-create-image
xen-create-image這時就會為我們創建xen1.example.com虛擬機,這將花費一些時間,輸出的結果類似於下面所示。
server1:~# xen-create-image --hostname=xen1.example.com --size=4Gb --swap=256Mb --ip=192.168.0.101 --memory=128Mb --arch=i386 --role=udev
General Information
--------------------
Hostname : xen1.example.com
Distribution : etch
Partitions : swap 256Mb (swap)
/ 4Gb (ext3)
Image type : sparse
Memory size : 128Mb
Kernel path : /boot/vmlinuz-2.6.18.8-xen
Initrd path : /boot/initrd.img-2.6.18.8-xen
Networking Information
----------------------
IP Address 1 : 192.168.0.101
Netmask : 255.255.255.0
Broadcast : 192.168.0.255
Gateway : 192.168.0.1
WARNING
-------
Loopback module not loaded and you're using loopback images
Run the following to load the module:
modprobe loop loop_max=255
Creating partition image: /home/xen/domains/xen1.example.com/swap.img
Done
Creating swap on /home/xen/domains/xen1.example.com/swap.img
Done
Creating partition image: /home/xen/domains/xen1.example.com/disk.img
Done
Creating ext3 filesystem on /home/xen/domains/xen1.example.com/disk.img
Done
Installation method: debootstrap
Done
Running hooks
Done
Role: udev
File: /etc/xen-tools/role.d/udev
Role script completed.
Creating Xen configuration file
Done
Setting up root password
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
All done
Logfile produced at:
/var/log/xen-tools/xen1.example.com.log
server1:~#
在這裡/etc/xen/xen1.example.com.cfg就會出現xen1.example.com的配置文件,打開它並在文件底部添加下面的參數extra = 'xencons=hvc0 console=hvc0'(或者extra = 'xencons=xvc0 console=xvc0'如果你在etc/xen-tools/xen-tools.conf文件中配置的是serial_device = xvc0)
vi /etc/xen/xen1.example.com.cfg
#
# Configuration file for the Xen instance xen1.example.com, created
# by xen-tools 4.1 on Sun Feb 8 21:42:15 2009.
#
#
# Kernel + memory size
#
kernel = '/boot/vmlinuz-2.6.18.8-xen'
ramdisk = '/boot/initrd.img-2.6.18.8-xen'
memory = '128'
#
# Disk device(s).
#
root = '/dev/xvda2 ro'
disk = [
'file:/home/xen/domains/xen1.example.com/disk.img,xvda2,w',
'file:/home/xen/domains/xen1.example.com/swap.img,xvda1,w',
]
#
# Physical volumes
#
#
# Hostname
#
name = 'xen1.example.com'
#
# Networking
#
vif = [ 'ip=192.168.0.101,mac=00:16:3E:85:BC:FC' ]
#
# Behaviour
#
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'
extra = 'xencons=hvc0 console=hvc0'
如果你不加入這一行的話,你再使用xm console命令進入vm的終端時,啟動進程就會被永遠掛起了(但是事實上,vm正在正常運行,你可以使用ssh連接它)。
(請注意:如果你有雙核或者四核的cpu並且想在虛擬機中使用所有的核,請在配置文件中添加vcpus = '2' or vcpus = '4'這一行)。
如果想啟動虛擬機,運行命令
xm create /etc/xen/xen1.example.com.cfg
輸入
xm console xen1.example.com
就會進入到了虛擬機(如果想返回dom0,在console時敲入CTRL+],在putty時敲入CTRL+5),或者你使用SSh的客戶端進入(192.168.0.101).
(如果在vm系統啟動進程中看到下列信息
EXT3-fs: mounted filesystem with ordered data mode.
***************************************************************
***************************************************************
** WARNING: Currently emulating unsupported memory accesses **
** in /lib/tls glibc libraries. The emulation is **
** slow. To ensure full performance you should **
** install a 'xen-friendly' (nosegneg) version of **
** the library, or disable tls support by executing **
** the following as root: **
** mv /lib/tls /lib/tls.disabled **
** Offending process: modprobe (pid=1757) **
***************************************************************
***************************************************************
Continuing...
在vm中運行下列命令
mv /lib/tls /lib/tls.disabled)。
如果想查看主機中所有虛擬機,輸入
xm list
輸出的結果類似於
server1:~# xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 874 1 r----- 714.2
xen1.example.com 1 128 1 -b---- 63.8
server1:~#
如果你想關閉虛擬機,請輸入下列命令
xm shutdown xen1.example.com
如果你想虛擬機xen1.example.com在主機啟動的時候自動啟動,輸入下列命令
ln -s /etc/xen/xen1.example.com.cfg /etc/xen/auto
下面將為大家介紹幾個重要的Xen命令
xm create -c /path/to/config –啟動虛擬機
xm shutdown <name> -關閉虛擬機
xm destroy <name> -立刻關閉虛擬機,類似於直接關閉電源按鈕
xm list列出所有運行的系統
xm console <name> -登入虛擬機
xm help – 命令說明列表
使用xen-create-image命令可以顯示所有創建過的虛擬機的列表。
xen-list-images
server1:~# xen-list-images
Name: xen1.example.com
Memory: 128
IP: 192.168.0.101
server1:~#
5.創建LVM-Based虛擬機
在這一章將會說明怎樣設置一個LVM-Based虛擬機而非使用磁碟鏡像的虛擬機,使用磁碟鏡像的虛擬機運行時十分慢,並增大了磁碟IO的負擔。
在這個例子中,我使用一個帶有LVM卷組大約50GB空間的/dev/vg0 Debian Etch主機,/dev/vg0 包含兩個邏輯卷,dev/vg0/root 和 /dev/vg0/swap_1 另外剩餘12Gb空間沒有分配- 可以使我們自愛創建我們的虛擬機時創建邏輯卷。
Vgdisplay
server1:~# vgdisplay
--- Volume group ---
VG Name vg0
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 49.52 GB
PE Size 4.00 MB
Total PE 12678
Alloc PE / Size 3072 / 12.00 GB
Free PE / Size 9606 / 37.52 GB
VG UUID iXaW0I-RkGD-WQlQ-dMaD-qfM5-xkvq-2w5uP5
server1:~#
lvdisplay
server1:~# lvdisplay
--- Logical volume ---
LV Name /dev/vg0/root
VG Name vg0
LV UUID 17thCh-CgS8-ZvrJ-FOai-B1AX-89sv-xxq12a
LV Write Access read/write
LV Status available
# open 1
LV Size 10.00 GB
Current LE 2560
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:0
--- Logical volume ---
LV Name /dev/vg0/swap_1
VG Name vg0
LV UUID u2EZyP-3Vp5-Lr32-nquG-ub5a-f0U5-VI3WRN
LV Write Access read/write
LV Status available
# open 1
LV Size 2.00 GB
Current LE 512
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:1
server1:~#
現在我們編輯/etc/xen-tools/xen-tools.conf.這個文件包含了xen-create-image腳本使用的默認的參數,無需你在命令行中定義其他的參數。我改變下面的參數並且其他的都設置為默認。
vi /etc/xen-tools/xen-tools.conf
[...]
lvm = vg0
[...]
dist = etch # Default distribution to install.
[...]
gateway = 192.168.0.1
netmask = 255.255.255.0
broadcast = 192.168.0.255
[...]
passwd = 1
[...]
kernel = /boot/vmlinuz-`uname -r`
initrd = /boot/initrd.img-`uname -r`
[...]
mirror = http://ftp.de.debian.org/debian/
[...]
serial_device = hvc0 #default
[...]
disk_device = xvda #default
[...]
確保lvm這一行沒有註銷,並在這一行填入你的卷組(在我的試驗中是vg0).同時確保dir這一行已被註銷。
Dist確定將要在虛擬機里安裝的版本(Debian Etch)(文件里有一個註釋說明所有支持的版本)。
Passwd=1可以使你定義一個創建新的客戶域時的root密碼。
Mirror定義離你最近的Debian鏡像
確保你定義了網關,子網掩碼和廣播地址。如果你不這樣做的話,當你使用xen-create-image命令時,即使你確定了一個IP地址,你的客戶域也不能正常工作。
最重要的是在文件中需添加serial_device = hvc0 (or serial_device = xvc0)這一行,否則你的虛擬機可能不能正常啟動。
在我們繼續下面的操作之前,我們需要創建虛擬機鏡像存儲文件的目錄。
mkdir /home/xen
現在我們來創建我們的第一個客戶域,xen1.example.com,所使用的Ip地址是192.168.0.101:
xen-create-image --hostname=xen1.example.com --size=4Gb --swap=256Mb --ip=192.168.0.101 --memory=128Mb --arch=i386 --role=udev
操作已經在/etc/xen-tools/xen-tools.conf文件中定義的命令,在操作你沒有在/etc/xen-tools/xen-tools.conf定義的命令時,請確保你在命令中加入了--role=udev,否則你的虛擬機可能不能正常啟動!
要學習更多的可用參數說明,請查看xen-create-image的man說明。
man xen-create-image
xen-create-image這時就會為我們創建xen1.example.com虛擬機,這將花費一些時間,輸出的結果類似於下面所示。
server1:~# xen-create-image --hostname=xen1.example.com --size=4Gb --swap=256Mb --ip=192.168.0.101 --memory=128Mb --arch=i386 --role=udev
General Information
--------------------
Hostname : xen1.example.com
Distribution : etch
Partitions : swap 256Mb (swap)
/ 4Gb (ext3)
Image type : full
Memory size : 128Mb
Kernel path : /boot/vmlinuz-2.6.18.8-xen
Initrd path : /boot/initrd.img-2.6.18.8-xen
Networking Information
----------------------
IP Address 1 : 192.168.0.101
Netmask : 255.255.255.0
Broadcast : 192.168.0.255
Gateway : 192.168.0.1
Creating swap on /dev/vg0/xen1.example.com-swap
Done
Creating ext3 filesystem on /dev/vg0/xen1.example.com-disk
Done
Installation method: debootstrap
Done
Running hooks
Done
Role: udev
File: /etc/xen-tools/role.d/udev
Role script completed.
Creating Xen configuration file
Done
Setting up root password
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
All done
Logfile produced at:
/var/log/xen-tools/xen1.example.com.log
server1:~#
正如你從輸出結果中看到的那樣,xen-create-image已經在vg0卷組中為我們的虛擬機創建了一個新的邏輯卷,/dev/vg0/xen1.example.com-disk為vm的啟動文件,用下面命令可以查看,
Lvdisplay
同時你也會看到另外一個邏輯卷/dev/vg0/xen1.example.com-swap作為vm的swap
server1:~# lvdisplay
--- Logical volume ---
LV Name /dev/vg0/root
VG Name vg0
LV UUID 17thCh-CgS8-ZvrJ-FOai-B1AX-89sv-xxq12a
LV Write Access read/write
LV Status available
# open 1
LV Size 10.00 GB
Current LE 2560
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:0
--- Logical volume ---
LV Name /dev/vg0/swap_1
VG Name vg0
LV UUID u2EZyP-3Vp5-Lr32-nquG-ub5a-f0U5-VI3WRN
LV Write Access read/write
LV Status available
# open 1
LV Size 2.00 GB
Current LE 512
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:1
--- Logical volume ---
LV Name /dev/vg0/xen1.example.com-swap
VG Name vg0
LV UUID No03G8-PzA3-67JH-m936-rUQY-rZFi-djIu21
LV Write Access read/write
LV Status available
# open 0
LV Size 256.00 MB
Current LE 64
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:2
--- Logical volume ---
LV Name /dev/vg0/xen1.example.com-disk
VG Name vg0
LV UUID xDwpFO-XALQ-7I1N-TA3k-paYc-biG7-TjrNIM
LV Write Access read/write
LV Status available
# open 0
LV Size 4.00 GB
Current LE 1024
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:3
server1:~#
在這裡/etc/xen/xen1.example.com.cfg就會出現xen1.example.com的配置文件,打開它並在文件底部添加下面的參數extra = 'xencons=hvc0 console=hvc0'(或者extra = 'xencons=xvc0 console=xvc0'如果你在etc/xen-tools/xen-tools.conf文件中配置的是serial_device = xvc0)
vi /etc/xen/xen1.example.com.cfg
#
# Configuration file for the Xen instance xen1.example.com, created
# by xen-tools 4.1 on Sun Feb 8 22:01:30 2009.
#
#
# Kernel + memory size
#
kernel = '/boot/vmlinuz-2.6.18.8-xen'
ramdisk = '/boot/initrd.img-2.6.18.8-xen'
memory = '128'
#
# Disk device(s).
#
root = '/dev/xvda2 ro'
disk = [
'phy:/dev/vg0/xen1.example.com-disk,xvda2,w',
'phy:/dev/vg0/xen1.example.com-swap,xvda1,w',
]
#
# Physical volumes
#
#
# Hostname
#
name = 'xen1.example.com'
#
# Networking
#
vif = [ 'ip=192.168.0.101,mac=00:16:3E:1C:B9:F3' ]
#
# Behaviour
#
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'
extra = 'xencons=hvc0 console=hvc0'
如果你不加入這一行的話,你再使用xm console命令進入vm的終端時,啟動進程就會被永遠掛起了(但是事實上,vm正在正常運行,你可以使用ssh連接它)。
(如果你使用的是磁碟鏡像而非邏輯卷,disk這一行是下面設置
disk = [ 'file:/path/to/xen1.example.com/disk.img,xvda1,w', 'file:/path/to/xen1.example.com/swap.img,xvda2,w' ])
(請注意:如果你有雙核或者四核的cpu並且想在虛擬機中使用所有的核,請在配置文件中添加vcpus = '2' or vcpus = '4'這一行)。
如果要啟動虛擬機,運行
xm create /etc/xen/xen1.example.com.cfg
輸入
xm console xen1.example.com
就會進入到了虛擬機(如果想返回dom0,在console時敲入CTRL+],在putty時敲入CTRL+5),或者你使用SSh的客戶端進入(192.168.0.101).
(如果在vm系統啟動進程中看到下列信息
EXT3-fs: mounted filesystem with ordered data mode.
***************************************************************
***************************************************************
** WARNING: Currently emulating unsupported memory accesses **
** in /lib/tls glibc libraries. The emulation is **
** slow. To ensure full performance you should **
** install a 'xen-friendly' (nosegneg) version of **
** the library, or disable tls support by executing **
** the following as root: **
** mv /lib/tls /lib/tls.disabled **
** Offending process: modprobe (pid=1757) **
***************************************************************
***************************************************************
Continuing...
在vm中運行下列命令
mv /lib/tls /lib/tls.disabled)。
如果你想關閉虛擬機,請輸入下列命令
xm shutdown xen1.example.com
如果你想虛擬機xen1.example.com在主機啟動的時候自動啟動,輸入下列命令
ln -s /etc/xen/xen1.example.com.cfg /etc/xen/auto
下面將為大家介紹幾個重要的Xen命令
xm create -c /path/to/config –啟動虛擬機
xm shutdown <name> -關閉虛擬機
xm destroy <name> -立刻關閉虛擬機,類似於直接關閉電源按鈕
xm list列出所有運行的系統
xm console <name> -登入虛擬機
xm help – 命令說明列表
使用xen-create-image命令可以顯示所有創建過的虛擬機的列表。
xen-list-images
server1:~# xen-list-images
Name: xen1.example.com
Memory: 128
IP: 192.168.0.101
server1:~#
《解決方案》
支持原創,收藏先
《解決方案》
回復 #2 tinybiz 的帖子
虛擬化使用在當期主機資源有很大的空閑沒有利用,
不過對於rhcs實現過程中的fence,vm的fence就可以解決很多的實際應用中的問題