To Create a New Partition
e.g. Use the Remaining portion of the XenServer Install Disk
- Get the current partition table (using a lower case L at the end):
fdisk –l
If you need a new Partition:
- Assuming your install disk is at /dev/sda1 then run the following to get more information:
gdisk /dev/sda - Print the partition table by entering 'p' at the gdisk command prompt:
Command (? for help): p - If you need a new partition enter n and accept the defaults:
Command (? for help): n
Partition number (3-128, default 3):
First sector (34-488327006, default = 16777250) or {+-}size{KMGT}:
Last sector (16779264-488327006, default = 488327006) or {+-}size{KMGT}:
Hex code (L to show codes, 0 to enter raw code, Enter = 0700): - Enter the 'p' command to check your new partition exists
- Enter 'w' to save your changes
- Reboot
- Format it for use as an ISO share:
mkfs.ext3 /dev/sdaX
where X is the number
To Use an Existing Disk
Setup a share on your local XenServer to use when installing new VMs:- Run the following to assess your server's setup:
df -h - Note the ‘large’ sector ending with a GUID and cd to it e.g.
cd /var/run/sr-mount/<GUID>
Make a Mount Point and Add It to XenServer
- Make a mount point:
mkdir /mnt/isos - Mount it:
mount /dev/sda3 /mnt/isos - Check its mounted:
df - Add it to fstab so it's available on reboot (see Ubuntu's docs for more info):
echo "/dev/sda3 /mnt/isos ext3 defaults 1 1" >> /etc/fstab - Check the mounting works:
sudo mount -a - Add it to XenServer:
- Make it available in XenServer:
xe-mount-iso-sr /mnt/isos –o bind - Create the XenServer point:
xe sr-create name-label=ISOs type=iso device-config:location=/mnt/isos device-config:legacy_mode=true content-type=iso
NB: you might need to change the location to:
/var/run/sr-mount/<UUID>/isos - Check it and view it's UUID:
xe sr-list
To Delete a Storage Repository
- Get the UUID of the SR:
xe sr-list - Get the PDB UUID of the SR:
xe pbd-list sr-uuid=[UUID of the SR] - Unplug the PDB using the first UUID returned:
xe pbd-unplug uuid=[UUID of PDB] - 'Forget' the SR:
xe sr-forget uuid=[UUID of SR] - Check it's gone:
xe sr-list
Installing an OS
You can use a remote URL to install e.g. http://www.mirrorservice.org/sites/archive.ubuntu.com/ubuntu/
- Put an ISO on the server:
- Get an ISO e.g
cd /mnt/isos
wget http://releases.ubuntu.com/16.04.1/ubuntu-16.04.1-server-amd64.iso - or scp one up:
scp /Users/<username>/Downloads/ubuntu-14.04.1-server-amd64.iso root@192.168.0.6:/mnt/isos - Use a program like FileZilla to connect via SFTP
- Re scan the archive:
Find the uuid: xe pbd-list
xe sr-scan uuid=<sr UUID>
No comments:
Post a Comment