Xen文本模式创建虚拟机

[root@test xen]# cd /var/lib/xen/images
[root@test images]# ls
cent02.img  centos.img
[root@test images]# dd if=/dev/zero of=/var/lib/xen/images/cent03.img bs=1M count=8000      //创建虚拟机硬盘镜像文件,8G
8000+0 records in
8000+0 records out

8388608000 bytes (8.4 GB) copied, 160.406 seconds, 52.3 MB/s


[root@test images]# virt-install --prompt            //启用应答模式的安装方式
What is the name of your virtual machine? cent03    //虚拟机名称
 How much RAM should be allocated (in megabytes)? 512    //内存大小
 What would you like to use as the disk (file path)? /var/lib/xen/images/cent03.img   //虚拟硬盘镜像文件路径
 What is the install URL? ftp://192.168.0.103/pub/install    //安装系统的源文件路径
 


开始安装......
搜索文件 .treeinfo......                                                              |  413 B     00:00     
搜索文件 vmlinuz......                                                                | 2.1 MB     00:00     
搜索文件 initrd.img......                                                             | 6.6 MB     00:00     
创建域......                                                                           |    0 B     00:01     
连接到域 cent03
换码符为 ^]
Linux version 2.6.18-164.el5xen (mockbuild@builder16.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Thu Sep 3 04:47:32 EDT 2009
BIOS-provided physical RAM map:
 Xen: 0000000000000000 - 0000000020800000 (usable)
0MB HIGHMEM available.
520MB LOWMEM available.
NX (Execute Disable) protection: active
ACPI in unprivileged domain disabled
Built 1 zonelists.  Total pages: 133120
Kernel command line:  method=ftp://192.168.0.103/pub/install
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
CPU 0 irqstacks, hard=c0750000 soft=c0730000
PID hash table entries: 4096 (order: 12, 16384 bytes)
Xen reported: 3192.658 MHz processor.
Console: colour dummy device 80x25
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Software IO TLB disabled
vmalloc area: e1000000-f4ffe000, maxmem 2d7fe000
Memory: 504960k/532480k available (2162k kernel code, 19044k reserved, 887k data, 176k init, 0k highmem)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Calibrating delay using timer specific routine.. 9487.51 BogoMIPS (lpj=18975024)
Security Framework v1.0.0 initialized
SELinux:  Initializing.
selinux_register_security:  Registering secondary module capability
Capability LSM initialized as secondary
Mount-cache hash table entries: 512
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L2 cache: 256K
CPU: L3 cache: 3072K
Checking 'hlt' instruction... OK.
SMP alternatives: switching to UP code
Freeing SMP alternatives: 13k freed
Brought up 1 CPUs
checking if image is initramfs... it is
Freeing initrd memory: 8464k freed
Grant table initialized
NET: Registered protocol family 16
Brought up 1 CPUs
PCI: setting up Xen PCI frontend stub
ACPI: Interpreter disabled.
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI: disabled
xen_mem: Initialising balloon driver.
usbcore: registered new driver usbfs
usbcore: registered new driver hub
PCI: System does not support PCI
PCI: System does not support PCI
NetLabel: Initializing
NetLabel:  domain hash size = 128
NetLabel:  protocols = UNLABELED CIPSOv4
NetLabel:  unlabeled traffic allowed by default
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 7, 524288 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
audit: initializing netlink socket (disabled)
type=2000 audit(1442039736.266:1): initialized
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Initializing Cryptographic API
alg: No test for crc32c (crc32c-generic)
ksign: Installing public key data
Loading keyring
- Added public key 581431131FF6A527
- User ID: CentOS (Kernel Module GPG key)
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
rtc: IRQ 8 is not free.
Non-volatile memory driver v1.2
Linux agpgart interface v0.101 (c) Dave Jones
brd: module loaded
Xen virtual console successfully installed as xvc0
Linux version 2.6.18-164.el5xen (mockbuild@builder16.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Thu Sep 3 04:47:32 EDT 2009
BIOS-provided physical RAM map:
 Xen: 0000000000000000 - 0000000020800000 (usable)
0MB HIGHMEM available.
520MB LOWMEM available.
NX (Execute Disable) protection: active
ACPI in unprivileged domain disabled
Built 1 zonelists.  Total pages: 133120
Kernel command line:  method=ftp://192.168.0.103/pub/install
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
CPU 0 irqstacks, hard=c0750000 soft=c0730000
PID hash table entries: 4096 (order: 12, 16384 bytes)
Xen reported: 3192.658 MHz processor.
Console: colour dummy device 80x25
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Software IO TLB disabled
vmalloc area: e1000000-f4ffe000, maxmem 2d7fe000
Memory: 504960k/532480k available (2162k kernel code, 19044k reserved, 887k data, 176k init, 0k highmem)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Calibrating delay using timer specific routine.. 9487.51 BogoMIPS (lpj=18975024)
Security Framework v1.0.0 initialized
SELinux:  Initializing.
selinux_register_security:  Registering secondary module capability
Capability LSM initialized as secondary
Mount-cache hash table entries: 512
CPU: L1 I cache: 32K, L1 D cache: 32K
CPU: L2 cache: 256K
CPU: L3 cache: 3072K
Checking 'hlt' instruction... OK.
SMP alternatives: switching to UP code
Freeing SMP alternatives: 13k freed
Brought up 1 CPUs
checking if image is initramfs... it is
Freeing initrd memory: 8464k freed
Grant table initialized
NET: Registered protocol family 16
Brought up 1 CPUs
PCI: setting up Xen PCI frontend stub
ACPI: Interpreter disabled.
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI: disabled
xen_mem: Initialising balloon driver.
usbcore: registered new driver usbfs
usbcore: registered new driver hub
PCI: System does not support PCI
PCI: System does not support PCI
NetLabel: Initializing
NetLabel:  domain hash size = 128
NetLabel:  protocols = UNLABELED CIPSOv4
NetLabel:  unlabeled traffic allowed by default
NET: Registered protocol family 2
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 7, 524288 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
audit: initializing netlink socket (disabled)
type=2000 audit(1442039736.266:1): initialized
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Initializing Cryptographic API
alg: No test for crc32c (crc32c-generic)
ksign: Installing public key data
Loading keyring
- Added public key 581431131FF6A527
- User ID: CentOS (Kernel Module GPG key)
io scheduler noop registered
                   |       Croatian               :        |                    
Welcome to CentOS                                                               
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                 +------+ Would you like to use VNC? +-------+                  
                 |                                           |                  
                 | The VNC mode installation offers more     |                  
                 | functionality than the text mode, would   |                  
                 | you like to use it instead?               |                  
                 |                                           |                  
                 |   +---------------+      +-----------+    |                  
                 |   | Use text mode |      | Start VNC |    |                  
                 |   +---------------+      +-----------+    |                  
                 |                                           |                  
                 |                                           |                  
                 +-------------------------------------------+                  
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
  <Tab>/<Alt-Tab> between elements   |  <Space> selects   |  <F12> next screen 



[root@test images]# ls
cent02.img  cent03.img  centos.img
[root@test images]# pwd
/var/lib/xen/images     //默认镜像文件存放路径


[root@test xen]# ls
auto    cent03  qemu-ifup  xend-config.sxp          xend-pci-quirks.sxp  xmexample2     xmexample.vti
cent02  centos  scripts    xend-pci-permissive.sxp  xmexample1           xmexample.hvm
[root@test xen]# pwd
/etc/xen   //默认配置文件存放路径


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值