Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

TODO: Currently this page is under the notes section since that is what it is - a collection of notes from Rob Moran. A lot of this information would be really useful in a page under Getting Started but it would need to be cleaned up and organized. It is still quite useful for non-beginners though.

Overview

This page is a bunch of salvaged notes from a former XenClient engineer. There are quite a few useful tips and instructions for just doing things on (Open)XT. It is being splatted here in its original form for now - if folks want to clean it up, re-organize it and add to it, please feel free.

Z Indices

Ideal

  • apply update 6000
  • mouse pointer 5000
  • native screen 4500
  • wait screen 4000
  • menu popup 3000
  • tooltips 2000
  • dialogs 950
  • header 300
  • menu bar 200
  • footer 100
  • content areas 1,0,-1

Current (hacky for X applets)

  • mouse ponter 5000
  • menu popup 3000
  • tooltips 2000
  • header 1800
  • menu bar 1700
  • footer 1600
  • wait screen 1500
  • dialogs 950
  • content area 0

Synchronizer XT

You can test this by logging on to root@autotest-1

$ experiments -m ludo --syncxt-test

if you need to reset the db on your machine (check the help to see if this is correct)

$ experiments -m ludo --wipe-database

Extending xenclient/root disc size

First, delete something (/usr/lib/xui/images is good) to make room to do the resize. Alternatively steal from somewhere else e.g.

$ lvreduce -L -1G xenclient/storage
$ lvextend -L +1G xenclient/root
$ resize2fs -p /dev/xenclient/root

Debugging a daemon

Example using input daemon - you will probably need to extend xenclient/root first, as shown above.

$ opkg update
$ opkg install gdb //installs the debugger program
$ opkg list //lists available packages - find the one you're looking for
$ opkg install xenclient-input-daemon-dbg //we had to run this twice to get it to success
$ /etc/init.d/xenclient-input restart
$ ps auxw | grep input //to find the pid
$ gdb /usr/bin/input_server [pid]

some gdb basics

$ c // to continue
$ where // to get a stack trace
$ q // to quit

Getting Things Done

Enabling ‘Secure Launch’

NOTE: the tpm-setup script is currently broken.

(This was on my HP 8470p so might vary a little bit)

  • Enter BIOS setup
  • Go to Security settings
  • Set BIOS password to !XenR00t (they are zeros)
  • In the security settings - clear security keys (If the option is there)
  • go to TPM Embedded Security
  • Enable Embedded Security Device State
  • Save and reboot
  • Enter BIOS setup again
  • Go to Device Config and set TXT On
  • Save and reboot into XC
  • Open the XC terminal
  • Type:
$ nr
$ tpm–setup
  • Set the password to xenroot
  • It will do it’s thing… then you need to reboot twice.
  • Job done.

Allowing a CD install of XC to upgrade OTA

 vi /config/repo-cert.conf to read:
 ALLOW_DEV_REPO_CERT='true'

Filling a drive

10GB:

$ dd if=/dev/zero of=/storage/temp bs=1M count=$((10*1000))

Turning on touch-screen keyboard in UIVM

 on the device, edit /usr/lib/xui/script/constants.js and set KEYBOARD: true, around line 360

Running webkit JavaScript from GTK

 webkit_web_view_execute_script(web_view, "alert(window.XUICache.Host.publish_topic);");

Checking out source

git pull in these directories:

 build/oe/repos/extra/
 build/oe/xenclient/

Unlocking XT installs (for SSH and v4v-proxy)

$ newrole -r sysadm_r
$ setenforce 0
$ sed -i "s/enforcing/permissive/" /etc/selinux/config

Mounting VM read-write

This works for UIVM

$ db-write "/xenmgr/bypass-sha1sum-checks" true
$ xec-vm -n <name> --disk 0 set mode w

If already running:

$ xec-vm -n <name> reboot

Inside VM:

$ mount -o remount,rw /

Passing Through PCI Devices

put the below into: /etc/modprobe.d/blacklist-sound.conf

 blacklist snd_hda_codec_intelhtml
 blacklist snd_hda_codec_idt
 blacklist snd_hda_intel
 blacklist snd_hda_codec
 blacklist snd_hwdep
 blacklist snd_pcm
 blacklist pcspkr
 blacklist snd_timer
 blacklist snd
 blacklist soundcore
 blacklist snd_page_alloc

reboot the host change the VM config to passthrough the device:

$ xec-vm -u<vm uuid>  add-pt-rule 0x0403 any any

OR

$ xec-vm -n<vmname>  add-pt-rule 0x0403 any any

and start your VM.

For reference: 0x0403 is the PCI class for an audio device. You can see this from looking at the output in dom0 of lspci -vvv to find the PCI bus address of the device and then lspci -vvvn to see the device class of it.

Startup Wizard

$ touch /config/deferred_dom0_password
$ touch /config/deferred_kb_layout
$ touch /config/deferred_eula
$ touch /config/deferred_language

xenmgr Ops

$ tail -f /var/log/xenmgr.log

Using xec

You can work out a lot of this from looking at the IDLhttp://git.uk.xensource.com/cgit.cgi/xenclient/idl.git/tree/interfaces lists all of the properties and methods on xenmgr object. "-o /" specifies the object, and if not supplied is assumed to be "/".

$ xec
$ xec -o /

calls one of the methods listed

$ xec list-vms

lists all of the properties and methods on the host object.

$ xec -o /host

this will Get one of the properties listed

$ xec -o /host Get build-info

to interrogate vms

$ xec-vm

these are equivalent and will show you properties and methods available on VMs

$ xec-vm -o /vm/[uuid]
$ xec -o /vm/[uuid]

if you're getting a property that exists in more than one of the interfaces, then you need to explicitly set the interface

$ xec-vm -o /vm/[uuid] -i com.citrix.xenclient.xenmgr.vm.unrestricted Get state

to get VM by name

$ xec-vm -n "VM Name"

 

  • No labels