Thursday, March 8, 2012

Linux Mint 12 in XenServer

I month or so ago I got Linux Mint 12 working in XenServer. Here are the steps I performed:
Performing the HVM

linuxmint64 Linux # apt-get install nmap
linuxmint64 Linux # apt-get install openssh-server
linuxmint64 Linux # apt-get install linux-virt?ual linux-imag?e-virtual linux-head?ers-virtual

Do...
http://www.jansipke.nl/installing-xenserver-tools-on-ubuntu-10-04

After "makepv.sh my-vm-name" from above link

login as: installer
installer@192.168.0.189's password:
Welcome to Linux Mint 12 Lisa (GNU/Linux 3.0.0-14-virtual x86_64)

Welcome to Linux Mint
* Documentation: http://www.linuxmint.com

installer@linuxmint64 ~ $ sudo su
sudo password for installer:
linuxmint64 installer # fdisk -l

Disk /dev/xvda: 12.9 GB, 12884901888 bytes
255 heads, 63 sectors/track, 1566 cylinders, total 25165824 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d8732

Device Boot Start End Blocks Id System
/dev/xvda1 * 2048 25163775 12580864 83 Linux

Disk /dev/xvdd: 117 MB, 117549056 bytes
255 heads, 63 sectors/track, 14 cylinders, total 229588 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/xvdd doesn't contain a valid partition table
linuxmint64 Downloads # mkdir /mnt
mkdir: cannot create directory `/mnt': File exists
linuxmint64 Downloads # mount /dev/xvdd /mnt
mount: block device /dev/xvdd is write-protected, mounting read-only
linuxmint64 Downloads # cd /mnt/Linux
linuxmint64 Linux # ls
debian-etch
debian-lenny
install.sh
rhel4x
versions.deb
versions.rpm
xe-guest-utilities_6.0.0-743_amd64.deb
xe-guest-utilities_6.0.0-743_i386.deb
xe-guest-utilities-6.0.0-743.i386.rpm
xe-guest-utilities-6.0.0-743.x86_64.rpm
xe-guest-utilities-xenstore-6.0.0-743.i386.rpm
xe-guest-utilities-xenstore-6.0.0-743.x86_64.rpm
xe-linux-distribution
linuxmint64 Linux # dpkg -i *amd64.deb
Selecting previously deselected package xe-guest-utilities.
(Reading database ... 188716 files and directories currently installed.)
Unpacking xe-guest-utilities (from xe-guest-utilities_6.0.0-743_amd64.deb) ...
Setting up xe-guest-utilities (6.0.0-743) ...
Mounting xenfs on /proc/xen: OK
Detecting Linux distribution version: OK
Starting xe daemon: OK
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
linuxmint64 Linux # cd
linuxmint64 ~ # umount /mnt
umount: /mnt: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
linuxmint64 ~ # shutdown -r now

Broadcast message from installer@linuxmint64
(/dev/pts/0) at 10:29 ...

The system is going down for reboot NOW
linuxmint64 ~ #


Reboot the VM and log in with SSH
Make sure the services run at boot time
linuxmint64 Linux # update-rc.d -f xe-linux-distribution remove
linuxmint64 Linux # update-rc.d xe-linux-distribution defaults
Reboot the VM for the last time
Restart XenCenter to be able to log in to the console of the VM

Now let's setup for GUI connection
linuxmint64 Linux # apt-get install tightvncserver
linuxmint64 Linux # vncserver
linuxmint64 Linux # vncserver -kill :1
linuxmint64 Linux # vi /root/.vnc/xstartup
(press 'D' for delete entire line) delete all lines
press exc when finished then press 'i' for INSERT
add lines:

unset SESSION_MANAGER
/usr/bin/gnome-session --session=gnome-classic
-x /etc/vnc/xstartup && exec /etc/vnc/xstartup
http:// -r $HOME/.Xresources && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &

Press exc the 'ZZ' to save
linuxmint64 Linux # vncserver -geometry 1024x640

then connect with a vnc viewer!

http://forums.citrix.com/thread.jspa?threadID=300142

No comments:

Post a Comment