Tag: xenserver

  • xenserver命令行操作

    虽然大部分的操作都可以通过xencenter来操作,但是使用CLI (command line interface)命令行接口来操作会使工作精细化

    查看角色列表

    xe role-list

    导出template

    xe template-export template-uuid=be4440c9-7af6-87eb-ebe0-58dc6c11908b filename=win2003-pure.xva

    导入

    xe vm-import filename=CentOS55.xva sr-uuid=6b0c60bc-035a-2963-67e1-928a426efed8

    虚拟机加电自动开机

    首先查看虚拟机列表xe vm-list

    uuid ( RO) : 3370bad3-2efa-c783-6008-0e34ggg92a0c
    name-label ( RW): Windows Server 2003 (32-bit)
    power-state ( RO): running

    记录下来uuid,使用

    xe vm-param-set uuid=3370bad3-2efa-c783-6008-0e34ggg92a0c other-config:auto_poweron=true

     

  • 在xenserver中添加iso文件

    一般添加iso都是为了装系统

    首先,登录xenserver的命令行界面,执行以下命令:

    mkdir /boot-iso
    xe sr-create name-label=boot-iso type=iso device-config:location=/boot-iso device-config:legacy_mode=true content-type=iso

    这样就创建了iso的存储库(SR-Storage Repositories),在XenCenter中可以看到多了一个boot-iso

    接下来使用SFTP(如filezilla)上传iso文件至主机的/boot-iso即可。

    注:

    1.如果不小心创建错误,或重复新增,想删除存储库时,就使用 XenCenter,直接选择Detach即可。

    2.上传iso文件至主机后,如果XenCenter不能同步显示,在 console 执行xe-toolstack-restart,XenCenter就可以识别到。