Skip to content
uretgec edited this page Mar 19, 2013 · 9 revisions

1 XenServer ve XenCenter aynı sürümde olması gerekiyor aksi durumda free license alamıyorsun çünkü disable oluyor o buton.

CD'den boot etmek ve Xencenter'dan dilediğin seçimi yapmak için gerekli işlem sırası. ssh ile:

You have installed Citrix Xen Cloud Platform (XCP) and configured it (including network, templates, OS ISO’s etc.; even you have created your first VM with the help of documentation provided by Citrix but when you try to boot your VM for first time it throws following error as Citrix is not able to boot the VM from CD/DVD drives which are attached to it.

 [root@xcp1-slave2 iso]# xe vm-start uuid=5ce47d4e-227c-9d1e-4710-21b7c998318e

Error code: INVALID_SOURCE Error parameters: Unable to access a required file in the specified repository: file:///tmp/cdrom-repo-vIHKIE/install.amd/xen/vmlinuz.,

The problem here is the boot order for the VM is not properly set (through Template) at the time of VM creation and VM remains Halted

 [root@xcp1-slave2 ~]# xe vm-list uuid=5ce47d4e-227c-9d1e-4710-21b7c998318e

uuid ( RO) : 5ce47d4e-227c-9d1e-4710-21b7c998318e name-label ( RW): test power-state ( RO): halted To fix this error first we need to check the boot sequence for the VM. Use following command to check it

 [root@xcp1-slave2 iso]# xe vm-param-list uuid=5ce47d4e-227c-9d1e-4710-21b7c998318e | grep HVM-boot

HVM-boot-policy ( RW): HVM-boot-params (MRW):

The above output shows that boot order is not set (“HVM-boot-params (MRW)” is blank) for the VM. Now, execute following command to set boot sequence of the VM

 [root@xcp1-slave2 iso]# xe vm-param-set uuid=5ce47d4e-227c-9d1e-4710-21b7c998318e HVM-boot-policy=”BIOS order” HVM-boot-params:order=”dc”

Verify the boot order now.

 [root@xcp1-slave2 iso]# xe vm-param-list uuid=5ce47d4e-227c-9d1e-4710-21b7c998318e | grep HVM-boot

HVM-boot-policy ( RW): BIOS order HVM-boot-params (MRW): order: dc We can see that boot order (HVM-boot-params (MRW)) is set to “dc” i.e. CD/DVD

Thats it!!! You should able to start the VM and boot it from ISO you have mounted.

 [root@xcp1-slave2 iso]# xe vm-list uuid=5ce47d4e-227c-9d1e-4710-21b7c998318e

uuid ( RO) : 5ce47d4e-227c-9d1e-4710-21b7c998318e name-label ( RW): test power-state ( RO): running

Read more: http://eitwebguru.com/citrix-xen-vm-boot-error-code-invalid_source-unable-to-boot-from-cddvd/

2 Yeni bir ISO klasörü oluşturmak istiyorsun?

Step 1 – Creating the ISO Library Folder

Connect to the XenServer using SSH and then issue the following command:

“mkdir -p /var/opt/xen/ISO_Store“

Step 2 – Create a ISO Storage Repository

Issue the following command within an SSH session:

“xe sr-create name-label=LocalISO type=iso device-config:location=/var/opt/xen/ISO_Store device-config:legacy_mode=true content-type=iso“

Bu alan muhtemelen size yetmeyecektir. 4GB çünkü. Local storage kısmını kullanmanız gerekir.

df -h ile mevcut strage lara bakın ve Localstrage olanını bulun. herkesin farklı bir klasör adı olabilir. Bendeki var/opt/xen/iso_import olarak gözüküyor. İçine ISO_Storage isimli bir klasör açıp 1Bdan byük iso dosyalarını buraya wget ile çekebilirim artık. SSH ile mkdir ile klasörü oluşturup cd ile klasörün içine girip wget -c ile sınırsız dosya indirme yapabilirim artık.

Xencenterdada görünmesi için bunu storage olarak atamam lazım:

  xe sr-create name-label=ISO_Storage type=iso device-config:location=/var/run/sr-mount/1b042bc0-16b3-fa45-f94d-7a6e4e3dafbe/ISO_Storage device-config:legacy_mode=true content-type=iso

2 Kısaca yazıyorum:

var/opt/xen/iso_import (mesela /var/run/sr-mount gibi ) bu yol her birinde farklı. var/opt/xen/iso_import 'un içine ISO_Storage isimli bir klasör açılması lazım. Artık wget ile isoları bu klasöre atmaya başlayabiliriz.

Bu isoları xendesktop ta görebilmek için kod:

  xe sr-create name-label=ISO_Storage type=iso device-config:location=/var/run/sr-mount/ISO_Stoage device-config:legacy_mode=true content-type=iso

Xen Desktopta hemen ISO_Storage isimli bir bölüm oluşacaktır. gerisi size ait.

3 oluşturulan yeni vm ye xen-ttols kurulumu hızlı yolu.

  mkdir /mnt/xs-tools
  mount /dev/xvdd /mnt/xs-tools
  cd /mnt/xs-tools/Linux/
  bash install.sh
Clone this wiki locally