<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://dev1galaxy.org/extern.php?action=feed&amp;tid=2556&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / Xen and the art of VM]]></title>
		<link>http://dev1galaxy.org/viewtopic.php?id=2556</link>
		<description><![CDATA[The most recent posts in Xen and the art of VM.]]></description>
		<lastBuildDate>Thu, 04 Mar 2021 10:55:16 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Xen and the art of VM]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=27870#p27870</link>
			<description><![CDATA[<p><span class="bbu">Chimaera fresh install via debootstrap</span></p><p>I&#160; wanted to do a fresh install of Chimaera from my Beowulf set up and used the debootstrap method to do it. The installation went very smoothly, apart from errors on my part, which I have edited out!</p><p><span class="bbc">/etc/xen-tools/xen-tools.conf</span> is well commented. The options, which I have set, look like this :-</p><div class="codebox"><pre><code># grep -v &#039;^#&#039; xen-tools.conf | grep &#039;.&#039;</code></pre></div><div class="quotebox"><blockquote><div><p>lvm&#160; &#160; &#160; = HDD0&#160; &#160;# set the name of your lvm volume group here<br />install-method&#160; = debootstrap<br />debootstrap-cmd = /usr/sbin/debootstrap<br />size&#160; &#160; &#160;= 20G&#160; &#160; # Root disk, suffix (G, M, k) required<br />memory&#160; &#160;= 2G&#160; &#160; &#160;# Suffix (G, M, k) required<br />swap&#160; &#160; &#160;= 4G&#160; &#160; &#160;# Suffix (G, M, k) required<br />fs&#160; &#160; &#160; &#160;= ext4&#160; &#160;# Default file system for any disk<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; # Default distribution is determined by Dom0&#039;s distribution<br />dist&#160; &#160; &#160;= chimaera<br />image&#160; &#160; = sparse # Specify sparse vs. full disk images (file based images only)<br />gateway&#160; &#160; = 192.168.2.1<br />netmask&#160; &#160; = 255.255.255.0<br />broadcast&#160; = 192.168.2.255<br />dhcp = 1<br />nameserver = 192.168.2.1<br />bridge = xenbr0<br />cache = no<br />genpass = 0<br />passwd = 1<br />accounts = 0<br />kernel = /boot/vmlinuz-`uname -r`<br />initrd = /boot/initrd.img-`uname -r`<br />pygrub = 1<br />arch = amd64<br />mirror = <a href="http://deb.devuan.org/merged" rel="nofollow">http://deb.devuan.org/merged</a><br />ext4_options&#160; &#160; &#160;= noatime,nodiratime,errors=remount-ro<br />ext3_options&#160; &#160; &#160;= noatime,nodiratime,errors=remount-ro<br />ext2_options&#160; &#160; &#160;= noatime,nodiratime,errors=remount-ro<br />xfs_options&#160; &#160; &#160; = defaults<br />reiserfs_options = defaults<br />btrfs_options&#160; &#160; = defaults<br />copyhosts = 1</p></div></blockquote></div><p>Now need to add chimaera to the known suites.</p><p>If you have not done this before, then you need to set up <span class="bbc">devuan.d</span> in <span class="bbc">/usr/share/xen-tools</span>, see</p><p><a href="https://dev1galaxy.org/viewtopic.php?pid=13368#p13368" rel="nofollow">https://dev1galaxy.org/viewtopic.php?pid=13368#p13368</a></p><p>but you will now need to add chimaera :-</p><div class="codebox"><pre><code>cd /usr/share/xen-tools
ln -s devuan.d chimaera.d</code></pre></div><p>I think this is a new step for debootstrap :-</p><div class="codebox"><pre><code>cd /usr/share/debootstrap/scripts
ln -s ceres chimaera</code></pre></div><p>The configuration should now be ok, so get on and install it!</p><div class="codebox"><pre><code>cd /etc/xen
xen-create-image --hostname chimaera</code></pre></div><p>This took about 6 minutes to install chimeara.</p><p>lvs includes the info :-</p><div class="codebox"><pre><code>lvs
  LV             VG   Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
   ...
  chimaera-disk  HDD0 -wi-a-----  20.00g                                                    
  chimaera-swap  HDD0 -wi-a-----   4.00g                                                    
   ...</code></pre></div><p>And the file <span class="bbc">/etc/xen/chimaera.cfg</span> has been created. The new VM can now be booted.</p><div class="codebox"><pre><code>cd /etc/xen
xl create chimaera.cfg ; xl console chimaera</code></pre></div><p>Which boots nicely to the login prompt. Log in as root.</p><div class="codebox"><pre><code>apt update
apt full-upgrade</code></pre></div><p>This had nothing to do, although it could not find chimaera-security, un-surprisingly!</p><p>When I tried, it was not able to install <span class="bbc">vnc4server</span> or <span class="bbc">gksu</span>. The later is to be expected.<br /><span class="bbc">vnc4server</span> has been replaced by <span class="bbc">tigervnc-standalone-server</span>.</p><div class="codebox"><pre><code>apt install task-lxqt-desktop synaptic tigervnc-standalone-server</code></pre></div><p>Need to answer the questions to configure the keyboard.<br />Then install some of my favourite things.</p><div class="codebox"><pre><code>apt install task-british-desktop rxvt-unicode claws-mail xauth</code></pre></div><p>And set up a user </p><div class="codebox"><pre><code>addgroup --gid 1026 user1
adduser --uid 1026 --gid 1026 user1

su - user1
mkdir .vnc
cd .vnc
cat &lt;&lt; &#039;EOF&#039; &gt;&gt; vnc.conf
# This file, $(HOME)/.vnc/vnc.conf will be sourced after /etc/vnc.conf,
# so values can be
# overwritten on a per-user basis. If you want to reactivate the default
# value here, you have to specify an undef value. For example, $fontPath
# will set to the default value after
#
# $fontPath = &quot;/foo&quot;;
# $fontPath = undef;

# set up the screen size which you would like
$geometry = &quot;1900x1200&quot;;

# Tell vncserver to accept connections from addresses other than localhost
$localhost = &quot;no&quot;;
EOF</code></pre></div><p>In an earlier version, above, I failed to quote the &#039;EOF&#039; after <span class="bbc">cat</span>, which does not pass through the variables! Unfortunately I am unable to go back and edit it.</p><p>Start up the VNC server as the user.</p><div class="codebox"><pre><code>vncserver</code></pre></div><p>You will have to enter a new VNC password.</p><p>back on Dom0 as the user</p><div class="codebox"><pre><code>vncviewer chimaera:1</code></pre></div><p>You will have to enter the VNC password and your new session should display.</p><p>Use synaptic to install <span class="bbc">openbox</span> and select it in the LXQt Session Settings preferences, if that is what you would like.<br />The file system looks like this :-</p><div class="codebox"><pre><code>df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            940M     0  940M   0% /dev
tmpfs           198M  112K  198M   1% /run
/dev/xvda2       20G  4.0G   15G  22% /
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           1.2G     0  1.2G   0% /dev/shm
tmpfs           198M  8.0K  198M   1% /run/user/1026</code></pre></div><p>To use chimeara normally, as user on Dom0</p><div class="codebox"><pre><code>ssh -L 5901:localhost:5901 chimaera</code></pre></div><p>on chimeara</p><div class="codebox"><pre><code>vncserver</code></pre></div><p>as user on Dom0 in another window</p><div class="codebox"><pre><code>vncviewer :1</code></pre></div><p>give the password and there it is!</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Thu, 04 Mar 2021 10:55:16 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=27870#p27870</guid>
		</item>
		<item>
			<title><![CDATA[Re: Xen and the art of VM]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=22226#p22226</link>
			<description><![CDATA[<p><strong><span class="bbu">netinstall of Beowulf</span></strong></p><p>I have managed to install Beowulf under Xen using the netinstall iso,<br /><span class="bbc">devuan_beowulf_3.0.0_netinstall-amd64.iso</span></p><p>After some intial difficulty with partitioning the disk used by Xen<br />I now have it running.</p><p>I had already allocated two chunks of file space using lvm. On<br />my machine these were :-</p><div class="quotebox"><blockquote><div><p>/dev/HDD0/net-disk (20GB)<br />/dev/HDD0/net-swap (4GB)</p></div></blockquote></div><p>As root check the config is set up :-</p><div class="codebox"><pre><code>cd /etc/xen
cat net.cfg</code></pre></div><div class="quotebox"><blockquote><div><p>#<br /># Configuration file for the Xen instance &quot;net&quot; for a Devuan iso<br />#</p><p># Boot info for the iso. Don&#039;t forget to mount it at /mnt/inst_iso with something like :-<br /># mount -t iso9660 /archive/isos/devuan_beowulf_3.0.0_netinstall-amd64.iso /mnt/inst_iso/</p><p># You can choose whether to get a larger VNC window with the<br /># xen-fbfront.video option but you do get two cursors!</p><p>kernel = &#039;/mnt/inst_iso/boot/isolinux/linux&#039;<br />ramdisk = &#039;/mnt/inst_iso/boot/isolinux/initrd.gz&#039;<br />extra&#160; = &#039;boot=boot/isolinux username=devuan console=hvc0 xen-fbfront.video=32,1600,1000&#039;</p><p># Boot info for the installed OS. We need kernel and ramdisk if grub failed to install :-<br /># We can use pygrub if grub was installed.</p><p># kernel&#160; &#160; &#160; = &#039;/vmlinuz&#039;<br /># ramdisk&#160; &#160; &#160;= &#039;/initrd.img&#039;<br /># # bootloader&#160; = &#039;/usr/bin/pygrub&#039;<br /># extra&#160; &#160; &#160; &#160;= &#039;console=hvc0 xen-fbfront.video=32,1600,1000&#039;<br /># root&#160; &#160; &#160; &#160; = &#039;/dev/xvda2 ro&#039;</p><p>#<br />#&#160; Disk device(s).<br />#</p><p>disk&#160; &#160; &#160; &#160; = [<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#039;format=raw, vdev=xvdc,&#160; access=r, devtype=cdrom, target=/archive/isos/devuan_beowulf_3.0.0_netinstall-amd64.iso&#039;,<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#039;format=raw, vdev=xvda2, access=w, target=/dev/HDD0/net-disk&#039;,<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#039;format=raw, vdev=xvda1, access=w, target=/dev/HDD0/net-swap&#039;,<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; ]</p><p>#<br />#&#160; Local set-up<br />#<br />#&#160; &#160;Limits</p><p>vcpus&#160; &#160; &#160; &#160;= &#039;2&#039;<br />memory&#160; &#160; &#160; = &#039;2048&#039;</p><p>#<br />#&#160; Hostname<br />#<br />name&#160; &#160; &#160; &#160; = &#039;net&#039;</p><p>#<br />#&#160; Networking<br />#</p><p>vif&#160; &#160; &#160; &#160; &#160;= [ &#039;mac=00:16:3E:00:00:06, bridge=xenbr0&#039; ]</p><p># Graphic display</p><p>vfb&#160; &#160; &#160; &#160; &#160;= [ &#039;vnc = 1,&#160; keymap = &quot;en-gb&quot;&#039; ]</p><p>#<br />#&#160; Behaviour<br />#<br />on_poweroff = &#039;destroy&#039;<br />on_reboot&#160; &#160;= &#039;restart&#039;<br />on_crash&#160; &#160; = &#039;restart&#039;</p></div></blockquote></div><p>With this file set up and the iso mounted we can boot the netinstaller, as root :-</p><div class="codebox"><pre><code>xl create net.cfg -c</code></pre></div><p>select languages etc.<br />set up host name etc.<br />For the disk set up I selected &quot;manual&quot;<br />The disk had been used and I set up partition 1 on xvda2<br />as ext4 for /<br />This worked.</p><p>If it doesn&#039;t work try this ...<br />disk set-up choose &lt;Go Back&gt;<br />we get the main menu, choose &quot;Execute a shell&quot;</p><p>fdisk -l<br />mkfs.ext4 -n -L root /dev/xvda2<br />mkfs.ext4 -L root /dev/xvda2<br />mkswap -L swap /dev/xvda1</p><p>exit back to the menu.<br />select partition the disk and select manual.</p><p>Continue here ...<br />select the partition under /dev/xvda2<br />set up the one partition on /dev/xvda2 as ext4 to use as /<br />Finish partitioning and write changes to disk<br />continues to install base system<br />it couldn&#039;t read the CD, tell it to continue<br />it then goes on to select a repository<br />and continues<br />Software selection, I chose<br /><span class="bbc">LXQt</span>, <span class="bbc">SSH</span> and <span class="bbc">Console productivity</span><br />check it has got going<br />go and make a cup of tea<br />I then selected <span class="bbc">openrc</span> as the init system, because I have been playing with it.</p><p>Install grub fails<br />continue with no grub<br />finishes up and shutsdown</p><p>Back on Dom0</p><div class="codebox"><pre><code>xl list
xl destroy net
xl list</code></pre></div><p>Comment out the boot info for the iso and<br />set up the kernel and ramdisk info in the config file</p><div class="quotebox"><blockquote><div><p>kernel&#160; &#160; &#160; = &#039;/vmlinuz&#039;<br />ramdisk&#160; &#160; &#160;= &#039;/initrd.img&#039;<br /># bootloader&#160; = &#039;/usr/bin/pygrub&#039;<br />extra&#160; &#160; &#160; &#160;= &#039;console=hvc0 xen-fbfront.video=32,1600,1000&#039;<br />root&#160; &#160; &#160; &#160; = &#039;/dev/xvda2 ro&#039;</p></div></blockquote></div><p>and comment out the CD/iso.</p><div class="quotebox"><blockquote><div><p>disk&#160; &#160; &#160; &#160; = [<br />#&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#039;format=raw, vdev=xvdc,&#160; access=r, devtype=cdrom, target=/archive/isos/devuan_beowulf_3.0.0_netinstall-amd64.iso&#039;,<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#039;format=raw, vdev=xvda2, access=w, target=/dev/HDD0/net-disk&#039;,<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#039;format=raw, vdev=xvda1, access=w, target=/dev/HDD0/net-swap&#039;,<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; ]</p></div></blockquote></div><p>Now we can boot the installed OS</p><div class="codebox"><pre><code>xl create net.cfg
xl console net</code></pre></div><p>and it boots. So, it doesn&#039;t need grub to boot, as you have<br />pointed Xen at the kernel and initrd.</p><p>As yourself run :-</p><div class="codebox"><pre><code>vncviewer :0 &amp;</code></pre></div><p>You should have the Lightdm login screen.<br />There is a problem with the vnc cursor getting its units<br />wrong and moving faster than the real cursor, depending<br />on how large you have made your VNC screen!</p><p>Could try :-</p><div class="codebox"><pre><code>grub-install /dev/xvda2</code></pre></div><p>except that grub-install isn&#039;t there!</p><p>Running Synaptic :-<br />Only grub-common has been installed.<br />install grub-pc</p><div class="quotebox"><blockquote><div><p>E:grub-pc: installed grub-pc package post-installation script<br />subprocess returned exit status 255</p></div></blockquote></div><p>but the three packages are installed.</p><div class="codebox"><pre><code>grub-install /dev/xvda2</code></pre></div><p>this fails</p><div class="codebox"><pre><code>grub-mkconfig -o /boot/grub/grub.cfg</code></pre></div><p>This works.</p><p>Shutdown and edit the Xen config file to enable PyGrub.</p><div class="quotebox"><blockquote><div><p># Boot info for the installed OS. We need kernel and ramdisk if grub failed to install :-<br /># Use pygrub if grub was installed.</p><p># kernel&#160; &#160; &#160; = &#039;/vmlinuz&#039;<br /># ramdisk&#160; &#160; &#160;= &#039;/initrd.img&#039;<br />bootloader&#160; = &#039;/usr/bin/pygrub&#039;<br />extra&#160; &#160; &#160; &#160;= &#039;console=hvc0 xen-fbfront.video=32,1600,1000&#039;<br />root&#160; &#160; &#160; &#160; = &#039;/dev/xvda2 ro&#039;</p></div></blockquote></div><p>then :-</p><div class="codebox"><pre><code>xl create net.cfg -c</code></pre></div><div class="quotebox"><blockquote><div><p>pyGRUB&#160; version 0.6<br /> ┌────────────────────────────────────────────────────────────────────────┐<br /> │ Debian GNU/Linux&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;│<br /> │ Debian GNU/Linux, with Linux 4.19.0-9-amd64&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;│<br /> │ Debian GNU/Linux, with Linux 4.19.0-9-amd64 (recovery mode)&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; │<br /> │&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; │<br /> │&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; │<br /> │&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; │<br /> │&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; │<br /> │&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; │<br /> └────────────────────────────────────────────────────────────────────────┘<br />&#160; &#160; &#160;Use the ^ and v keys to select which entry is highlighted.&#160; &#160; &#160; &#160; &#160; &#160; <br />&#160; &#160; &#160;Press enter to boot the selected OS, &#039;e&#039; to edit the&#160; &#160; &#160; <br />&#160; &#160; &#160;commands before booting, &#039;a&#039; to modify the kernel arguments<br />&#160; &#160; &#160;before booting, or &#039;c&#039; for a command line.</p></div></blockquote></div><p>This then boots as expected. It does set the screen to 24x80 but you<br />can choose your kernel etc. If all is well and you just want to<br />boot the standard kernel use this and avoid the 24x80 screen :-</p><div class="codebox"><pre><code>xl create net.cfg
xl console net</code></pre></div><p>To get VNC working properly (i.e. with the cursor behaving) :-</p><p>On the new VM (net)</p><div class="codebox"><pre><code>apt install vnc4server</code></pre></div><p>Then from Dom0 as yourself :-</p><div class="codebox"><pre><code>ssh -L 5901:localhost:5901 net</code></pre></div><p>and on &quot;net&quot; (DomU)</p><div class="codebox"><pre><code>vncserver -geometry 1600x1000</code></pre></div><p>leave this window running to keep the ssh tunnel open.</p><p>and back on the host OS (Dom0)</p><div class="codebox"><pre><code>vncviewer :1</code></pre></div><p>You should have a nice big screen where the cursor works<br />properly and where you can copy and paste with Dom0 windows.<br />It does not test the lightdm login screen, as you are already<br />logged in when you run vncserver.</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Mon, 01 Jun 2020 14:37:08 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=22226#p22226</guid>
		</item>
		<item>
			<title><![CDATA[Re: Xen and the art of VM]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=14149#p14149</link>
			<description><![CDATA[<p><span class="bbu"><strong>Other USB devices</strong></span></p><p>Having got a memory stick working I tried a portable DVD drive</p><div class="codebox"><pre><code>usbip port
Imported USB devices
====================
Port 00: &lt;Port in Use&gt; at High Speed(480Mbps)
       LaCie, Ltd : unknown product (059f:0643)
       1-1 -&gt; usbip://192.168.42.9:3240/1-2
           -&gt; remote bus/dev 001/005</code></pre></div><p>This worked and I was able to play an audio CD through VLC, once I had added myself to the group &quot;cdrom&quot;. &quot;eject&quot; also worked.</p><p>Later I tried to put a video DVD in... Unfortunately this hung Dom0!</p><p>The DVD was mounted in Dom0 and then an info request came from DomU and then an attach request. This attachment seemed to complete and then there was a &quot;general protection fault: 0000 [#1] SMP NOPTI&quot; followed by a traceback from usbip-host on Dom0 and then the kernel went into a loop of tracebacks. Time to hit the power switch...</p><p>I spotted a USB bluetooth dongle for £1 in a charity shop, so I bought it. My Dom0 machine hasn&#039;t got bluetooth installed, but I attached it through to the Beowulf DomU and bluetoothctl show returns some plauseable looking data. I have yet to work out how to get it to actually do anything useful, despite having read <span class="bbc">man bluetoothctl</span>!</p><div class="codebox"><pre><code>bluetoothctl
Agent registered
[bluetooth]# help</code></pre></div><p>is more informative, but bluetoothctl seems to have to be run as root to actually report anything.</p><div class="codebox"><pre><code>[bluetooth]# discoverable on
Failed to set discoverable on: org.bluez.Error.Failed</code></pre></div><p>The Bluetooth dongle could be seen, but I was not sure what to do with it. Connman was also able to see the dongle.</p><p>The next thing I tried was an external USB disk drive, a Samsung M3 Portable, which is USB 3 and, I recall 2TB. Unfortunately this did not work. I seemed that it was possible to connect it through to DomU but then it disconnects with the error :-</p><div class="codebox"><pre><code>[ 5286.237272] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?</code></pre></div><p>USBIP seems to work in the general case, but some more extreme uses cause it problems. I think that it was problems with USBIP rather than Xen.</p><p>Geoff</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Fri, 08 Feb 2019 16:37:38 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=14149#p14149</guid>
		</item>
		<item>
			<title><![CDATA[Re: Xen and the art of VM]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=13984#p13984</link>
			<description><![CDATA[<p><strong><span class="bbu">USB</span></strong></p><p>The next thing I wanted to try was using USB devices in DomU.</p><p>The Xen&#039;s documentation on USB PassThrough<br /><a href="https://wiki.xenproject.org/wiki/Xen_USB_Passthrough" rel="nofollow">https://wiki.xenproject.org/wiki/Xen_USB_Passthrough</a><br />seems to hint that it doesn&#039;t work and if you are not able to use PCI PassThrough to give an entire USB hub to DomU then you could use client/server software to pass the USB control over the network connection, mentioning <span class="bbc">USBIP</span>. I was unable to get the Xen USB PassThrough to work.</p><p>Some of the USBIP documentation seems to be a bit out of date.<br /><a href="https://sourceforge.net/p/usbip/git-windows/ci/master/tree/trunk/userspace/README" rel="nofollow">https://sourceforge.net/p/usbip/git-win … ace/README</a></p><div class="codebox"><pre><code>man usbip
usbip help</code></pre></div><p>but with a bit of trial and error it works quite well. It is not restricted to Xen or VMs and should work between real machines as well.</p><p>On Dom0 (the host) install usbip:-</p><div class="codebox"><pre><code>apt-get install usbip

modprobe usbip-core
modprobe usbip-host
usbipd -D
usbip list -l
 - busid 2-1 (046d:c52b)
   Logitech, Inc. : Unifying Receiver (046d:c52b)

 - busid 2-2 (0781:5151)
   SanDisk Corp. : Cruzer Micro Flash Drive (0781:5151)

usbip bind --busid 2-2
usbip: info: bind device on busid 2-2: complete</code></pre></div><p>then on beowulf (DomU - the client) install usbip</p><div class="codebox"><pre><code>apt-get install usbip

modprobe usbip-core
modprobe vhci_hcd</code></pre></div><p>this only seems to work with the numeric address of the server</p><div class="codebox"><pre><code>usbip list -r 192.168.42.9
Exportable USB devices
======================
 - 192.168.42.9
        2-2: SanDisk Corp. : Cruzer Micro Flash Drive (0781:5151)
           : /sys/devices/pci0000:00/0000:00:14.0/usb2/2-2
           : (Defined at Interface level) (00/00/00)

usbip attach -r 192.168.42.9 -b 2-2</code></pre></div><p>I was then asked for authentication as Spacefm popped up. There was some confusion with one window complaining about another authentication in progress. I think this is a conflict between gvfs and Spacefm both trying to mount the device, with gvfs winning. I dismissed that one and authenticated as me and Spacefm had the usb memory stick mounted via gvfsd-fuse plus the 2 partitions displayed. I could unmount the gvfs in Spacefm and then unmount sda1 and sda2 (my &#039;real&#039; disk is xvda2)</p><div class="codebox"><pre><code>usbip port
Imported USB devices
====================
Port 00: &lt;Port in Use&gt; at High Speed(480Mbps)
       SanDisk Corp. : Cruzer Micro Flash Drive (0781:5151)
       1-1 -&gt; usbip://192.168.42.9:3240/2-2
           -&gt; remote bus/dev 002/005

usbip detach -p 0
usbip: info: Port 0 is now detached!</code></pre></div><p>I have now removed gvfs and installed udevil. There is now no conflict over authentication. I can now mount and unmount the partitions at will in Spacefm.</p><p>Using <span class="bbc">usbip attach</span> and <span class="bbc">detach</span> seems to be like plugging and unplugging the memory stick.</p><div class="codebox"><pre><code>usbip attach -r 192.168.42.9 -b 2-2
lsusb
Bus 016 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 015 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 014 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 013 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 012 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 011 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 009 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 010 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 0781:5151 SanDisk Corp. Cruzer Micro Flash Drive
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

usbip detach -p 0
usbip: info: Port 0 is now detached!</code></pre></div><p>Back on Dom0 (the server) :-</p><div class="codebox"><pre><code>usbip unbind -b 2-2
usbip: info: unbind device on busid 2-2: complete</code></pre></div><p>and the device is again available on Dom0.</p><p>I have only tested this with a memory stick so far, but will try some other devices.</p><p>Geoff</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Sun, 03 Feb 2019 15:57:37 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=13984#p13984</guid>
		</item>
		<item>
			<title><![CDATA[Re: Xen and the art of VM]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=13811#p13811</link>
			<description><![CDATA[<p><span class="bbu"><strong>Sound</strong></span></p><p>Having got Beowulf running as a Xen guest VM (DomU), I wanted to check that things were working properly. I therefore needed to get the audio working. I added myself to the group &#039;audio&#039; on DomU with something like</p><div class="codebox"><pre><code>addgroup user1 audio</code></pre></div><p>This does not take effect until re-logging in but it may even be necessary to reboot DomU.</p><p>I tried the emulated sound using qemu, so on Dom0 :-</p><div class="codebox"><pre><code>$ qemu-system-i386 -soundhw help
Valid sound card names (comma separated):
sb16        Creative Sound Blaster 16
es1370      ENSONIQ AudioPCI ES1370
ac97        Intel 82801AA AC97 Audio
adlib       Yamaha YM3812 (OPL2)
gus         Gravis Ultrasound GF1
cs4231a     CS4231A
hda         Intel HD Audio
pcspk       PC speaker</code></pre></div><p>I actually have an Intel card, so went for &#039;<span class="bbc">hda</span>&#039; and later tried &#039;<span class="bbc">all</span>&#039;.<br />I Tried adding this to the <span class="bbc">beowulf.cfg</span></p><div class="codebox"><pre><code>soundhw     = &#039;hda&#039;</code></pre></div><p>which should use qemu to emulate a card, but this did not work. I then tried</p><div class="codebox"><pre><code>vsnd        = [
                 [ &#039;CARD, short-name=Main&#039;,
                   &#039;PCM, name=Main&#039;,
                       &#039;STREAM, id=0, type=p&#039;,
                       &#039;STREAM, id=1, type=c&#039;,
                 ]
              ]   </code></pre></div><p>this still produces :-</p><div class="codebox"><pre><code>aplay -l
aplay: device_list:272: no soundcards found...</code></pre></div><p>The next thing to try was passing the hardware sound card through to DomU.</p><p><a href="https://wiki.xenproject.org/wiki/Xen_PCI_Passthrough" rel="nofollow">https://wiki.xenproject.org/wiki/Xen_PCI_Passthrough</a></p><p>On Dom0</p><div class="codebox"><pre><code>lspci|grep -i audio</code></pre></div><p>notice which is the sound card you want to use. Mine was <span class="bbc">00:1b.0</span></p><div class="codebox"><pre><code>modprobe xen-pciback
xl pci-assignable-add 00:1b.0
xl list
xl pci-attach beowulf &#039;00:1b.0&#039;</code></pre></div><p>The DomU kernel does pick up the newly attached pci stuff without a reboot.</p><div class="codebox"><pre><code>aplay /usr/share/sounds/alsa/*</code></pre></div><p>This now works and both vlc and Firefox play stuff nicely on DomU,<br />but, of course, Dom0 can no longer access the sound card...</p><div class="codebox"><pre><code>aplay -l
aplay: device_list:270: no soundcards found...</code></pre></div><p>However, the passing through, by this method, is not persistant, so after a re-boot should revert to normal. But you can also revert manually :-</p><div class="codebox"><pre><code># xl pci-list beowulf
Vdev Device
00.0 0000:00:1b.0

# xl pci-assignable-remove -r &#039;00:1b.0&#039;
libxl: info: libxl_pci.c:844:libxl__device_pci_assignable_remove: Rebinding to driver at /sys/bus/pci/drivers/snd_hda_intel</code></pre></div><p>and Dom0 can now see the card again</p><div class="codebox"><pre><code>$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0</code></pre></div><p>The sound works well in DomU and the set up is ok for testing purposes. It is possible to make the set-up persistant as described at the URL above.</p><p>I did spot a &quot;Howto&quot; using Jack between Dom0 and DomU to get sound working in both, although I have not tried it.<br /><a href="https://forums.linuxmint.com/viewtopic.php?f=42&amp;t=160527" rel="nofollow">https://forums.linuxmint.com/viewtopic. … 2&amp;t=160527</a></p><p>Geoff</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Thu, 24 Jan 2019 10:44:16 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=13811#p13811</guid>
		</item>
		<item>
			<title><![CDATA[Re: Xen and the art of VM]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=13551#p13551</link>
			<description><![CDATA[<p>I wanted to check whether I really needed to use aptitude for the upgrades, so I tried</p><div class="codebox"><pre><code>apt-get update
apt-get upgrade</code></pre></div><p>(selecting &quot;no&quot;) and then </p><div class="codebox"><pre><code>apt-get dist-upgrade</code></pre></div><p>(again selecting &quot;no&quot;)</p><p><span class="bbc">apt-get upgrade</span> wanted to do what I wanted</p><div class="codebox"><pre><code>Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  libpolkit-agent-1-0 libpolkit-backend-1-0 libpolkit-gobject-1-0 policykit-1
The following packages will be upgraded:
...</code></pre></div><p>while <span class="bbc">dist-upgrade</span> reported the following</p><div class="codebox"><pre><code>The following packages will be REMOVED:
  libpolkit-backend-elogind-1-0 task-lxqt-desktop</code></pre></div><p>as well as offering all the stuff I wanted for autoremove.</p><p>I let <span class="bbc">apt-get upgrade</span> run and all seems well. I assume that this is because it corresponds to <span class="bbc">aptitude safe-upgrade</span> rather than any special magic in aptitude! I think that aptitude was useful for sorting out the main install.</p><p>Geoff</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Thu, 03 Jan 2019 15:50:53 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=13551#p13551</guid>
		</item>
		<item>
			<title><![CDATA[Re: Xen and the art of VM]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=13540#p13540</link>
			<description><![CDATA[<p><span class="bbu"><strong>Beowulf</strong></span></p><p>What I really wanted to do was to try out Beowulf, installing it from scratch. The easiest way to install it under Xen is with xen-tools using debootstrap. I am assuming the modifications to the set up listed at the start of this rambling thread, including having set-up xen-tools.conf to install ASCII.</p><div class="codebox"><pre><code>cd /etc/xen-tools</code></pre></div><p>edit <span class="bbc">xen-tools.conf</span> and change the distribution name to beowulf</p><div class="codebox"><pre><code>xen-create-image --hostname beowulf</code></pre></div><div class="codebox"><pre><code>Use of uninitialized value within %DIST in pattern match (m//) at /usr/bin/xen-create-image line 1803.</code></pre></div><p>But seems to run ok.<br />Give it the new root password and it&#039;s all done.</p><div class="codebox"><pre><code>xl create beowulf.cfg -c</code></pre></div><p>boots ok but for a pause for random, then login prompt appears.</p><div class="codebox"><pre><code>root@beowulf:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            953M     0  953M   0% /dev
tmpfs           199M   60K  199M   1% /run
/dev/xvda2       20G  653M   18G   4% /
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           808M     0  808M   0% /run/shm
root@beowulf:~# swapon -s
Filename				Type		Size	Used	Priority
/dev/xvda1                             	partition	2097148	0	-2
root@beowulf:~# uname -a
Linux beowulf 4.19.0-1-amd64 #1 SMP Debian 4.19.12-1 (2018-12-22) x86_64 GNU/Linux</code></pre></div><p>This is a fairly minimal installation, it uses 653M of dik. I now want to install LXQt</p><div class="codebox"><pre><code>apt-get update
apt-get dist-upgrade</code></pre></div><div class="codebox"><pre><code>root@beowulf:~# apt-cache policy policykit-1
policykit-1:
  Installed: (none)
  Candidate: 0.105-23
  Version table:
     0.105-23 500
        500 http://deb.devuan.org/merged beowulf/main amd64 Packages</code></pre></div><p>Following the advice from Fred43 in the Beowulf thread :-</p><p><a href="https://dev1galaxy.org/viewtopic.php?id=2301" rel="nofollow">https://dev1galaxy.org/viewtopic.php?id=2301</a></p><div class="codebox"><pre><code>cd /etc/apt/preferences.d</code></pre></div><p>edit avoid_some_beo</p><div class="codebox"><pre><code>  Package: policykit-1
  Pin: release a=beowulf
  Pin-Priority: -1

  Package: libpolkit-agent-1-0
  Pin: release a=beowulf
  Pin-Priority: -1 

  Package: libpolkit-backend-1-0
  Pin: release a=beowulf
  Pin-Priority: -1

  Package: libpolkit-gobject-1-0
  Pin: release a=beowulf
  Pin-Priority: -1</code></pre></div><div class="codebox"><pre><code>cd ..</code></pre></div><p>edit sources.list and add in :-</p><div class="codebox"><pre><code>#
# ASCII for policykit-1 etc
#
deb     http://deb.devuan.org/merged     ascii main  </code></pre></div><p>This on its own did not seem to be good enough</p><div class="codebox"><pre><code>apt-get update
apt-get install policykit-1</code></pre></div><p>pulls in the other ones listed above and someother stuff, but they are the wrong versions, from Beowulf.</p><div class="codebox"><pre><code>root@beowulf:/etc/apt# apt-cache policy policykit-1
policykit-1:
  Installed: 0.105-23
  Candidate: 0.105-23
  Version table:
 *** 0.105-23 500
        500 http://deb.devuan.org/merged beowulf/main amd64 Packages
        100 /var/lib/dpkg/status
     0.105-18+devuan2.11 500
        500 http://deb.devuan.org/merged ascii/main amd64 Packages

apt-get purge policykit-1
apt-get autoremove</code></pre></div><p>As I didn&#039;t trust myself to type in the version numbers correctly, I used the &quot;/ascii&quot; method to get the right versions</p><div class="codebox"><pre><code>apt-get install policykit-1/ascii libpolkit-agent-1-0/ascii libpolkit-backend-1-0/ascii libpolkit-gobject-1-0/ascii</code></pre></div><div class="codebox"><pre><code>Selected version &#039;0.105-18+devuan2.11&#039; (Devuan:2.0/stable [amd64]) for &#039;policykit-1&#039;
Selected version &#039;0.105-18+devuan2.11&#039; (Devuan:2.0/stable [amd64]) for &#039;libpolkit-agent-1-0&#039;
Selected version &#039;0.105-18+devuan2.11&#039; (Devuan:2.0/stable [all]) for &#039;libpolkit-backend-1-0&#039;
Selected version &#039;0.105-18+devuan2.11&#039; (Devuan:2.0/stable [all]) for &#039;libpolkit-gobject-1-0&#039;
The following packages were automatically installed and are no longer required:
  elogind libelogind0
The following packages will be REMOVED:
  libpam-elogind</code></pre></div><p>It does install a range of other stuff but looked ok.</p><p>edit sources.list and comment out the ascii line</p><div class="codebox"><pre><code>apt-get update
apt-get install task-lxqt-desktop task-british-desktop</code></pre></div><div class="codebox"><pre><code>The following packages have unmet dependencies:
 task-lxqt-desktop : Depends: libpolkit-backend-elogind-1-0 but it is not installable</code></pre></div><p>put back the ascii repositary and try again but specify /ascii</p><div class="codebox"><pre><code>apt-get aptitude
apt-get install libpolkit-backend-elogind-1-0/ascii libpolkit-gobject-elogind-1-0/ascii</code></pre></div><p>This was ok, but then the following fails.</p><div class="codebox"><pre><code>apt-get install task-lxqt-desktop task-british-desktop

The following packages have unmet dependencies:
 task-lxqt-desktop : Depends: policykit-1 but it is not going to be installed
                     Depends: libpolkit-backend-elogind-1-0 but it is not going to be installed</code></pre></div><p>They are on the ascii versions. I read that aptitude is better at conflict resolution, so tried</p><div class="codebox"><pre><code>aptitude install task-lxqt-desktop task-british-desktop
 :
 :
 The following packages will be upgraded:
  libpolkit-agent-1-0 libpolkit-gobject-1-0 
2 packages upgraded, 1257 newly installed, 2 to remove and 2 not upgraded.
Need to get 861 MB/861 MB of archives. After unpacking 3212 MB will be used.
The following packages have unmet dependencies:
 libx11-6 : Depends: libx11-data but it is not going to be installed
 libpolkit-backend-elogind-1-0 : Depends: libpolkit-gobject-1-0 (= 0.105-18+devuan2.11) but 0.105-23 is to be installed
 policykit-1 : Depends: libpolkit-agent-1-0 (= 0.105-18+devuan2.11) but 0.105-23 is to be installed
               Depends: libpolkit-gobject-1-0 (= 0.105-18+devuan2.11) but 0.105-23 is to be installed
The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     gir1.2-polkit-1.0 [Not Installed]                  
2)     libpolkit-agent-1-0 [0.105-18+devuan2.11 (now)]    
3)     libpolkit-gobject-1-0 [0.105-18+devuan2.11 (now)]  
4)     libx11-data [2:1.6.7-1 (now, testing)]             
5)     system-config-printer [Not Installed]              

     Leave the following dependencies unresolved:         
6)     lxqt-config recommends system-config-printer       
7)     task-lxqt-desktop recommends system-config-printer 

Accept this solution? [Y/n/q/?] y</code></pre></div><p>This then proceeds and needs the keyboard setting up. I think that everything looks ok.</p><div class="codebox"><pre><code>apt-get install vnc4server rxvt-unicode-256color</code></pre></div><p>from the host machine :-</p><div class="codebox"><pre><code>ssh -L 5901:localhost:5901 beowulf
vncserver -geometry 1260x960</code></pre></div><p>then back on the host machine :-</p><div class="codebox"><pre><code>vncviewer :1</code></pre></div><p>and it is running LXQt ;-)</p><div class="codebox"><pre><code>cat /etc/fstab
# /etc/fstab: static file system information.
#
# &lt;file system&gt; &lt;mount point&gt;   &lt;type&gt;  &lt;options&gt;       &lt;dump&gt;  &lt;pass&gt;
proc            /proc           proc    defaults        0       0
devpts          /dev/pts        devpts  rw,noexec,nosuid,gid=5,mode=620 0  0
/dev/xvda1 none swap sw 0 0
/dev/xvda2 / ext4 noatime,nodiratime,errors=remount-ro 0 1</code></pre></div><p>synaptic runs and I can install openbox and spacefm</p><p>Alternatively try this without running the vnc stream over ssh :-</p><div class="codebox"><pre><code>ssh beowulf
vncserver -geometry 1260x960 -localhost no</code></pre></div><p>then back on the host machine</p><div class="codebox"><pre><code>vncviewer beowulf:1</code></pre></div><p>You can try ssh -f which closes the link after running the command :-</p><div class="codebox"><pre><code>ssh -f beowulf vncserver -geometry 1260x960 -localhost no</code></pre></div><p>you may be asked for a password</p><div class="codebox"><pre><code>vncviewer beowulf:1 &amp;</code></pre></div><p>you may be asked for the vnc connection password</p><p>This runs but seems to bugger up authentication!!! I can&#039;t run synaptic while leaving open the ssh link allows it to ask for a password in a separate X window via vnc.<br />I think that using ssh -f ends up closing the session on beowulf, which then interfers with the authentication process.</p><div class="codebox"><pre><code>apt-get update
apt-get dist-upgrade</code></pre></div><p>produces a very long list of packages which can be removed by autoremove as well as :-</p><div class="codebox"><pre><code>The following packages will be REMOVED:
  libpolkit-backend-elogind-1-0 task-lxqt-desktop</code></pre></div><p>I therefore tried using aptitude instead.</p><div class="codebox"><pre><code>aptitude update
aptitude safe-upgrade</code></pre></div><p>this looks ok and ends :-</p><div class="codebox"><pre><code>Current status: 4 (-71) upgradable.</code></pre></div><p>I can still run synaptic, so the authentication still works and reports :-</p><div class="codebox"><pre><code>Installed (upgradable)

libpolkit-agent-1-0
libpolkit-backend-1-0
libpolkit-gobject-1-0
policykit-1</code></pre></div><p>which is what I think I want!</p><p>Some minor tidying-up includes using Spacefm instead of PCmanfm :-</p><p>edit /<span class="bbc">etc/xdg/autostart/lxqt-desktop.desktop</span></p><p>change <span class="bbc">pcmanfm-qt </span>into <span class="bbc">spacefm</span></p><p>Although <span class="bbc">gksu</span> has been removed in Beowulf, <span class="bbc">lxqt-sudo</span> works instead.</p><p>So far it looks good, although I am using aptitude for updates rather than apt-get.</p><p>Geoff</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Wed, 02 Jan 2019 16:25:50 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=13540#p13540</guid>
		</item>
		<item>
			<title><![CDATA[Re: Xen and the art of VM]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=13501#p13501</link>
			<description><![CDATA[<p><span class="bbu"><strong>Netinstall</strong></span></p><p>Having tried the Live iso, I then wanted to try the Netinst iso.</p><p>I download devuan_ascii_2.0.0_amd64_netinst.iso</p><div class="codebox"><pre><code>mount -t iso9660 /home/user1/src/devuan_ascii_2.0.0_amd64_netinst.iso /mnt/inst_iso/</code></pre></div><p>and then set up the disk space for the VM</p><div class="codebox"><pre><code>lvcreate -n net-disk -L 20g HDD0
lvcreate -n net-swap -L 4g HDD0
mkfs.ext4 -L root /dev/HDD0/net-disk
mkswap -L swap /dev/HDD0/net-swap</code></pre></div><div class="codebox"><pre><code>cd /etc/xen</code></pre></div><p>and set up the cfg file net.cfg</p><div class="codebox"><pre class="vscroll"><code>#
# Configuration file for the Xen instance net for a Devuan iso
#

kernel = &quot;/mnt/inst_iso/install.amd/vmlinuz&quot;
ramdisk = &quot;/mnt/inst_iso/install.amd/initrd.gz&quot;

# bootloader = &#039;/usr/lib/xen-4.8/bin/pygrub&#039;
# root        = &#039;/dev/xvda2 ro&#039;

extra  = &quot;console=hvc0&quot;

#
#  Disk device(s).
#

disk        = [
                  &#039;format=raw, vdev=xvdc, access=r, devtype=cdrom, target=/home/user1/src/devuan_ascii_2.0.0_amd64_netinst.iso&#039;,
                  &#039;format=raw, vdev=xvda2, access=w, target=/dev/HDD0/net-disk&#039;,
                  &#039;format=raw, vdev=xvda1, access=w, target=/dev/HDD0/net-swap&#039;,
              ]

#
#  Local set-up
#
#   Limits

vcpus       = &#039;2&#039;
memory      = &#039;2048&#039;

#
#  Hostname
#
name        = &#039;net&#039;

#
#  Networking
#

vif         = [ &#039;mac=00:16:3E:00:00:06, bridge=xenbr0&#039; ]

#
#  Behaviour
#
on_poweroff = &#039;destroy&#039;
on_reboot   = &#039;restart&#039;
on_crash    = &#039;restart&#039;</code></pre></div><div class="codebox"><pre><code>xl create net.cfg -c</code></pre></div><p>This boots straight into the installation.</p><p>This runs nicely until the disk set up.<br />I would like to be able to tell you what I did to get it working, but I went round so many times that I am not sure what the magic incantation was. I did go back to the main menu and selected the shell. I was then able to run</p><div class="codebox"><pre><code>mkfs.ext4 -L root /dev/xvda2
mkswap -L swap /dev/xvda1</code></pre></div><p>Exiting the shell gets back to the main menu at the disk option and going round several more times it eventually worked. It wanted to chop up the main bit of disk for root and swap and not use the disk I wanted to use for swap. It was probably just a matter of getting the settings just right, but it was quite hard work. If the settings were not correct, then it would fail to set up the partitions.</p><p>Once the disk set-up was ok it went on and installed the base system and then went on to let me select what extra software I wanted:-</p><div class="codebox"><pre><code>Devuan DE
LXQt
SSH server
std sys utils</code></pre></div><p>But, what is Console productivity?</p><p>It went through the installion, but after installing LibreOffice-common got</p><div class="codebox"><pre><code>                     Installation step failed  
     │ An installation step failed. You can try to run the failing item  │
     │ again from the menu, or skip it and choose something else. The    │
     │ failing step is: Select and install software                      │</code></pre></div><p>After escaping out to the shell and then coming back to the menu, I re-ran &quot;select and install software&quot;</p><div class="codebox"><pre><code>cleaning up...</code></pre></div><p>and it seemed ok, but then</p><div class="codebox"><pre><code>Installation step failed (grub)
no boot installed.</code></pre></div><p>Dropping back to the shell again I could see :-</p><div class="codebox"><pre><code># df -h
Filesystem                Size      Used Available Use% Mounted on
none                    199.6M     36.0K    199.6M   0% /run
devtmpfs                972.1M         0    972.1M   0% /dev
/dev/xvda2               19.6G      4.0G     14.6G  21% /target
/dev/xvda2               19.6G      4.0G     14.6G  21% /dev/.static/dev
devtmpfs                972.1M         0    972.1M   0% /target/dev
/dev/xvdc               298.0M    298.0M         0 100% /target/media/cdrom0
/dev/xvdc               298.0M    298.0M         0 100% /cdrom</code></pre></div><p>While I was there I quickly edited inittab to set up the virtual console :-</p><div class="codebox"><pre><code>cd /target/etc
cat &lt;&lt; EOF &gt;&gt; inittab
vc:2345:respawn:/sbin/getty 38400 hvc0
EOF</code></pre></div><p>and then to sort out the grub situation I copied over /boot/grub from my earlier effort &quot;inst&quot; to &quot;net&quot; and<br />edited the uuid to be /dev/xvda2 and checked the kernel version number v. carefully!!!</p><p>coming back to the menu, it then wanted to reboot. I let it do this, but then from the host I killed it off :-</p><div class="codebox"><pre><code>xl destroy net</code></pre></div><p>After editing <span class="bbc">/etc/xen/net.cfg</span> to boot off the disk rather than the iso, by commenting out the kernel and ramdisk lines along with the iso disk entry and uncommenting the bootloader and root line.</p><div class="codebox"><pre><code>xl create net.cfg -c</code></pre></div><p>booted correctly and I can login on the console as and run apt-get :-</p><div class="codebox"><pre><code>apt-get install vnc4server
apt-get install grub-pc</code></pre></div><p>I had to tell grub-pc to set up <span class="bbc">/dev/xvda2</span> which seems to have sorted the boot set-up</p><p>One way to access the new VM (called &quot;net&quot;) is :-</p><div class="codebox"><pre><code>ssh -L 5901:localhost:5901 net</code></pre></div><p>and then on &quot;net&quot;</p><div class="codebox"><pre><code>vncserver -geometry 1260x960</code></pre></div><p>adjusting the size to suit, but possibly a little smaller than the clear area on your screen, to avoid getting scroll bars, etc.</p><p>Back on the host you connect over the ssh link with</p><div class="codebox"><pre><code>vncviewer :1</code></pre></div><p>This seems to work nicely and the keyboard is set up correctly and vnc works smoothly.</p><p>Geoff</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Sat, 29 Dec 2018 18:11:07 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=13501#p13501</guid>
		</item>
		<item>
			<title><![CDATA[Re: Xen and the art of VM]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=13487#p13487</link>
			<description><![CDATA[<p>I have now tried installing the <span class="bbc">tightvncserver</span> and the <span class="bbc">openssh-server</span> on the new guest. If I then comment out the references to vnc in the configuration file for xl, in the example I am working on the is <span class="bbc">/etc/xen/inst.cfg</span>, then I can run xl create inst.cfg. Once it has booted up I can ssh into it and then run vncserver and then on the host machine run <span class="bbc">vncviewer inst:1</span> and a reasonable sized window opens running the xfce DE. The keyboard now works correctly. I also believe that it is straightforward to be able to specify the size of the vnc display, when run this way.</p><p>Geoff</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Thu, 27 Dec 2018 17:12:12 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=13487#p13487</guid>
		</item>
		<item>
			<title><![CDATA[Re: Xen and the art of VM]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=13485#p13485</link>
			<description><![CDATA[<p>I have tried running the installation from the Live set-up a few time now and it seems reasonably straightforward, whether with the GUI or from the CLI. One thing that it did highlight was that the first time through the installation process did not pick up the disk space I had allocated for swap, but had installed a swap file as /swapfile. I had allocated a disk partition /dev/xvda1. It was necessary to prepare it with</p><div class="codebox"><pre><code>mkswap -c /dev/xvda1</code></pre></div><p>which provided the UUID. This could then be edited into /etc/fstab to replace /swapfile. This was activated with</p><div class="codebox"><pre><code>swapon -a
swapoff /swapfile
swapon -s
rm /swapfile</code></pre></div><p>On later runs through the install, it picked up on the swap space.</p><p>One other problem I have encountered was the keyboard localisation. I told it to use en-GB with a 105 key KB, but after the installation it does not work as expected, including the absence of &quot;#&quot; and &quot;|&quot; which can make life a bit tricky. On the host machine, where it works, I find :-</p><div class="codebox"><pre><code>$ setxkbmap -query
rules:      evdev
model:      pc105
layout:     gb</code></pre></div><p>while on the guest which doesn&#039;t work correctly I find :-</p><div class="codebox"><pre><code>$ setxkbmap -query
rules:      evdev
model:      pc105
layout:     gb</code></pre></div><p>I wonder whether this is related to the vncserver being run under qemu, which was unable to find en-gb.</p><p>Geoff</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Thu, 27 Dec 2018 15:52:43 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=13485#p13485</guid>
		</item>
		<item>
			<title><![CDATA[Re: Xen and the art of VM]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=13483#p13483</link>
			<description><![CDATA[<p>OK, thank you for the clarification.</p><p>Geoff</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Thu, 27 Dec 2018 10:13:03 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=13483#p13483</guid>
		</item>
		<item>
			<title><![CDATA[Re: Xen and the art of VM]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=13482#p13482</link>
			<description><![CDATA[<div class="quotebox"><cite>Geoff 42 wrote:</cite><blockquote><div><p>The installation process did not seem to follow the new (?) guide :-</p><p><a href="https://devuan.org/os/documentation/install-guides/graphic-install.html" rel="nofollow">https://devuan.org/os/documentation/ins … stall.html</a></p><p>Maybe that guide was not from the live iso. Now I know how to do it, I may have a few more goes at installation, including the ncurses interface.</p><p>Geoff</p></div></blockquote></div><p>That guide is for the classic Debian installer which most of our isos use.&#160; &#160;Only the -live isos use the refracta installer.&#160; We are currently working on a similar guide for the refractainstaller.</p>]]></description>
			<author><![CDATA[dummy@example.com (golinux)]]></author>
			<pubDate>Wed, 26 Dec 2018 17:49:35 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=13482#p13482</guid>
		</item>
		<item>
			<title><![CDATA[Re: Xen and the art of VM]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=13481#p13481</link>
			<description><![CDATA[<p>On the earlier question about Refracta tools, I had a look at that. The bug report referred to a race condition between live-config and systemd-tmpfiles-setup. I was unable to find a package called systemd-tmpfiles-setup, but I did see that live-config depended on either live-config-systemd or live-config-backend. I was unable to find live-config-systemd but I had got live-config-sysvinit installed. I therefore tried installing live-config and ignored the warning about the bug. I was then able to install refractainstaller-[base|installer] and refractasnapshot-base with no further warnings.</p><p>Geoff</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Wed, 26 Dec 2018 14:45:44 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=13481#p13481</guid>
		</item>
		<item>
			<title><![CDATA[Re: Xen and the art of VM]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=13480#p13480</link>
			<description><![CDATA[<p>For the installation process itself I used the gui and it generally went ok.<br />When it came to setting up the disk space I tried running gparted, but it could only see the CDROM image xvdc and not the 2 chunks of disk xvda1 and xvda2. When I came out of gparted I was offered a choice of disk on which to install, which included xvda2, which I accepted and it all well ok. At the end I let it install grub onto xvda2. I think that this was needed so that I could use pygrub to boot whatever is the current set up on the guest&#039;s disk. I had seen a warning about the graphics not working well under qemu, although I can&#039;t relocate this now! With this set-up, the frame buffer is handled by vnc running in the host&#039;s space, with some involvement from qemu. The installation process did not seem to follow the new (?) guide :-</p><p><a href="https://devuan.org/os/documentation/install-guides/graphic-install.html" rel="nofollow">https://devuan.org/os/documentation/ins … stall.html</a></p><p>Maybe that guide was not from the live iso. Now I know how to do it, I may have a few more goes at installation, including the ncurses interface.</p><p>Geoff</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Wed, 26 Dec 2018 11:29:53 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=13480#p13480</guid>
		</item>
		<item>
			<title><![CDATA[Re: Xen and the art of VM]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=13479#p13479</link>
			<description><![CDATA[<p>The installation went ok and grub was installed on the guest&#039;s disk <span class="bbc">/dev/xvda2</span>.</p><p>The next thing to do is to reconfigure the configuration file, <span class="bbc">/etc/xen/inst.cfg</span>, to boot off the disk. Instead of booting from a copy of the kernel in the hosts address space, we use pygrub to look through the guest&#039;s installed grub set-up. It is also necessary to specify where root is found. I have also removed any vnc options as vnc doesn&#039;t seem to take any notice of them :-</p><div class="codebox"><pre class="vscroll"><code>#
# Configuration file for the Xen instance inst for a Devuan iso
#

bootloader = &#039;/usr/lib/xen-4.8/bin/pygrub&#039;

# kernel = &quot;/mnt/inst_iso/live/vmlinuz&quot;
# ramdisk = &quot;/mnt/inst_iso/live/initrd.img&quot;
# extra  = &quot;boot=live username=devuan console=hvc0&quot;
extra  = &quot;console=hvc0&quot;

#
#  Disk device(s).
#
root        = &#039;/dev/xvda2 ro&#039;

disk        = [
#                  &#039;format=raw, vdev=xvdc, access=r, devtype=cdrom, target=/archive/isos/Live/my-ascii-live.iso&#039;,
                  &#039;format=raw, vdev=xvda2, access=w, target=/dev/HDD0/inst-disk&#039;,
                  &#039;format=raw, vdev=xvda1, access=w, target=/dev/HDD0/inst-swap&#039;,
              ]

#
#  Local set-up
#
#   Limits

vcpus       = &#039;2&#039;
memory      = &#039;2048&#039;

#
#  Hostname
#
name        = &#039;inst&#039;

#
#  Networking
#

vif         = [ &#039;mac=00:16:3E:00:00:04, bridge=xenbr0&#039; ]

# Graphic display

vfb         = [ &#039;vnc = 1&#039; ]

#
#  Behaviour
#
on_poweroff = &#039;destroy&#039;
on_reboot   = &#039;restart&#039;
on_crash    = &#039;restart&#039;</code></pre></div><p>This works reasonably well. There is no login prompt on the console, but I can connect as myself using vnc from the host</p><div class="codebox"><pre><code>vncviewer :0</code></pre></div><p>The vnc window opens with slim and I can log in as expected.</p><p>Geoff</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Wed, 26 Dec 2018 11:13:06 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=13479#p13479</guid>
		</item>
	</channel>
</rss>
