1.xen 配置文件
半虚拟化配置文件:
配置文件:/etc/xen/domain-u
name = "test" 虚拟机名字
uuid = "a9232d71-b814-06d4-1935-a075a9b1dc47" 要唯一
maxmem = 512 系统起动时占用的内存
memory = 512 最大能使用的内存
vcpus = 1 CPU核数
bootloader = "/usr/bin/pygrub"
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
vfb = [ "type=vnc,vncunused=1,keymap=en-us" ]
disk = [ "tap:aio:/test/test.img,xvda,w" ] 镜像文件的位置
vif = [ "mac=00:16:3e:7a:d2:83,bridge=xenbr0" ]
2.全虚拟化配置文件
name = "win2003"
uuid = "e910cfb3-30d7-6ea2-5f98-270c36569475"
maxmem = 1024
memory = 1024 内存
vcpus = 2 CPU资源
builder = "hvm"
kernel = "/usr/lib/xen/boot/hvmloader"
boot = "c"
pae = 1
acpi = 1
apic = 1
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-dm"
sdl = 0
vnc = 1
vncunused = 1
keymap = "en-us"
disk = [ "file:/xen/windows2003,hda,w","file:/app/windows2003d.img,hdb,w" ] 镜像文件
vif = [ "mac=00:1C:C4:A9:75:72,bridge=xenbr0,type=ioemu" ]
serial = "pty"
常用命令:
xm list 查看物理机上所有虚拟机运行状态
xm console 用终端的方式进入虚拟机
xm reboot 重起虚拟机
xm shutdown 关闭虚机
xm destroy 强制关闭虚拟机
文字安装虚拟机
VIRT-INSTALL
半虚拟化安装方式
EXAMPLES
Install a paravirtualized Xen guest, 500 MB of RAM, a 5 GB of disk, and Fedora Core 6 from a web server, in text-only mode:
# virt-install \
--paravirt \
--name demo \
--ram 500 \
--file /var/lib/xen/images/demo.img \
--file-size 6 \
--nographics \
--location
全虚拟化安装
Run a Live CD image under Xen fullyvirt, in diskless environment
# virt-install \
--hvm \
--name demo \
--ram 500 \
--nodisk \
--livecd \
--vnc \
--cdrom /root/fedora7live.iso
也可以通过形图界面来安装
阅读(1023) | 评论(0) | 转发(0) |