Difference between revisions of "XenServer"

From Hack Sphere Labs Wiki
Jump to: navigation, search
(Adding a existing network to a VM)
(xe sr-create)
Line 39: Line 39:
 
*https://xapi-project.github.io/xen-api/classes/sr.html
 
*https://xapi-project.github.io/xen-api/classes/sr.html
 
==xe sr-create==
 
==xe sr-create==
  type
+
  type=
 
*type - type of the SR, used to specify the SR backend driver to use
 
*type - type of the SR, used to specify the SR backend driver to use
 
**SR - storage repository
 
**SR - storage repository
  
sr-probe
+
==xe sr-probe==
 +
 
 +
device-config:

Revision as of 21:10, 15 June 2015

Creating Local ISO Library

ssh box
df -h

Not alot of space huh?

pvs

Look at all that space

vgs

Create a new LV group to Store ISOs

lvcreate -L 20G -n IsoImages VG_XenStorage-dae27f11-a60d-35d2-075a-b1c2e5fa1d81

Format that thing

mkfs.ext3 /dev/VG_XenStorage-dae27f11-a60d-35d2-075a-b1c2e5fa1d81/IsoImages

Create a place for it

mkdir /mnt/IsoImages

Turn on the LVM

vgchange -a y

Create the ISO repo in Xen

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

Check that Xen can see it

 xe sr-list

Mount it

mount -t ext3 /dev/VG_XenStorage-dae27f11-a60d-35d2-075a-b1c2e5fa1d81/IsoImages /mnt/IsoImages

Add it to fstab

echo "/dev/VG_XenStorage-dae27f11-a60d-35d2-075a-b1c2e5fa1d81/IsoImages /mnt/IsoImages ext3 defaults 1 1" >> /etc/fstab

Adding an additional hard drive to XenServer

fdisk -l
xe sr-create name-label=2TBNoRaid shared=false device-config:device=/dev/sdb type=lvm

Adding a existing network to a VM

xe vm-list
xe network-list
xe vif-create network-uuid=<networkuuid> vm-uuid=<vmuuid> device=2

Commands

xe sr-create

type=
  • type - type of the SR, used to specify the SR backend driver to use
    • SR - storage repository

xe sr-probe

device-config: