domU

now that we have got the disks setup as desired and virt-manager is crashing on Alpine.

the idea is to create LVs in the VGs and then expose (lvm-based) them to XEN for the VMs (domU). - Virtual Block Device (VBD)

our LVM naming convention:

xen_VGCode_<P||T>_<VM_NAME>

VBCode:

1: nvmep3_lvm Usage: MAIN OS

2: sataAB_data Usage: bulk data stroage

3: sataAB_swap Usage: Linux OS Swap

P: Permanent

T: Transient

As the first experiment, we start w/ a fedora KDE desktop install. download the ISO and in parallel preapre the disk setup.

We'll do a Paravirtualized guest; thus, the alpine domU hints will also prove useful

Some references (heavily outdated but provide the necessary guidance):

REFER TO ATTACHED MHTs.

http://www.systutorials.com/2544/setting-up-lvm-backed-xen-domu/

http://www.systutorials.com/2256/setting-up-stable-xen-domu-with-fedora-unmodified-fedora-12-on-top-of-xenified-fedora-12-dom0-with-xen-4-0-0/

http://wiki.prgmr.com/mediawiki/index.php/Chapter_4:_Storage_with_Xen

REFER To this - WHAT XL expects in the config file for DISKS:

http://xenbits.xen.org/docs/4.3-testing/misc/xl-disk-configuration.txt

ATTACHED.

DHARRA:

wget https://download.fedoraproject.org/pub/fedora/linux/releases/23/Live/x86_64/Fedora-Live-KDE-x86_64-23-10.iso

create 3 LVs in the 3 regions of the disk world:

nvmep3_lvm --> xen_VG1_P_fedoraDesktop for the main OS around 100 GB (the giving around 30 GB to /home)

sataAB_data --> xen_VG2_P_fedoraDesktop for data under /home/<user>/data around 500GB

sataAB_swap --> xen_VG3_P_fedoraDesktop for swap around 16GB

dharra:~# lvcreate -L 100G -n xen_VG1_P_fedoraDesktop nvmep3_lvm

allocation/use_blkid_wiping=1 configuration setting is set while LVM is not compiled with blkid wiping support.

Falling back to native LVM signature detection.

Logical volume "xen_VG1_P_fedoraDesktop" created.

dharra:~# lvcreate -L 500G -n xen_VG2_P_fedoraDesktop sataAB_data

allocation/use_blkid_wiping=1 configuration setting is set while LVM is not compiled with blkid wiping support.

Falling back to native LVM signature detection.

Logical volume "xen_VG2_P_fedoraDesktop" created.

dharra:~# lvcreate -L 16G -n xen_VG3_P_fedoraDesktop sataAB_swap

allocation/use_blkid_wiping=1 configuration setting is set while LVM is not compiled with blkid wiping support.

Falling back to native LVM signature detection.

Logical volume "xen_VG3_P_fedoraDesktop" created.

dharra:~# lvdisplay -Cv

Using logical volume(s) on command line.

LV VG #Seg Attr LSize Maj Min KMaj KMin Pool Origin Data% Meta% Move Cpy%Sync Log Convert LV UUID LProfile

dharraSWAP dom0_swap 2 -wi-ao---- 3.99g -1 -1 252 2 zrEcck-U4ca-C6UM-ANoT-EgJL-WCCy-fLENXO

xen_VG1_P_fedoraDesktop nvmep3_lvm 1 -wi-a----- 100.00g -1 -1 252 0 8hAVFV-3vwr-xO6t-Y2Vc-WWh3-yUFu-QQgVY5

xen_VG2_P_fedoraDesktop sataAB_data 1 -wi-a----- 500.00g -1 -1 252 1 5b6CI9-Yf5c-uUsV-xJPb-GjP0-Y0F6-hdTrDJ

xen_VG3_P_fedoraDesktop sataAB_swap 1 -wi-a----- 16.00g -1 -1 252 3 MxCuYm-Wmw0-hewF-84RO-yoDU-eTV8-i6VDrp

Now, we need to create the XEN profile file to expose these LVM based VBD into the Xen machine.

Also need to mount the ISO, get the kernel (vmlinuz) and initramfs for PV booting (before using pvgrub).

FOR FUTURE COMPATIBILITY WE ARE KEEPING ALL ISOs in /var/lib/libvirt/images/

Some clusterfuck reason the iso won't mount over -o loop OR using losetup etc. When I get it on local laptop and mount ...it works...fuck this.

any ways I need the vmlinuz and initramfs and as per the instructions and a few clicks got this:

http://archives.fedoraproject.org/pub/fedora/linux/releases/23/Workstation/x86_64/os/images/pxeboot/ and downloaded both the files.

created the XL config file:

## Fedora KDE workstation PV domU _version 23 at the time of install 11/Mar/2016

name = "Fedora_Desktop"

builder = "hvm"

##disks

disk = [

'/dev/mapper/nvmep3_lvm-xen_VG1_P_fedoraDesktop,raw,xvda,rw',

'/dev/mapper/sataAB_data-xen_VG2_P_fedoraDesktop,raw,xvdb,rw',

'/dev/mapper/sataAB_swap-xen_VG3_P_fedoraDesktop,raw,xvdc,rw',

'/var/lib/libvirt/images/fedora_kde_23.iso,raw,xvdd,devtype=cdrom,ro' ###hide this to boot in HVM w/o the cdrom

]

boot = 'dc' ###change this to boot = 'c' ..to boot into HVM w/o the cdrom

##domU settings

vcpus = 2

maxvcpus = 3

memory = 8192

vif = [ 'type=ioemu, model=e1000, bridge=virbr0' ]

on_reboot = 'restart'

on_crash = 'restart'

## scary name but it means domain is shut down.

on_poweroff = 'destroy'

### remote GUI

stdvga = 1

videoram = 128

vnc = 1

vnclisten= '0.0.0.0'

vncunused=1

vncconsole = 1

vncdisplay = 22

vncpasswd = "some_secure_shit"

need fucking remote GUI????

the theory is that the dom0 will enable a virtual frame buffer (vfb) and connect it to domU. The domU graphics will then be accessible over VNC server: IP addrs of the dom0 and port 59xx - the xx being vncdisplay number setting in the config file

here's some help:

http://www.virtuatopia.com/index.php/Configuring_a_VNC_based_Graphical_Console_for_a_Xen_Paravirtualized_domainU_Guest

OK - the TigerVNCviewer (/usr/bin/vncviewer) - it gives error on the local laptop side "No matching security types".

Solution: https://www.novell.com/support/kb/doc.php?id=7015985

The VNC server introduced the TLC encryption method and by default requires encryption from the client. The vncviewer and Tight VNC clients do not support this encryption so they appropriately fail with the indicated message.

Use a client that supports the encryption. On SUSE Linux Enterprise 12 systems there are two supported programs, vinagre and virt-manager.

Install VINAGRE - and it works.... now we still don't get GUI.

ok - realization .... Can't get GUI for PARA VIRTUALIZED DURING INSTALLATION.

basically following the advice from:

https://ycnrg.org/xen-install-os-from-iso-pv/

http://blog.heidt.biz/blog/2013/04/09/my-best-practice-domu-setup-on-ubuntu-12-dot-04-precise-pangolin/

REFER TO ABOVE CONFIG FILE:

using vfb = [ 'vnc=1,....] type of shit did NOT work

in the disk [] box ... each new line begins w/ a space <don't know if this is imp...but the shit works]

xl create -f ./xen_config_fedora23_KDE_workstation -c

then from laptop: vinarge VNC to 192.168.x.y:5922 this is the dom0 IP address.

FOR SOME REASON on DHARRA terminal - XL exits w/ an error:

dharra:~/Fedora23_KDE_Desktop# xl create -f ./xen_config_fedora23_KDE_workstation -c

Parsing config from ./xen_config_fedora23_KDE_workstation

xenconsole: Could not read tty from store: No such file or directory

libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: console child [28268] exited with error status 2

dharra:~/Fedora23_KDE_Desktop#

HOWEvEr; the VNC connection works and machine is running....

i get 3 disks in fedora.

i create:

xvda1 /boot 250 MiB

xvda2 / 99.76 Gig

xdvc1 16GB Swap

xvdb - 500Gig ...left alone for the moment - to be mounted to /home/shash/data later.

root: vayu

shash: nailhair2party

now remove the CDROM and change the boot order to see if the installation works in HVM mode... it does ..boot='c' and hash out cdrom disk...making sure the remains 3 are not commented

CONVERT TO PVM

before that checking if the machine comes on network... was giving trouble.

gave it a fixed mac addr in the vif line:

vif = [ 'type=ioemu, model=e1000, mac=xx:xx:xx:xx:xx:xx, bridge=virbr0' ]

Then within the domU created:

/etc/sysconfig/network-scripts/ifcfg-eth0:

DEVICE=eth0

TYPE=Ethernet

BOOTPROTO=dhcp

NAME=eth0

ONBOOT=yes

HWADDR=xx:xx:xx:xx:xx:xx

reboot and the machine gets an IP from the NAT range... but now we want it on the LAN and accessible directly via VNC.