zoukankan      html  css  js  c++  java
  • 动手构建云计算(2)xen 的安装使用 (在slc5.5 上)

    slc5.5是cern基于scientific linux 和 rhel5X开发的。

    在lxc002,lxc003上安装xen作为虚拟机的hypervisor

    1.安装xen:

    yum install xen
    yum install virt-manager
    yum install virt-viewer

    #编辑grub,设置default=0

    vi /boot/grub/menu.lst

    reboot

    #重启后查看内核,应该是2.6.*xen

    uname -a

    2.安装虚拟机

    #创建虚拟机文件

    dd if=/dev/zero of=/vm/vm-slc6x.img bs=1 count=1 seek=15G
    #通过http方式安装slc6操作系统
    virt-install --paravirt --name=vm-slc6x --ram=4096 --vcpus=1 --file=/vm/vm-slc6x.img -l http://mirror.****.ac.cn/slc/slc6X/i386


    3. 管理虚拟机

    Common 'xm' commands:

     console              Attach to <Domain>'s console.                     
     create               Create a domain based on <ConfigFile>.            
     destroy              Terminate a domain immediately.                   
     dump-core            Dump core for a specific domain.                  
     help                 Display this message.                             
     list                 List information about all/some domains.          
     mem-set              Set the current memory usage for a domain.        
     migrate              Migrate a domain to another machine.              
     pause                Pause execution of a domain.                      
     reboot               Reboot a domain.                                  
     restore              Restore a domain from a saved state.              
     save                 Save a domain state to restore later.             
     shutdown             Shutdown a domain.                                
     trigger              Send a trigger to a domain.                       
     top                  Monitor a host and the domains in real time.      
     unpause              Unpause a paused domain.                          
     uptime               Print uptime for a domain.                        
     vcpu-set             Set the number of active VCPUs for allowed for the domain.

    #xm list 查看虚拟机

    Name                                      ID Mem(MiB) VCPUs State   Time(s)
    Domain-0                                   0     7035    16 r-----   1229.6
    vm-slc6x                                   7     4096     1 -b----     13.6

    #xm console vm-slc6x 登陆虚拟机

    #xm shutdown vm-slc6x 关闭虚拟机

    #xm create vm-slc6x 启动虚拟机
  • 相关阅读:
    Codeforces Round #494 (Div. 3) D. Coins and Queries (贪心,数学)
    Codeforces Round #645 (Div. 2) D. The Best Vacation (贪心,二分)
    Codeforces Round #481 (Div. 3) F. Mentors (模拟,排序)
    Codeforces Round #646 (Div. 2) B. Subsequence Hate (思维,前缀和)
    windows的类似shell 命令操作 风行天下
    Linux防火墙iptables的策略 风行天下
    HP服务器安装配置教程 风行天下
    zabbix 监控数据库 及 tcp连接数 风行天下
    Linux日志 风行天下
    CENTOS 挂载ntfs移动硬盘 风行天下
  • 原文地址:https://www.cnblogs.com/Donal/p/1955031.html
Copyright © 2011-2022 走看看