티스토리 뷰

출처 : http://wysotsky.info/%D1%81%D0%BE%D0%B7%D0%B4%D0%B0%D0%BD%D0%B8%D0%B5-%D0%B2%D0%B8%D1%80%D1%82%D1%83%D0%B0%D0%BB%D1%8C%D0%BD%D0%BE%D0%B9-%D0%BC%D0%B0%D1%88%D0%B8%D0%BD%D1%8B-%D0%B2-xenserver-%D0%B8%D0%B7-%D0%BA%D0%BE/


I need to create virtual machine on XenServer (6.2.0) but I have access to console/SSH only

Solution:

  1. Virtual machine based on template. For select template execute:
    xe template-list
  2. After selecting template, create VM:
    xe vm-install template="Debian Wheezy 7.0 (32-bit)" new-name-label="newVM"

    so VM based on Debian Wheezy 7.0 (32-bit) template, VM name is newVM
    Last command execution produced UUID for created VM

  3. Disable boot from VM hard disk:
    xe vbd-list vm-uuid=[VM uuid] userdevice=0
    xe vbd-param-set uuid=[device UUID] bootable=false
    
  4. Choose boot disk for VM (in ths case – Debian install image from NFS):
    xe cd-list
    xe vm-cd-add vm="newVM" cd-name="debian-7.0.0-i386-netinst.iso" device=3
    xe vbd-list vm-name-label="newVM" userdevice=3
    xe vbd-param-set  uuid=[device uuid] bootable=true
    xe vm-param-set uuid=[VM uuid] other-config:install-repository=cdrom
    
  5. Get network interface list on host:
    xe network-list

    add physical network interface to VM:

    xe vif-create vm-uuid=[VM uuid] network-uuid=[network uuid] mac="[new mac address]" device=0
    
  6. Change memory settings. By default, XenServer create debian VM with 256M RAM, check it out
    xe vm-list name-label="newVM" params=all |grep memory
    

    and change VM RAM to 1GB if needed

    xe vm-memory-limits-set dynamic-max=1GiB dynamic-min=1GiB static-max=1GiB static-min=1GiB name-label="newVM"
    
  7. Change disk size. By default, XenServer create debian VM with 8 GB disk, check it out
    xe vm-disk-list vm="newVM"
    

    Change disk size, for example to 20 GB, if need

    xe vdi-resize uuid=[VDI uuid] disk-size=20GiB
    
  8. Start VM:
    xe vm-start vm=newVM
    

For connect to installed VM console use VNC:

  • retrieve VM domain number:
    xe vm-param-list uuid=[VM uuid] | grep dom-id
  • retrieve VNC port for this domain:
    xenstore-read /local/domain/[domain]/console/vnc-port
  • remote connection ([port] – last two digits from previous output):
    vncviewer -via root@[xenserver] localhost:[port]


'xenserver' 카테고리의 다른 글

Remove hanging VDI-s in XenServer CLI  (0) 2016.07.25
xenserver local type SR 삭제하기  (0) 2016.07.25
Citrix XenServer - Seri 1 (Storage)  (0) 2016.05.15
XenServer - VDI is not available  (0) 2016.05.15
XenServer Host, PBD, SR, VDI, VBD, VM  (0) 2016.05.15
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2024/05   »
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
글 보관함