[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] XCP 1.1 question: How to add ISO SRs / PBDs to the cd-list with xe CLI?



What worked for me when adding centos iso images:

#create a directory to store isos
mkdir -p /var/opt/xen/iso_import/centos57
#put an iso there
mv CentOS-5.7-x86_64-bin-1of8.iso /var/opt/xen/iso_import/centos57/
#add it as an SR
xe sr-create name-label=centos57 type=iso 
device-config:location=/var/opt/xen/iso_import/centos57 
device-config:legacy_mode=true content-type=iso

The trick here is to create a subdirectory same as your name-label (looks like 
official documentation expects this to be done but never mentions that)

After adding more isos to that directory, 'xe sr-create' needs to be run again 
with the same parameters for them to appear in xe vdi-list

On Fri, Oct 21, 2011 at 01:32:28AM +0200, Mark Schneider wrote:
> Hello,
> 
> I need your kindly help. I spent already few days trying around but didn't
> achieve any success in installing VMs from local iso images (even any other 
> way
> like network install or local DVD-drive).
> 
> I have created SRs for local ISO images (s. below) on dom0 (XCP 1.1). I am
> missing the right command to add them to the cd-list as I want to install VMs
> from them (s. more details in attached file)
> 
> # ---
> xe sr-create host-uuid=a3a957e3-4602-45ef-a85c-56aa6320854b content-type=user
> name-label="Local LVM SR db02" shared=false device-config:device=/dev/cciss/
> c0d0p3 type=lvm
> 
> /var/opt/xen/iso_import:
> -rw-r--r-- 1 root root 310032384 Jul 28 13:12 CentOS-6.0-x86_64-minimal.iso
> -rw-r--r-- 1 root root 678428672 Oct  8 17:08 debian-6.0.3-amd64-CD-1.iso
> 
> xe sr-create name-label=squeeze-iso host-uuid=
> a3a957e3-4602-45ef-a85c-56aa6320854b  content-type=iso type=iso
> device-config:location=/var/opt/xen/iso_import/debian-6.0.3-amd64-CD-1.iso
> device-config:legacy_mode=true
> ce67b68c-f896-aeec-a7d6-5944da2e30e7
> 
> xe sr-create name-label=centos6-iso host-uuid=
> a3a957e3-4602-45ef-a85c-56aa6320854b  content-type=iso type=iso
> device-config:location=/var/opt/xen/iso_import/CentOS-6.0-x86_64-minimal.iso
> device-config:legacy_mode=true
> 6cf47222-09eb-80b1-0c56-1b5f3a4717c6
> 
> 
> xe cd-list
> uuid ( RO)          : 6abb07a4-147b-4cfe-aca0-decda2f110dd
>     name-label ( RW): xs-tools.iso
> 
> 
> uuid ( RO)          : 543c2e13-8db8-4959-b3b7-2722d5380473
>     name-label ( RW): IDE 1.0
> # ---
> 
> 
> I am getting errors when trying to create as follows:
> # ---
> [root@xendom0db02 opt]# xe vdi-create name-label=squeeze.iso sr-uuid=
> 6cf47222-09eb-80b1-0c56-1b5f3a4717c6 type=user virtual-size=0
> Error code: SR_BACKEND_FAILURE_78
> Error parameters: , VDI Creation failed [opterr=could not create file: "/var/
> opt/xen/iso_import/CentOS-6.0-x86_64-minimal.iso/
> 9e29653c-f64e-4724-b268-71177d711dc6.img"],
> # ---
> 
> I was of course reading all XenServer 5.6 1.2 Edition pdf docs however I 
> didn't
> find what I looked for.
> 
> What do I miss? Thank you in advance for any hints.
> 
> Regards, Mark
> 
> --
> ms@xxxxxxxxxxxxxxxxxxxxxx
> 
> #-----------------------------------------------------------------------------------------------------------------------------------------------
> xe pbd-list
> uuid ( RO)                  : 138e7fa4-75ec-74e6-d208-0162a84bfe7c
>              host-uuid ( RO): a3a957e3-4602-45ef-a85c-56aa6320854b
>                sr-uuid ( RO): d2df26c7-de51-71ed-d495-c9c6f78d33fa
>          device-config (MRO): location: /opt/xensource/packages/iso; 
> legacy_mode: true
>     currently-attached ( RO): true
> 
> 
> uuid ( RO)                  : 6bf0c379-9846-d411-4b6b-705b585bedec
>              host-uuid ( RO): a3a957e3-4602-45ef-a85c-56aa6320854b
>                sr-uuid ( RO): 20e92ad1-b34d-9325-3374-405a2505d0b4
>          device-config (MRO): location: /dev/xapi/block
>     currently-attached ( RO): true
> 
> 
> uuid ( RO)                  : 095934d3-7283-0dc6-246f-cdb22d7a0963
>              host-uuid ( RO): a3a957e3-4602-45ef-a85c-56aa6320854b
>                sr-uuid ( RO): 6cf47222-09eb-80b1-0c56-1b5f3a4717c6
>          device-config (MRO): location: 
> /var/opt/xen/iso_import/CentOS-6.0-x86_64-minimal.iso; legacy_mode: true
>     currently-attached ( RO): true
> 
> 
> uuid ( RO)                  : 8a545e27-e2c0-c9aa-a235-a69f0aa4b655
>              host-uuid ( RO): a3a957e3-4602-45ef-a85c-56aa6320854b
>                sr-uuid ( RO): ce67b68c-f896-aeec-a7d6-5944da2e30e7
>          device-config (MRO): location: 
> /var/opt/xen/iso_import/debian-6.0.3-amd64-CD-1.iso; legacy_mode: true
>     currently-attached ( RO): true
> 
> 
> uuid ( RO)                  : 9678bb8d-cd41-8fe4-7a64-0cec192bf660
>              host-uuid ( RO): a3a957e3-4602-45ef-a85c-56aa6320854b
>                sr-uuid ( RO): 98af1fe0-8b77-e831-fb9f-5d797330ac30
>          device-config (MRO): device: /dev/cciss/c0d0p3
>     currently-attached ( RO): true
> 
> 
> uuid ( RO)                  : 08b4d8ef-3951-f530-6d32-e4059ab27e18
>              host-uuid ( RO): a3a957e3-4602-45ef-a85c-56aa6320854b
>                sr-uuid ( RO): 6d3e4bb1-5e0e-d926-c28a-3dfa74f9db42
>          device-config (MRO): location: /dev/xapi/cd
>     currently-attached ( RO): true
> 
> 

> [root@xendom0db02 ~]#
> 
> xe sr-create host-uuid=a3a957e3-4602-45ef-a85c-56aa6320854b content-type=user 
> name-label="Local LVM SR db02" shared=false 
> device-config:device=/dev/cciss/c0d0p3 type=lvm
> 
> 
> 
> /var/opt/xen/iso_import:
> -rw-r--r-- 1 root root 310032384 Jul 28 13:12 CentOS-6.0-x86_64-minimal.iso
> -rw-r--r-- 1 root root 678428672 Oct  8 17:08 debian-6.0.3-amd64-CD-1.iso
> 
> xe sr-create name-label=squeeze-iso 
> host-uuid=a3a957e3-4602-45ef-a85c-56aa6320854b  content-type=iso type=iso 
> device-config:location=/var/opt/xen/iso_import/debian-6.0.3-amd64-CD-1.iso 
> device-config:legacy_mode=true
> ce67b68c-f896-aeec-a7d6-5944da2e30e7
> 
> xe sr-create name-label=centos6-iso 
> host-uuid=a3a957e3-4602-45ef-a85c-56aa6320854b  content-type=iso type=iso 
> device-config:location=/var/opt/xen/iso_import/CentOS-6.0-x86_64-minimal.iso 
> device-config:legacy_mode=true
> 6cf47222-09eb-80b1-0c56-1b5f3a4717c6
> 
> 
> xe cd-list
> uuid ( RO)          : 6abb07a4-147b-4cfe-aca0-decda2f110dd
>     name-label ( RW): xs-tools.iso
> 
> 
> uuid ( RO)          : 543c2e13-8db8-4959-b3b7-2722d5380473
>     name-label ( RW): IDE 1.0
> 
> 
> [root@xendom0db02 opt]# xe sr-list
> uuid ( RO)                : d2df26c7-de51-71ed-d495-c9c6f78d33fa
>           name-label ( RW): XenServer Tools
>     name-description ( RW): XenServer Tools ISOs
>                 host ( RO): xendom0db02
>                 type ( RO): iso
>         content-type ( RO): iso
> 
> 
> uuid ( RO)                : 6cf47222-09eb-80b1-0c56-1b5f3a4717c6
>           name-label ( RW): centos6-iso
>     name-description ( RW):
>                 host ( RO): xendom0db02
>                 type ( RO): iso
>         content-type ( RO): iso
> 
> 
> uuid ( RO)                : 20e92ad1-b34d-9325-3374-405a2505d0b4
>           name-label ( RW): Removable storage
>     name-description ( RW):
>                 host ( RO): xendom0db02
>                 type ( RO): udev
>         content-type ( RO): disk
> 
> 
> uuid ( RO)                : 6d3e4bb1-5e0e-d926-c28a-3dfa74f9db42
>           name-label ( RW): DVD drives
>     name-description ( RW): Physical DVD drives
>                 host ( RO): xendom0db02
>                 type ( RO): udev
>         content-type ( RO): iso
> 
> 
> uuid ( RO)                : 98af1fe0-8b77-e831-fb9f-5d797330ac30
>           name-label ( RW): Local LVM SR db02
>     name-description ( RW):
>                 host ( RO): xendom0db02
>                 type ( RO): lvm
>         content-type ( RO): user
> 
> 
> uuid ( RO)                : ce67b68c-f896-aeec-a7d6-5944da2e30e7
>           name-label ( RW): squeeze-iso
>     name-description ( RW):
>                 host ( RO): xendom0db02
>                 type ( RO): iso
>         content-type ( RO): iso
> 
> 
> xe vdi-create sr-uuid=98af1fe0-8b77-e831-fb9f-5d797330ac30 type=user 
> virtual-size=64000MiB name-label="VDI squeeze" sm-config:type=raw
> e2fcae46-8f96-4a5c-baca-38e2112632fa
> 
> xe vdi-create sr-uuid=98af1fe0-8b77-e831-fb9f-5d797330ac30 type=user 
> virtual-size=64000MiB name-label="VDI centos6" sm-config:type=raw
> 3691b312-0df4-47ea-adc6-5b69f522cf9a
> 
> xe network-create name-label=lan10
> c7c31992-c2b8-a18f-ea74-17bf169cd546
> 
> xe vm-install new-name-label=centos6 template=Red\ Hat\ Enterprise\ Linux\ 6\ 
> \(64-bit\) sr-name-label=Local\ LVM\ SR\ db02
> fed23452-5404-189a-4334-371acf82e25a
> 
> xe vif-create vm-uuid=fed23452-5404-189a-4334-371acf82e25a 
> network-uuid=c1adceab-7a29-9458-cf9c-0b3981d3b9e7 mac=random device=0
> 05914bc6-883a-405a-4219-4c3db70f6ccd
> 
> xe vbd-create vdi-uuid=3691b312-0df4-47ea-adc6-5b69f522cf9a 
> vm-uuid=fed23452-5404-189a-4334-371acf82e25a device=0
> 474008ef-41d6-7c63-7ae8-47f118b77a10
> 
> xe vbd-param-set uuid=474008ef-41d6-7c63-7ae8-47f118b77a10 bootable=false
> 
> xe vm-install new-name-label=squeeze 
> sr-uuid=98af1fe0-8b77-e831-fb9f-5d797330ac30 template=Debian\ Squeeze\ 6.0\ 
> \(64-bit\)\ \(experimental\)
> 5c1518ec-998a-b780-8a63-11b7ece52785
> 
> xe vbd-param-set uuid=e882892e-b157-c004-dd66-36ec17af7676 bootable=false
> 
> # 
> ------------------------------------------------------------------------------------------------------------------------------------------------------
> [root@xendom0db02 opt]# xe vdi-create name-label=squeeze.iso 
> sr-uuid=6cf47222-09eb-80b1-0c56-1b5f3a4717c6 type=user virtual-size=0
> Error code: SR_BACKEND_FAILURE_78
> Error parameters: , VDI Creation failed [opterr=could not create file: 
> "/var/opt/xen/iso_import/CentOS-6.0-x86_64-minimal.iso/9e29653c-f64e-4724-b268-71177d711dc6.img"],
> 
> # ---
> [root@xendom0db02 opt]# xe cd-list
> uuid ( RO)          : 6abb07a4-147b-4cfe-aca0-decda2f110dd
>     name-label ( RW): xs-tools.iso
> 
> 
> uuid ( RO)          : 543c2e13-8db8-4959-b3b7-2722d5380473
>     name-label ( RW): IDE 1.0
> 
> # ---
> [root@xendom0db02 iso_import]# xe pbd-list
> uuid ( RO)                  : 138e7fa4-75ec-74e6-d208-0162a84bfe7c
>              host-uuid ( RO): a3a957e3-4602-45ef-a85c-56aa6320854b
>                sr-uuid ( RO): d2df26c7-de51-71ed-d495-c9c6f78d33fa
>          device-config (MRO): location: /opt/xensource/packages/iso; 
> legacy_mode: true
>     currently-attached ( RO): true
> 
> 
> uuid ( RO)                  : 6bf0c379-9846-d411-4b6b-705b585bedec
>              host-uuid ( RO): a3a957e3-4602-45ef-a85c-56aa6320854b
>                sr-uuid ( RO): 20e92ad1-b34d-9325-3374-405a2505d0b4
>          device-config (MRO): location: /dev/xapi/block
>     currently-attached ( RO): true
> 
> 
> uuid ( RO)                  : 095934d3-7283-0dc6-246f-cdb22d7a0963
>              host-uuid ( RO): a3a957e3-4602-45ef-a85c-56aa6320854b
>                sr-uuid ( RO): 6cf47222-09eb-80b1-0c56-1b5f3a4717c6
>          device-config (MRO): location: 
> /var/opt/xen/iso_import/CentOS-6.0-x86_64-minimal.iso; legacy_mode: true
>     currently-attached ( RO): true
> 
> 
> uuid ( RO)                  : 8a545e27-e2c0-c9aa-a235-a69f0aa4b655
>              host-uuid ( RO): a3a957e3-4602-45ef-a85c-56aa6320854b
>                sr-uuid ( RO): ce67b68c-f896-aeec-a7d6-5944da2e30e7
>          device-config (MRO): location: 
> /var/opt/xen/iso_import/debian-6.0.3-amd64-CD-1.iso; legacy_mode: true
>     currently-attached ( RO): true
> 
> 
> uuid ( RO)                  : 9678bb8d-cd41-8fe4-7a64-0cec192bf660
>              host-uuid ( RO): a3a957e3-4602-45ef-a85c-56aa6320854b
>                sr-uuid ( RO): 98af1fe0-8b77-e831-fb9f-5d797330ac30
>          device-config (MRO): device: /dev/cciss/c0d0p3
>     currently-attached ( RO): true
> 
> 
> uuid ( RO)                  : 08b4d8ef-3951-f530-6d32-e4059ab27e18
>              host-uuid ( RO): a3a957e3-4602-45ef-a85c-56aa6320854b
>                sr-uuid ( RO): 6d3e4bb1-5e0e-d926-c28a-3dfa74f9db42
>          device-config (MRO): location: /dev/xapi/cd
>     currently-attached ( RO): true
> 

> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.