Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

Network Setup

I have configured my network as following:

IP Address Purpose
192.168.0.50 XenServer Host
192.168.0.51 Xen Orchestra
192.168.0.52/199 various VM's

Hosts file on machines you normally work on, set aliases for convenience:

192.168.0.50    hypervisor.xen.local
192.168.0.51    orchestra.xen.local

Installation of Orchestra

https://vates.gitbooks.io/xen-orchestra/content/xoa.html

Download the XVA file from the orchestra website.

SSH into XenServer host, and copy it to the host using scp.

Import it into XenServer as a VM

  • xe vm-import filename=xoa_version_number.xva
  • xe vm-start vm=XOA

Configure the network settings, use nano to edit the file /etc/network/interfaces to look like:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
auto eth0
iface eth0 inet static
address 192.168.0.51
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 4.4.4.4 8.8.8.8

Creating an ISO Repository

SSH into XenServer host and create the ISO stor directory

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

Downloading ISO

SSH into XenServer host and then and download the ISO

  • cd /var/opt/xen/ISO_Store
  • wget http://www.mirrorservice.org/sites/cdimage.ubuntu.com/cdimage/releases/14.04.4/release/ubuntu-14.04.4-server-amd64+mac.iso

In Orchestra refresh disk list

Go to Home > Pools > (pool name) > Storage tab > LocalISO

and hit Rescan all disks button up at the top of the page to see it appear.

Create VM then use Console tab in Orchestra to install guest tools

run blkid -t LABEL="XenServer Tools" to see if the disk containing guest tools can be located.

If not, its probably one on of these devices:

  • /dev/xvdd or
  • /dev/sdd or
  • /dev/cdrom or
  • /dev/sr0

once found, run mount -o ro,exec /dev/disk/by-label/XenServer\\x20Tools /mnt to mount it. (or whatever device it was found on to mount it, i.e; mount -o ro,exec /dev/sr0 /mnt)

Then cd /mnt/Linux and run the installer sudo ./install.sh

Unmount the guest tools iso using /umount/mnt

You will need to reboot the VM after this for the guest tools to work.

Configure Networking

You must install VM guest tools in order to get any network related stuff to work. You will have to use the Console interface in Orchestra after creating your VM to install guest tools.

Open up the network file to set IP configuration for LAN using nano /etc/network/interfaces and replace contents with something like:

#source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.52
netmask 255.255.255.0
gateway 192.168.0.1
dns-search Home
dns-nameservers 4.4.4.4 8.8.8.8

# This is an autoconfigured IPv6 interface
#iface eth0 inet6 auto

Restart network

  • sudo ifdown eth0 && sudo ifup eth0
  • /etc/init.d/network restart # [On SysVinit]
  • systemctl restart network # [On SystemD]

To access the NCurses UI from XenServer host over SSH

run the xsconsole on the CLI.

Clone a VM

  • xe vm-clone vm="Ubuntu-14-template" new-name-label="Ubuntu-14-template-provisioned" -u reece -pw mypassword

Sources

(XenServer Host):

(XAPI):

(VM Guest Tools):

(network stuff):

(Orchestra Stuff):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.