本文共 2497 字,大约阅读时间需要 8 分钟。
xen虚拟化实战系列文章列表
xen虚拟化实战系列(十三)之xen虚拟机集中管理之convirt
1)虚拟机配置文件的位置/etc/xen/test01 2) 虚拟机配置文件
# cat /etc/xen/test01
# cp /data/test01.img /data/test02.img
# cd /etc/xen/
# cp test01 test02 # vi test02 # 修改说明: (1) name修改为新虚拟机名称 (2) uuid把最后几个数据改变一下 (3) disk改为实际路径。 (4) vif修改网卡的MAC地址把最后几个数据改变一下
(1) 启动虚拟机
可以看到test02虚拟机已经启动。
(2) 控制台进入虚拟机
[root@node1 xen]# xm console test02
启动过程:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | rtc: IRQ 8 is not free. rtc: IRQ 8 is not free. i8042.c: No controller found. Red Hat nash version 5.1 . 19.6 starting Mounting proc filesystem Reading all physical volumes. This may take a while ... Found volume group "vg" using metadata type lvm2 2 logical volume(s) in volume group "vg" now active Welcome to Oracle Linux Oracle Linux Server release 5.8 Press 'I' to enter interactive startup. Starting udev: [ OK ] Loading default keymap (us): [ OK ] Setting hostname test01: [ OK ] Setting up Logical Volume Management: 2 logical volume(s) in volume group "vg" now active [ OK ] Checking filesystems Checking all file systems. [/sbin/fsck.ext3 ( 1 ) -- /] fsck.ext3 -a /dev/vg/root /dev/vg/root: clean, 120221 / 1277952 files, 774393 / 1277952 blocks [/sbin/fsck.ext3 ( 1 ) -- /boot] fsck.ext3 -a /dev/xvda1 /boot: recovering journal /boot: clean, 41 / 26104 files, 28206 / 104388 blocks [ OK ] Remounting root filesystem in read-write mode: [ OK ] Mounting local filesystems: [ OK ] Enabling local filesystem quotas: [ OK ] Enabling /etc/fstab swaps: [ OK ] INIT: Entering runlevel: 3 Entering non-interactive startup Applying Intel CPU microcode update: [FAILED] Starting background readahead: [ OK ] Checking for hardware changes [ OK ] [ OK ] iSCSI daemon: [ OK ] [ OK ] Applying ip6tables firewall rules: ip6tables-restore v1. 3.5 : ip6tables-restore: unable to initializetable 'filter' Error occurred at line: 3 Try `ip6tables-restore -h ' or ' ip6tables-restore --help' for more information. [FAILED] Bringing up loopback interface : [ OK ] [ OK ] Starting smartd: [ OK ] Oracle Linux Server release 5.8 Kernel 2.6 . 18 - 308 .el5xen on an x86_64 test01 login: |
(3) 修改虚拟机主机名
# vi /etc/hosts
# vi /etc/sysconfig/network
将test01修改为test02虚拟机名称
(4) 修改虚拟机IP地址
删除掉虚拟网卡配置文件
重新配置IP地址# vi /etc/sysconfig/network-script/ifcfg-eth0
注要:chkconfig sendmail off
本文转自 koumm 51CTO博客,原文链接:http://blog.51cto.com/koumm/1284621,如需转载请自行联系原作者