• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to add and remove local storage repository in xenserver

711

To add and remove local storage repository in xenserver

A XenServer Storage Repository is used to Store ISOs or Virtual Machine (VM) Virtual Disks (VDIs). The Storage Repository is connected to a XenServer through a Physical Block Device (PBD) which contains the configuration for the Storage Repository. Steps to add and remove local storage repository in xenserver is explained in this article.


To Create storage repository

First create storage directory by using “ mkdir” command.

[root@xenSR-linuxhelp ~]# mkdir local
[root@xenSR-linuxhelp ~]# mkdir local/ISO

Then list the all storage repositories using “ xe sr-list” command like below.

[root@xenSR-linuxhelp ~]# xe sr-list
uuid ( RO)                : e6d251f9-365b-6d46-5d64-deb236540298
          name-label ( RW): DVD drives
    name-description ( RW): Physical DVD drives
                host ( RO): xenSR-linuxhelp
                type ( RO): udev
        content-type ( RO): iso

uuid ( RO)                : 0c7778a7-4c08-87d5-72bd-1020fdf445f4
          name-label ( RW): Local storage
    name-description ( RW):
                host ( RO): xenSR-linuxhelp
                type ( RO): ext
        content-type ( RO): user
uuid ( RO)                : efb3a8d3-b553-305d-b3aa-048147e895dc
          name-label ( RW): Removable storage
    name-description ( RW):
                host ( RO): xenSR-linuxhelp
                type ( RO): udev
        content-type ( RO): disk

uuid ( RO)                : 645fc1db-7400-03e6-c33c-0d16f325a229
          name-label ( RW): XenServer Tools
    name-description ( RW): XenServer Tools ISOs
                host ( RO): xenSR-linuxhelp
                type ( RO): iso
        content-type ( RO): iso

Create storage repository by using following command..

[root@xenSR-linuxhelp ~]# xe sr-create name-label=repo-local type=iso device-config:legacy_mode=true device-config:location=/root/local/ISO content-type=iso
7ac13a79-e5ef-eb9f-d7f8-326d1bb228de

It creates a UUID for new storage repository.
1

Next list storage repository using “ xe sr-list ” command.

[root@xenSR-linuxhelp ~]# xe sr-list
uuid ( RO)                : e6d251f9-365b-6d46-5d64-deb236540298
          name-label ( RW): DVD drives
    name-description ( RW): Physical DVD drives
                host ( RO): xenSR-linuxhelp
                type ( RO): udev
        content-type ( RO): iso

uuid ( RO)                : 0c7778a7-4c08-87d5-72bd-1020fdf445f4
          name-label ( RW): Local storage
    name-description ( RW):
                host ( RO): xenSR-linuxhelp
                type ( RO): ext
        content-type ( RO): user

uuid ( RO)                : efb3a8d3-b553-305d-b3aa-048147e895dc
          name-label ( RW): Removable storage
    name-description ( RW):
                host ( RO): xenSR-linuxhelp
                type ( RO): udev
        content-type ( RO): disk

uuid ( RO)                : 645fc1db-7400-03e6-c33c-0d16f325a229
          name-label ( RW): XenServer Tools
    name-description ( RW): XenServer Tools ISOs
                host ( RO): xenSR-linuxhelp
                type ( RO): iso
        content-type ( RO): iso

uuid ( RO)                : 7ac13a79-e5ef-eb9f-d7f8-326d1bb228de
          name-label ( RW): repo-local
    name-description ( RW):
                host ( RO): xenSR-linuxhelp
                type ( RO): iso
        content-type ( RO): iso

Check UUID for which storage repository you want to remove. By using “ xe sr-list name-label=” command.

[root@xenSR-linuxhelp ~]# xe sr-list name-label=repo-local
uuid ( RO)                : 7ac13a79-e5ef-eb9f-d7f8-326d1bb228de
          name-label ( RW): repo-local
    name-description ( RW):
                host ( RO): xenSR-linuxhelp
                type ( RO): iso
        content-type ( RO): iso

Check UUID for pbd of that selected storage repository. By using UUID of that local storage repo.

root@xenSR-linuxhelp ~]# xe pbd-list sr-uuid=7ac13a79-e5ef-eb9f-d7f8-326d1bb228de
uuid ( RO)                  : 59679f4b-a66b-c621-3297-1990f2e467a9
             host-uuid ( RO): 1b2265f8-06fb-4980-8415-371e627efefb
               sr-uuid ( RO): 7ac13a79-e5ef-eb9f-d7f8-326d1bb228de
         device-config (MRO): legacy_mode: true  location: /root/local/ISO
    currently-attached ( RO): true

This command shows UUID of “ repo-local” storage pbd. Pbd means physical block device. Storage repository directly connect to xensever with the help of pbd. Unplug the pbd of storage repo from xenserver. “ Xe pbd-unplug” command can help to unplug it.

[root@xenSR-linuxhelp ~]# xe pbd-unplug uuid=59679f4b-a66b-c621-3297-1990f2e467a9

2
Then run the following command to remove that storage repo.

[root@xenSR-linuxhelp ~]# xe sr-forget uuid=7ac13a79-e5ef-eb9f-d7f8-326d1bb228de

3
Here the uuid is the storage repository uuid.

Tags:
michael
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

What is mean by the Virtual?

A

It's about the thing that not existing in physically and made by the application to do the same functionality as real.

Q

How can I create the storage repository in xen-server?

A

Run following command to create the storage repository as "xe sr-create name-label=repo-local type=iso device-config:legacy_mode=true device-config:location=/root/local/ISO content-type=iso

Q

It is advisable to make the changes in UUID for the particular virtual Disk in xen-server?

A

Duplicated UUID's can be a big problem on your machine. The most notable being your /etc/fstab file, which manages the mounting of partitions at boot time.

Q

What is mean by the "sr-list" that had mentioned in a document for xen-server?

A

It is nothing but server list in xen-server.

Q

Is it possible for able to suspend for the virtual disk in temporarily on xen-server?

A

You can't make the suspend functionality but still you can only to make the process of creating and delete the disk.

Related Tutorials in How to add and remove local storage repository in xenserver

Related Tutorials in How to add and remove local storage repository in xenserver

How to add additional hard disk in xenserver
How to add additional hard disk in xenserver
Jul 4, 2016
How to add and remove local storage repository in xenserver
How to add and remove local storage repository in xenserver
Jul 1, 2016
How to create network interface bond in XenServer 6.5
How to create network interface bond in XenServer 6.5
Jun 27, 2016
How to Create and Manage KVM Virtual Machine through Command Line in Linux
How to Create and Manage KVM Virtual Machine through Command Line in Linux
Jul 4, 2016
How to create virtual machine in Xenserver using XenCenter tool
How to create virtual machine in Xenserver using XenCenter tool
Jul 2, 2016
How to Install and Configure Citrix Xenserver 6.5
How to Install and Configure Citrix Xenserver 6.5
Jun 2, 2016
How to Migrate Virtual Machines using RHEV clusters
How to Migrate Virtual Machines using RHEV clusters
Jul 15, 2016
How to Setup RedHat Enterprise Virtualization Hypervisor in Linux
How to Setup RedHat Enterprise Virtualization Hypervisor in Linux
Jul 2, 2016

Related Forums in How to add and remove local storage repository in xenserver

Related Forums in How to add and remove local storage repository in xenserver

Virtual memory statistics
william class=
Failed to connect socket to /var/run/libvirt/libvirt-sock: No such file or directory
May 9, 2017
KVM
cameron class=
is it possible to suspend VMs in KVM
May 9, 2017
KVM
brayden class=
how to shutdown the virtual machine from command-line in KVM
May 8, 2017
Virtual appliance
elijah class=
How to import Virtual Box VM using VMWare
Nov 20, 2019
Virtualbox
isaiah class=
deleting a virtual machine using virsh command in Redhat
May 8, 2017
Virtual-machine
andrew class=
commandline virtual machine start
May 8, 2017
CentOS
david class=
steps to create virtual machine in CentOS
May 8, 2017
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Isaac ?
How to run windows application in linux

I need to run the windows application in my Linux machine, instead of installing from yum repo or any other repos. How to do that..??

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.