1.å¦ä½å¨Xen HVM ä¸å®è£
Windows 7
2.linuxç³»ç»centos6.5 å¦ä½å®è£
xrdp
å¦ä½å¨Xen HVM ä¸å®è£ Windows 7
Xen èæãWindows 7 çå¿ å¤æ¡ä»¶
æ¬ç« å设主系ç»è¿è¡çå æ ¸å¯ä»¥è·Xen并ä¸å®è£ äºæ åçXenå·¥å ·ï¼å¦xmï¼ï¼å¦å¤ï¼ç¡¬ä»¶èæåè¦æ±ä¸»ç³»ç»ç硬件æ¯æIntel-VT æ AMD-V çèæåï¼ä¸ºäºéªè¯è¿ä¸ªå¯ä»¥å¨ä¸»ç³»ç»ä¸è¿è¡ä¸ä¸å½ä»¤
å¯¹äº Intel CPU: grep vmx /proc/cpuinfo å¯¹äº AMD CPU: grep svm /proc/cpuinfo
å¦æ以ä¸å½ä»¤æ§è¡å没æä»»ä½è¾åºï¼é£ä¹è¯´æä½ ç硬件ä¸æ¯æè¿äºç¹æ§ï¼è·ä¸èµ·æ¥Xen HVM客æ·æºã
Windows 7 çå®è£ æ¹å¼
è¦å¨Xen HVMä¸å®è£ window 7ï¼é¦å éè¦windows
7çå®è£ çï¼æè ä»Microsoftçå®æ¹ç½ç«ä¸ä¸è½½ISOéåä¹å¯ä»¥ãç¶åå°±éè¿å çææ¯éåå®è£ å³å¯ã
å¦è¦éè¿å çå¶ä½ä¸ä¸ªéåï¼è¯·æå çæ¾å ¥å 驱ï¼å¦æè¿è¡äºèªå¨å 载请å å¸è½½ï¼ç¶åæ§è¡ä»¥ä¸å½ä»¤ï¼æ¯å¦å 驱æ¯/dev/cdromï¼
dd if=/dev/cdrom of=windows7.iso
为Windows 7 åå¤åå¨ç©ºé´
å¨å®¢æ·æºå®è£ Windows 7 æä½ç³»ç»å½ç¶éè¦ä¸ºå®åå¤ç©ºé´äºãè¿ä¸ªç©ºé´å¯ä»¥æ¯ä¸ä¸ªç©ççç£ç驱å¨å¨ï¼ä¹å¯ä»¥æ¯ä¸ä¸ªç£çéåæ件ãå¦ææ¯ä¸ä¸ªç£ç驱å¨å¨ï¼è¯·æ³¨æå®ç设å¤å称ãéå¸¸æ¯ /dev/sd or /dev/hdï¼åé¢è·ä¸ä¸ªåæ¯ï¼å¦/dev/sdc or /dev/hdbï¼ çæä¸ä¸ªç£çéåå¯ç¨å¦ä¸ddå½ä»¤è¡å·¥å ·:
dd if=/dev/zero of=xenwin7.img bs=k seek= count=0
è¿æ¡å½ä»¤å°±å建äºä¸ä¸ªGbçéåæ件ï¼å为xenwin7.imgã
å建Xen Windows 7çé ç½®æ件
ä¸ä¸æ¥å°±æ¯å建Windows 7ä½ä¸ºXen客æ·æºæå¿ é¡»çé ç½®æ件ï¼ä¸é¢å°±æ¯ä¸ä¸ªWindows 7 Xen客æ·æºçæå°é ç½®çä¾åï¼
import os,源码s扫描器 源码 re
arch = os.uname()[4]
if re.search('', arch):
arch_libdir = 'lib'
else:
arch_libdir='lib'
kernel = "/usr/lib/xen/boot/hvmloader"
builder='hvm'
memory =
# Should be at least 2KB per MB of domain memory, plus a few MB per vcpu.
shadow_memory = 8
name = "xenwin7"
vif = [ 'type=ioemu, bridge=xenbr0' ]
acpi = 1
apic = 1
disk = [ 'file:/home/xen/xenwin7.img,hda,w', 'file:/home/xen/windows7.iso,hdc:cdrom,r' ]
device_model = '/usr/' + arch_libdir + '/xen/bin/qemu-dm'
#-----------------------------------------------------------------------------
# boot on floppy (a), hard disk (c) or CD-ROM (d)
# default: hard disk, cd-rom, floppy
boot="dc"
sdl=0
vnc=1
vncconsole=1
vncpasswd=''
serial='pty'
usbdevice='tablet'
ä¸é¢çä¾åæ¯ç¨Windows 7çISOéåæ件å®è£ ï¼å¦ææ¯ç¨ç©çç£çæ¥å®è£ ï¼ç£çæ示符åºè¯¥æ¹æä¸é¢è¿æ ·ï¼ç¨ç©ç设å¤å代æ¿/dev/sdbï¼ï¼
disk = [ 'phy:/dev/sdb,hda,w', 'file:/home/xen/windows7.iso,hdc:cdrom,r' ]
æ以ï¼å¦ææ¯ç¨å çå®è£ ï¼å½ä»¤å¯ä»¥æ¹æå¦ä¸ï¼/dev/cdromæ¯ç©çå 驱çè·¯å¾ï¼ï¼
disk = [ 'phy:/dev/sdb,hda,w', 'phy:/dev/cdrom,hdc:cdrom.r' ]
ä¸é¢çå½ä»¤æ主系ç»ä¸ç©çä¸çç£ç驱å¨/dev/sdbæ å°å°å®¢æ·æºç/dev/hadï¼/dev/cdromæ å°å°å®¢æ·æºçCD/DVD 设å¤ï¼è¯·æ³¨æï¼ä¸»ç³»ç»ä¸çCD/DVD设å¤å¨ä¸ålinuxçåè¡çæ¬ä¸æ¯ä¸åçï¼ã
å¦ææ¯ç¨ç£çéåæ件æ¥å®è£ ï¼å½ä»¤è¡åºæ¢æï¼
disk = [ 'file:/home/xen/xenwin.img,hda,w', 'phy:/dev/cdrom,hdc:cdrom,r' ]
ä¸é¢ä¾åä¸å±ç¤ºçä¸ç³»åé ç½®ç设å®æ¯ä¸ºäºç»Windows 7客æ·æºå¯å¨ä¸ä¸ªå¾å½¢æ§å¶å°ãå½å®¢æ·æºè¿è¡çæ¶åï¼Xenå¯ä»¥æä¾VNC æè SDLçå¾å½¢æ§å¶å°ãä¸å¦ï¼ä¸é¢çå½ä»¤æ¯éæ©VNCçæ§å¶å°ï¼
vnc = 1
sdl=0
èè¿ä¸é¢çå½ä»¤æ¯éæ© SDLæ§å¶å°:
vnc = 0
sdl = 1
VNC
å SDLé½å¯ä¸ä¸ºWindows
7客æ·æºæä¾è¯å¥½çå¾åæ¾ç¤ºï¼å¹¶ä¸VNCæ¯SDLææ´å¤çä¼ç¹ãé¦å ï¼VNCå¨è¿ç¨è®¿é®æ¶æ¯SDLæ´çµæ´»ï¼æ 论æ¯å¨æ¬å°ç½ç»è¿æ¯éè¿è±ç¹ç½ï¼ææ¯å¨ä¸åç
ç³»ç»ä¸ï¼é½å¯ä»¥è¿æ¥ä¸å®¢æ·æºç³»ç»ãå ¶äºï¼å½ä½ å ³æVNC
viewerçªå£æ¶ï¼å®¢æ·æºä»ç¶å¨è¿è¡ï¼ä½ ä¸æ¬¡åè¿æ¥çæ¶åè¿æ¯å¯ä»¥åå°ä½ ä¸æ¬¡ç¦»å¼æ¶çç¶æãç¶èï¼å ³æSDLçªå£çæ¶åï¼å®¢æ·æºä¼ç«å»å ³æ并æå¯è½ä¸¢å¤±
æ°æ®ã
å¨é»è®¤æ åµä¸ï¼å½å®¢æ·æºå¯å¨çæ¶åï¼Xenä¸ä¼èªå¨å¯å¨VNCæ§å¶å°ãå¦ææ³è¦èªå¨å¯å¨ï¼é£ä¹å°±è¦è®¾ç½®å¦ä¸å½ä»¤ï¼
vncconsole=1
ä¸äºå ¶ä»çé ç½®é项ä¹å¯ä»¥è¢«è®¾ç½®ï¼ä½ä¸é¢ç设置æ¯è¿è¡ä¸ä¸ªWindows 7 客æ·æºçæå°é ç½®ãå½ä¸ä¸ªé ç½®æ件åå®ä¹åå¯ä»¥æå®ä¿å为xenwin7.cfgã
å¯å¨XençWindows 7 HVM客æ·æº
ææçé ç½®å®æä¹åï¼å°±å¯ä»¥å¯å¨Xen客æ·æºäºï¼
xm create xenwin7.cfg
Using config file "./xenwin7.cfg".
Started domain xenwin7
å ç§éä¹åï¼VNC ææ¯SDLï¼åå³äºä½ çé ç½®ï¼æ§å¶å°ä¼åºç°ï¼å¹¶ä¸ä¼å¯å¨Windows 7 çå®è£ ç¨åºï¼ä¸å¾å°±æ¯å¨VNCä¸Xen HVM 客æ·æºWindows 7çä¸ä¸ªå®ä¾
linuxç³»ç»centos6.5 å¦ä½å®è£ xrdp
CentOS6.5é»è®¤æ¯ä¸å¸¦XRDPæå¡å¨çï¼1ãå®è£ xrdpæå¡å¨åå¯å¨ã
2ã客æ·ç«¯è¿æ¥
1ï¼è¿éç¨ windows xp è¿æ¥
2ï¼é®çä¸ç WIN é®ï¼å°±æ¯å¾®è½¯å¾æ é£ä¸ªï¼ + r é®ï¼è°åºè¿è¡å¯¹è¯æ¡ï¼è¾å ¥mstscè°åº windowsè¿ç¨æ¡é¢è¿æ¥ã
3ï¼è¾å ¥æå¡å¨å°å:
4ï¼ è¾å ¥ç³»ç»å¸å·åå¯ç
5ï¼ ç¶åä¼åºç°å¦ä¸çæ¡ï¼å ç§åä¼èªå¨éåºï¼ç¶åå°±è¿å ¥ linux æ¡é¢äºã
2024-12-22 13:59
2024-12-22 13:44
2024-12-22 13:35
2024-12-22 13:16
2024-12-22 11:52
2024-12-22 11:35