成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

如何利用xen3.2 在 ubuntu 8.04虛擬Windows系統(tǒng)

系統(tǒng) Linux
如何利用xen3.2 在 ubuntu 8.04虛擬Windows系統(tǒng)

1、安裝虛擬主機(jī)
更改root密碼 
~#sudo passwd root
安裝xen服務(wù)器
~#apt-get install ubuntu-xen-server
安裝lvm2
~#apt-get install lvm2
~#reboot
2、準(zhǔn)備LVM-backed VBDs
創(chuàng)建lvm分區(qū)
~# fdisk /dev/sda
The number of cylinders for this disk is set to 19457.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
p
Selected partition 4
First cylinder (2008-19457, default 2008):
Using default value 2008
Last cylinder or +size or +sizeM or +sizeK (2008-19457, default 19457):
Using default value 19457
Command (m for help): t
Partition number (1-5): 4
Hex code (type L to list codes): 8e
Changed system type of partition 4 to 8e (Linux LVM)
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
查看分區(qū)情況
~# fdisk /dev/sda -l
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x624aa2e0
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          62      497983+  83  Linux
/dev/sda2              63        1278     9767520    5  Extended
/dev/sda3            1279        2007     5855692+  82  Linux swap / Solaris
/dev/sda4            2008       19457   140167125   8e  Linux LVM
/dev/sda5              63        1278     9767488+  83  Linux
重啟系統(tǒng),使剛劃分的分區(qū)有效,否則你用pvcreate或其它工具對(duì)這個(gè)分區(qū)進(jìn)行操作,會(huì)產(chǎn)生無(wú)此分區(qū)的錯(cuò)誤
~#reboot
創(chuàng)建物理卷
~# pvcreate /dev/sda4
  Physical volume "/dev/sda4" successfully created
建立卷組
~# vgcreate vg1 /dev/sda4
  Volume group "vg1" successfully created
建立邏輯卷
~# lvcreate -L15G -nvbox01-winxp vg1
  Logical volume "vbox01-winxp" created
格式化剛建立的邏輯卷
~# mkfs.ext3 /dev/vg1/vbox01-winxp
mke2fs 1.40.8 (13-Mar-2008)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
983040 inodes, 3932160 blocks
196608 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4026531840
120 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information:
done
This filesystem will be automatically checked every 27 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
掛載和卸載邏輯卷
~# mount /dev/vg1/vbox01-winxp /mnt
~# umount /mnt

#P#

3、建立虛擬客戶(hù)機(jī)(winxp)
建立虛擬機(jī)配置文件
~# vi /etc/xen/vbox01-winxp.cfg
kernel='/usr/lib64/xen/boot/hvmloader'
builder='hvm'
name='vbox01-winxp'
device_model='/usr/lib64/xen/bin/qemu-dm'
disk=['phy:/dev/vg1/vbox01-winxp,hda,w','phy:/dev/loop0,hdc:cdrom,r']
boot='dc'
memory='512'
vcpus=3
vif=['type=ioemu,mac=00:21:41:e2:00:01,bridge=eth0']
on_poweroff='destroy'
on_reboot='restart'
on_crash='restart'
vnc=1
vnclisten='0.0.0.0'
vncdisplay=0
vncunused=1
vncpasswd='pass'
sdl=0
usb=1
usbdevice='mouse'
掛載ISO到模擬光驅(qū)
查找空閑loop設(shè)備
~# losetup -f
/dev/loop0
掛載ISO鏡象到loop0
~# losetup -f /home/wxt/VRMPVOL_EN.iso
root@vbox01:~# losetup -a
/dev/loop0: [0805]:383528 (/home/wxt/VRMPVOL_EN.iso)
卸載模擬光驅(qū)
~# losetup -d /dev/loop0
重新掛載
~# losetup -f /home/wxt/VRMPVOL_EN.iso
開(kāi)啟虛擬客戶(hù)機(jī)vbox01-winxp.cfg
~# xm create vbox01-winxp.cfg
Using config file "/etc/xen/vbox01-winxp.cfg".
Started domain vbox01-winxp
現(xiàn)在就可以用vnc連接到虛擬主機(jī)的IP,就可以使用虛擬客戶(hù)機(jī)vbox01-winxp了
關(guān)掉vbox01-winxp
~# xm shutdown vbox01-winxp
4、利用dd復(fù)制虛擬客戶(hù)機(jī)
# lvcreate -L15G -n vbox01-dcd vg1
  Logical volume "vbox01-dcd" created
# dd if=/dev/vg1/vbox01-winxp of=/dev/vg1/vbox01-dcd
31457280+0 records in
31457280+0 records out
16106127360 bytes (16 GB) copied, 1592.12 s, 10.1 MB/s
~# vi /etc/xen/vbox01-dcd.cfg
kernel='/usr/lib64/xen/boot/hvmloader'
builder='hvm'
guest_os_type='winxp'
name='vbox01-dcd'
device_model='/usr/lib64/xen/bin/qemu-dm'
disk=['phy:/dev/vg1/vbox01-dcd,hda,w','phy:/dev/loop0,hdc:cdrom,r']
boot='dc'
memory='512'
shadow_memory='32'
vcpus='3'
acpi=1
apic=1
vif=['type=ioemu,mac=00:21:41:e2:00:02,bridge=eth0']
on_poweroff='destroy'
on_reboot='restart'
vnclisten='0.0.0.0'
vnc=1
vncdisplay=1
vncunused=1
vncpasswd='password'
sdl=0
usb=1
usbdevice='mouse'
相對(duì)于被復(fù)制的主機(jī),這里主要改四個(gè)地方
主機(jī)名vbox01-winxp => vbox01-dcd
虛擬硬盤(pán)phy:/dev/vg1/vbox01-winxp => phy:/dev/vg1/vbox01-dcd
網(wǎng)卡MAC地址00:21:41:e2:00:01 => 00:21:41:e2:00:02
VNC連接端口vncdisplay=0 => vncdisplay=1
vbox01-dcd開(kāi)機(jī)
~#xm create vbox01-dcd.cfg
~# xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  2702     3     r-----   2687.9
vbox01-dcd                                  23   512     2     r-----     14.7
vbox01-winxp                                22   512     2     -b----   1293.5
~# netstat -ln|grep 590[0-9]
tcp        0      0 0.0.0.0:5900            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:5901            0.0.0.0:*               LISTEN
5、利用xm restore備份和恢復(fù)虛擬客戶(hù)機(jī)
~# xm save vbox01-winxp /mnt/winxp.back
~# xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0   988     3     r-----  27570.4
~# ls -l /mnt/winxp.back
-rwxr-xr-x 1 root root 553009093 2009-02-02 21:15 /mnt/winxp.back
~# xm create vbox01-winxp.cfg
Using config file "./vbox01-winxp.cfg".
Started domain vbox01-winxp
在vbox01-winxp內(nèi)新建文件等操作,更改虛擬機(jī)狀態(tài)
~# xm shutdown vbox01-winxp
~# xm restore /mnt/winxp.back
~# xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0   988     3     r-----  27603.9
vbox01-winxp                                57   512     2     r-----      5.8
進(jìn)入vbox01-winxp系統(tǒng),又恢復(fù)到備份點(diǎn)了

【編輯推薦】

  1. Ubuntu下web開(kāi)發(fā) 常見(jiàn)問(wèn)題與解決方法
  2. 在Ubuntu下建立PowerPC405EP的開(kāi)發(fā)環(huán)境
  3. Ubuntu將推針對(duì)虛擬技術(shù)的JeOS開(kāi)源版本
責(zé)任編輯:張燕妮 來(lái)源: ChinaUnix博客
相關(guān)推薦

2010-03-15 15:51:35

Ubuntu 8.04

2009-02-18 19:13:25

2010-01-07 10:14:41

2012-08-13 17:34:11

ubuntu操作系統(tǒng)

2009-12-29 17:21:24

Ubuntu 8.04

2010-09-09 17:41:52

ubuntu8.04tftp

2011-09-01 10:31:16

ubuntuwindows

2011-09-01 10:41:15

ubuntuISO

2010-06-13 09:27:18

Grub安裝Ubunt

2011-09-05 13:08:06

UbuntuSMART

2009-04-17 23:20:24

2010-03-16 18:40:59

Ubuntu8.04

2011-06-20 10:40:03

Ubuntu Qtopia

2010-03-16 10:13:13

2010-03-16 10:28:44

Ubuntu 8.04

2009-03-30 17:51:30

Vmwareesx虛擬化

2010-02-07 11:07:13

Ubuntu 8.04

2010-03-15 14:01:29

ubuntu8.04

2010-03-15 14:19:29

Ubuntu Linu

2011-01-21 17:01:34

Zimbra
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)

主站蜘蛛池模板: 欧美 日韩精品 | 久久精品国产精品青草 | 国产日韩欧美在线观看 | 亚洲精品视频免费观看 | 国产精品午夜电影 | 国产精品色综合 | 国产精品久久久久久中文字 | 国产精品一区二 | 在线观看第一页 | 成人黄色电影在线观看 | 美女黄色在线观看 | 天天综合成人网 | 久久久精彩视频 | 波多野结衣一区二区 | 久久精品国产精品青草 | wwwxxx日本在线观看 | 亚洲电影第1页 | 日韩视频在线播放 | 狠狠天天 | 日本天天操 | 免费看日韩视频 | 日韩av看片 | 亚欧午夜 | 国内自拍偷拍一区 | 国产在线a| 午夜天堂精品久久久久 | 久久青 | 精品亚洲一区二区三区 | 超碰成人在线观看 | 精品久久一区二区三区 | 一级二级三级在线观看 | 亚洲精品av在线 | 中文字幕1区2区3区 亚洲国产成人精品女人久久久 | 日韩高清电影 | 99热在这里只有精品 | 久久福利网站 | av中文字幕在线 | av电影一区 | 亚洲精品乱码久久久久久蜜桃91 | 国内久久| 国产91亚洲精品 |