Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save olegbukatchuk/17985fdce2ee953337430a83c239f489 to your computer and use it in GitHub Desktop.
Save olegbukatchuk/17985fdce2ee953337430a83c239f489 to your computer and use it in GitHub Desktop.

Revisions

  1. @reecefowell reecefowell revised this gist Aug 3, 2016. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions Setting up XenServer, Orchestra and VM's.md
    Original file line number Diff line number Diff line change
    @@ -123,6 +123,11 @@ 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
    ---

  2. @reecefowell reecefowell revised this gist Aug 1, 2016. 1 changed file with 5 additions and 7 deletions.
    12 changes: 5 additions & 7 deletions Setting up XenServer, Orchestra and VM's.md
    Original file line number Diff line number Diff line change
    @@ -67,27 +67,25 @@ 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 to install guest tools
    Create VM then use `Console` tab in Orchestra to install guest tools
    ---

    run to see if the disk containing guest tools can be located `blkid -t LABEL="XenServer 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`

    (or whatever device it was found on to mount it, i.e; `mount -o ro,exec /dev/sr0 /mnt` )
    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
    ---

  3. @reecefowell reecefowell revised this gist Aug 1, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Setting up XenServer, Orchestra and VM's.md
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,7 @@ Network Setup
    ---

    I have configured my network as following:

    | IP Address | Purpose |
    | --- | --- |
    | 192.168.0.50 | XenServer Host |
  4. @reecefowell reecefowell revised this gist Aug 1, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Setting up XenServer, Orchestra and VM's.md
    Original file line number Diff line number Diff line change
    @@ -2,8 +2,8 @@ Network Setup
    ---

    I have configured my network as following:
    | IP Address | Purpose |
    |--- | ---|
    | IP Address | Purpose |
    | --- | --- |
    | 192.168.0.50 | XenServer Host |
    | 192.168.0.51 | Xen Orchestra |
    | 192.168.0.52/199 | various VM's |
  5. @reecefowell reecefowell revised this gist Aug 1, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions Setting up XenServer, Orchestra and VM's.md
    Original file line number Diff line number Diff line change
    @@ -2,8 +2,8 @@ Network Setup
    ---

    I have configured my network as following:
    | IP Address | Purpose |
    |---|---|
    | IP Address | Purpose |
    |--- | ---|
    | 192.168.0.50 | XenServer Host |
    | 192.168.0.51 | Xen Orchestra |
    | 192.168.0.52/199 | various VM's |
  6. @reecefowell reecefowell revised this gist Aug 1, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions Setting up XenServer, Orchestra and VM's.md
    Original file line number Diff line number Diff line change
    @@ -2,6 +2,8 @@ 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 |
  7. @reecefowell reecefowell revised this gist Aug 1, 2016. 1 changed file with 5 additions and 3 deletions.
    8 changes: 5 additions & 3 deletions Setting up XenServer, Orchestra and VM's.md
    Original file line number Diff line number Diff line change
    @@ -2,13 +2,15 @@ Network Setup
    ---

    I have configured my network as following:
    | 192.168.0.50 | XenServer Host
    | 192.168.0.51 | Xen Orchestra
    | 192.168.0.52/199 | various VM's
    | 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:
    ```/etc/hosts
    192.168.0.50 hypervisor.xen.local
    192.168.0.51 orchestra.xen.local
    ```

    Installation of Orchestra
    ---
  8. @reecefowell reecefowell revised this gist Aug 1, 2016. 1 changed file with 7 additions and 3 deletions.
    10 changes: 7 additions & 3 deletions Setting up XenServer, Orchestra and VM's.md
    Original file line number Diff line number Diff line change
    @@ -2,9 +2,13 @@ Network Setup
    ---

    I have configured my network as following:
    - 192.168.0.50 - XenServer Host
    - 192.168.0.51 - Xen Orchestra
    - 192.168.0.52/199 - various VM's
    | 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
    ---
  9. @reecefowell reecefowell revised this gist Aug 1, 2016. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions Setting up XenServer, Orchestra and VM's.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,11 @@
    Network Setup
    ---

    I have configured my network as following:
    - 192.168.0.50 - XenServer Host
    - 192.168.0.51 - Xen Orchestra
    - 192.168.0.52/199 - various VM's

    Installation of Orchestra
    ---

  10. @reecefowell reecefowell revised this gist Aug 1, 2016. 1 changed file with 8 additions and 9 deletions.
    17 changes: 8 additions & 9 deletions Setting up XenServer, Orchestra and VM's.md
    Original file line number Diff line number Diff line change
    @@ -39,9 +39,8 @@ SSH into XenServer host and create the ISO stor directory
    Downloading ISO
    ---

    SSH into XenServer host and then go to
    SSH into XenServer host and then and download the ISO
    - `cd /var/opt/xen/ISO_Store`
    and download the ISO
    - `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
    @@ -57,10 +56,10 @@ Create VM then use `Console` tab to install guest tools
    run to see if the disk containing guest tools can be located `blkid -t LABEL="XenServer Tools"`

    If not, its probably one on of these devices:
    `/dev/xvdd` or
    `/dev/sdd` or
    `/dev/cdrom` or
    `/dev/sr0`
    - `/dev/xvdd` or
    - `/dev/sdd` or
    - `/dev/cdrom` or
    - `/dev/sr0`

    once found, run:

    @@ -100,9 +99,9 @@ dns-nameservers 4.4.4.4 8.8.8.8

    Restart network

    `sudo ifdown eth0 && sudo ifup eth0` \
    `/etc/init.d/network restart` # [On SysVinit]
    `systemctl restart network` # [On SystemD]
    - `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
    ---
  11. @reecefowell reecefowell revised this gist Aug 1, 2016. 1 changed file with 31 additions and 41 deletions.
    72 changes: 31 additions & 41 deletions Setting up XenServer, Orchestra and VM's.md
    Original file line number Diff line number Diff line change
    @@ -9,8 +9,8 @@ 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`
    - `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:

    @@ -32,18 +32,17 @@ dns-nameservers 4.4.4.4 8.8.8.8
    Creating an ISO Repository
    ---

    SSH into XenServer host and do:

    `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`
    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 do:

    `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`
    SSH into XenServer host and then go to
    - `cd /var/opt/xen/ISO_Store`
    and download the ISO
    - `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
    ---
    @@ -55,13 +54,12 @@ and hit `Rescan all disks` button up at the top of the page to see it appear.
    Create VM then use `Console` tab to install guest tools
    ---

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

    If not, its probably one on of these devices:
    `/dev/xvdd`
    `/dev/sdd`
    `/dev/cdrom`
    `/dev/xvdd` or
    `/dev/sdd` or
    `/dev/cdrom` or
    `/dev/sr0`

    once found, run:
    @@ -70,22 +68,16 @@ once found, run:

    (or whatever device it was found on to mount it, i.e; `mount -o ro,exec /dev/sr0 /mnt` )

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

    Unmount the guest tools iso
    `/umount/mnt`
    Unmount the guest tools iso using `/umount/mnt`

    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:
    `nano /etc/network/interfaces`

    Replace contents with something like:
    Open up the network file to set IP configuration for LAN using `nano /etc/network/interfaces` and replace contents with something like:
    ```YAML
    #source /etc/network/interfaces.d/*

    @@ -108,38 +100,36 @@ dns-nameservers 4.4.4.4 8.8.8.8

    Restart network

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

    To access the NCurses UI on XenServer host over SSH
    To access the NCurses UI from XenServer host over SSH
    ---

    run the following on the CLI:

    `xsconsole`
    run the `xsconsole` on the CLI.

    Sources
    ---

    (XenServer Host):
    http://docs.citrix.com/content/dam/docs/en-us/xenserver/xenserver-7-0/downloads/xenserver-7-0-administrators-guide.pdf
    - http://docs.citrix.com/content/dam/docs/en-us/xenserver/xenserver-7-0/downloads/xenserver-7-0-administrators-guide.pdf

    (XAPI):
    http://wiki.xen.org/wiki/XAPI_Command_Line_Interface
    - http://wiki.xen.org/wiki/XAPI_Command_Line_Interface

    (VM Guest Tools):
    http://discussions.citrix.com/topic/267014-xs-tools-devxvdd-does-not-exist/
    - http://discussions.citrix.com/topic/267014-xs-tools-devxvdd-does-not-exist/

    (network stuff):
    http://discussions.citrix.com/topic/257139-altering-ip-of-a-vm-via-xencenter/
    https://help.ubuntu.com/lts/serverguide/network-configuration.html
    http://askubuntu.com/questions/766131/set-static-ip-ubuntu-16-04
    http://vinow.info/how-to-set-static-ip-address-and-configure-network-in-linux.html
    - http://discussions.citrix.com/topic/257139-altering-ip-of-a-vm-via-xencenter/
    - https://help.ubuntu.com/lts/serverguide/network-configuration.html
    - http://askubuntu.com/questions/766131/set-static-ip-ubuntu-16-04
    - http://vinow.info/how-to-set-static-ip-address-and-configure-network-in-linux.html

    (Orchestra Stuff):
    https://xen-orchestra.com/forum/
    https://xen-orchestra.com/blog/xen-orchestra-5-1/
    https://xen-orchestra.com/blog/centos-cloud-template-for-xenserver/
    https://vates.gitbooks.io/xen-orchestra/content/xoa.html
    https://xen-orchestra.com/docs/administration.html
    - https://xen-orchestra.com/forum/
    - https://xen-orchestra.com/blog/xen-orchestra-5-1/
    - https://xen-orchestra.com/blog/centos-cloud-template-for-xenserver/
    - https://vates.gitbooks.io/xen-orchestra/content/xoa.html
    - https://xen-orchestra.com/docs/administration.html
  12. @reecefowell reecefowell revised this gist Aug 1, 2016. 1 changed file with 86 additions and 45 deletions.
    131 changes: 86 additions & 45 deletions Setting up XenServer, Orchestra and VM's.md
    Original file line number Diff line number Diff line change
    @@ -1,90 +1,99 @@
    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 do:

    ```BASH
    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
    ```
    `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 do:

    ```BASH
    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
    ```
    `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
    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.
    and hit `Rescan all disks` button up at the top of the page to see it appear.

    Create VM then use "Console" to install guest tools
    Create VM then use `Console` tab to install guest tools
    ---

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

    If not, its probably one on of these devices:
    ```BASH
    /dev/xvdd
    /dev/sdd
    /dev/cdrom
    /dev/sr0
    ```
    `/dev/xvdd`
    `/dev/sdd`
    `/dev/cdrom`
    `/dev/sr0`

    once found, run:

    ```BASH
    mount -o ro,exec /dev/disk/by-label/XenServer\\x20Tools /mnt
    ```
    `mount -o ro,exec /dev/disk/by-label/XenServer\\x20Tools /mnt`

    (or whatever device it was found on to mount it, i.e; ```mount -o ro,exec /dev/sr0 /mnt``` )
    (or whatever device it was found on to mount it, i.e; `mount -o ro,exec /dev/sr0 /mnt` )

    Then cd linux and run:
    ```BASH
    cd /mnt/Linux
    sudo ./install.sh
    ```
    `cd /mnt/Linux`
    `sudo ./install.sh`

    Unmount the guest tools iso
    ```BASH
    /umount/mnt
    ```
    `/umount/mnt`

    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:
    ```BASH
    nano /etc/network/interfaces
    ```
    `nano /etc/network/interfaces`

    Replace contents with something like:
    ```YAML
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

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

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface
    #auto eth0
    #iface eth0 inet dhcp

    # Custom IP
    #allow-hotplug eth0
    auto eth0
    iface eth0 inet static
    address 192.168.0.52
    @@ -99,6 +108,38 @@ dns-nameservers 4.4.4.4 8.8.8.8

    Restart network

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

    To access the NCurses UI on XenServer host over SSH
    ---

    run the following on the CLI:

    `xsconsole`

    Sources
    ---

    (XenServer Host):
    http://docs.citrix.com/content/dam/docs/en-us/xenserver/xenserver-7-0/downloads/xenserver-7-0-administrators-guide.pdf

    (XAPI):
    http://wiki.xen.org/wiki/XAPI_Command_Line_Interface

    (VM Guest Tools):
    http://discussions.citrix.com/topic/267014-xs-tools-devxvdd-does-not-exist/

    (network stuff):
    http://discussions.citrix.com/topic/257139-altering-ip-of-a-vm-via-xencenter/
    https://help.ubuntu.com/lts/serverguide/network-configuration.html
    http://askubuntu.com/questions/766131/set-static-ip-ubuntu-16-04
    http://vinow.info/how-to-set-static-ip-address-and-configure-network-in-linux.html

    (Orchestra Stuff):
    https://xen-orchestra.com/forum/
    https://xen-orchestra.com/blog/xen-orchestra-5-1/
    https://xen-orchestra.com/blog/centos-cloud-template-for-xenserver/
    https://vates.gitbooks.io/xen-orchestra/content/xoa.html
    https://xen-orchestra.com/docs/administration.html
  13. @reecefowell reecefowell revised this gist Aug 1, 2016. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions Setting up XenServer, Orchestra and VM's.md
    Original file line number Diff line number Diff line change
    @@ -97,3 +97,8 @@ dns-nameservers 4.4.4.4 8.8.8.8
    #iface eth0 inet6 auto
    ```

    Restart network

    ```BASH
    sudo ifdown eth0 && sudo ifup eth0
    ```
  14. @reecefowell reecefowell renamed this gist Aug 1, 2016. 1 changed file with 0 additions and 0 deletions.
  15. @reecefowell reecefowell created this gist Aug 1, 2016.
    99 changes: 99 additions & 0 deletions Setting up XenServer, Orchestra and VM's
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,99 @@
    Creating an ISO Repository
    ---

    SSH into XenServer host and do:

    ```BASH
    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 do:

    ```BASH
    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" to install guest tools
    ---

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

    If not, its probably one on of these devices:
    ```BASH
    /dev/xvdd
    /dev/sdd
    /dev/cdrom
    /dev/sr0
    ```

    once found, run:

    ```BASH
    mount -o ro,exec /dev/disk/by-label/XenServer\\x20Tools /mnt
    ```

    (or whatever device it was found on to mount it, i.e; ```mount -o ro,exec /dev/sr0 /mnt``` )

    Then cd linux and run:
    ```BASH
    cd /mnt/Linux
    sudo ./install.sh
    ```

    Unmount the guest tools iso
    ```BASH
    /umount/mnt
    ```

    Configure Networking
    ---

    Open up the network file to set IP configuration for LAN:
    ```BASH
    nano /etc/network/interfaces
    ```

    Replace contents with something like:
    ```YAML
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

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

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface
    #auto eth0
    #iface eth0 inet dhcp

    # Custom IP
    #allow-hotplug eth0
    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
    ```