Skip to main content
Installing VirtualBox on 7.04 Server edition for VRDP use

Jose Catre-Vandis
September 20th, 2007, 07:29 PM
Aim: to install a command line system, using the 7.04 server edition, and then to install Virtualbox on it, so that I can run VMs using VRDP and access them remotely using rdesktop on client machines.

PART I
Installing the 7.04 server edition is easy, so I'll skip that.

PART II
Installing VirtualBox is much more difficult, but I got it done in the end as follows. But what I want to know is if there is a better way to do this, e.g. install a desktop 7.04 and strip it back, or reduce all the items I had to install. Not had a chance to do extensive testing on all the variations.

If you are running a headless server, login via ssh (you may need to install openssh-server after the initial install), if not work from the command line at the PC

first off, install lots of kernel/sources stuff
###install needed linux components

sudo apt-get install linux-source
sudo apt-get install make gcc build-essential
sudo apt-get install xen-headers #[choose the version you need, in this case - 2.6.19-4-server]
sudo apt-get install xen-headers-2.6.19-4-server
sudo apt-get install linux-headers-$(uname -r)

#Bridging Utilities
If you are planning on bridging your network interface, install these two packages as well
[sudo apt-get install bridge-utils
sudo apt-get install uml-utilities[/code]


###install virtualbox (may fail at this stage)

sudo nano /etc/apt/sources.list #[add vbox repository]
deb http://www.virtualbox.org/debian feisty non-free #[add this line and save file]
wget http://virtualbox.org/debian/innotek.asc
sudo apt-key add innotek.asc
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install virtualbox

(you will be asked to install loads of dependencies as well)

###Picked this section up from virtualbox.org forums, as applied to Debian Etch - credits "Ingo"
(on a second attempt at this with a fresh server install, I did not need any of this section)

cd /usr/src
sudo adduser tim src
sudo tar -xvjf linux-source-2.6.20.tar.bz2
sudo ln -s linux-source-2.6.20 linux
sudo cp /boot/config-$(uname -r) linux/.config
cd linux
sudo make oldconfig
sudo make vmlinux
sudo make oldconfig && make prepare (optional?) if above doesn't work!

#####retry setup of virtualbox if necessary

sudo /etc/init.d/vboxdrv setup

you may need to try compile again if it doesn't work first time (credits bohdi zazen :))

and it should successfully compile and load vboxdrv.

You then need to add your username to vboxusers (you should have got a warning) :

sudo adduser username vboxusers

I also added myself to the uml-net group in the same way, due to my tap interface setup. You shouldn't need to do this if you are simply using NAT
(If you haven't installed uml-utilities this group won't be there :))
sudo adduser username uml-net

###Logout and login again (to make the new group assignments work)

and with any luck Virtualbox is installed and running. You can then install a VM from the command line, start it up, and access the VM remotely. I did a clone of an existing VM and copied it over to the server, to save time and make life easier.

PART III
Installing a VM in a headless server on the command line

(Credits to Virtualbox help for some of this!)
We'll use Windows XP as the example VM

On the headless server create the following directories:
sudo mkdir ~/.VirtualBox

(if not already there)
sudo mkdir ~/.VirtualBox/VDI

Then copy your WinXP.vdi file over

cp /path/to/your/vdi/WinXP.vdi ~/.Virtualbox/VDI

On the headless server/at the command line, create a new virtual machine:
VBoxManage createvm -name "Windows XP" -register
Create the settings (read the help file if you want alternatives)
VBoxManage modifyvm "Windows XP" -memory "256MB"-acpi on -boot1 dvd -nic1 nat

Use this as well if you are using host interface, you will need to replace "tap1" with the name of your interface!
VBoxManage modifyvm "Windows XP" -nic1 hostif
VBoxManage modifyvm "Windows XP" -hostifdev1 tap1

Add your VDI file as the first virtual hard disk of the new VM:
VBoxManage modifyvm "Windows XP" -hda "WinXP.vdi"

[INSERT]
################################################## #######
If you need to create a new vdi and carry out an OS installation, follow these steps instead of just copying a vdi file over from somewhere else:

Create a virtual hard disk for the VM (in this case, 10GB in size) and register it with VirtualBox:
VBoxManage createvdi -filename "Windows XP.vdi" -size 10000 -register
Set this newly created VDI file as the first virtual hard disk of the new VM:
VBoxManage modifyvm "Windows XP" -hda "Windows XP.vdi"
Register the ISO file that contains the operating system installation that you want to install later:
VBoxManage registerimage dvd /full/path/to/iso.iso
Attach this ISO to the virtual machine, so it can boot from it:
VBoxManage modifyvm "Windows XP" -dvd /full/path/to/iso.iso

I found I got double mouse problems during the installation, but you can get by through moving the "mice" around so that you can click in the right places!

Installing VBox Additions is a bit of a fiddle this way, but if you register the iso in the same way as for the OS iso above, and then attach it you should be good to go, but you will have to browse to the iso and run the executable. The additions iso should be found here: /usr/share/virtualbox/

#############################################
[END OF INSERT]

Start the virtual machine using VBoxVRDP:
VBoxVRDP -startvm "Windows XP"
If everything worked, you should see a copyright notice. If, instead, you are returned to the command line, then something went wrong.
On the client machine, fire up the RDP viewer and try to connect to the server. Assuming an Ubuntu client:
rdesktop -a 16 my.host.address

Advice is you should set your VM to run in 16m colours to match the rdesktop call

Popular posts from this blog

Freenas Snapshots Replication Backup

Mungkin anda sudah mengetahui Freenas sebelumnya. Ya..Freenas adalah salah satu software NAS Storage berbasis FreeBSD. Karena kehandalannya, Freenas banyak digunakan sebagai NAS Storage di dunia IT. Saya pernah berfikir bagaimana jika Freenas yang kita gunakan mengalami masalah, crash misalnya. Mungkin jika hardisknya menggunakan RAID bisa tinggal ganti disknya. Bagaimana jika tidak ada RAID (hari gini Server gak ada Raid hdewww heee) atau hal lain yang membuat data tidak bisa digunakan di Freenas. Tutorial ini saya buat untuk berbagi ilmu kepada rekan2 sekalian. Saya akan coba membuat Replikasi Freenas. Dimana Dataset pada salah satu Freenas (Freenas A) akan di snapshot dan di replikasikan ke Freenas B Hal yang perlu disiapkan : 1.  Freenas A : 192.168.100.1 (Primary) Disk 8GB x 2 2.  Freenas B : 192.168.100.2 (Secondary) Disk 8GB x 2 SETING FREENAS A DAN B Kita akan buat raid mirror untuk 2 disk. Storage - Volume Manager   Volume Name :

Zimbra Error Subject : ***UNCHECKED***

Beberapa hari yang lalu Subject email Zimbra selalu di tambahkan tulisan ***UNCHECKED***. Padahal tidak ada perubahan konfigurasi mail server sebelumnya. Cari di google ada beberapa referensi yaitu merubah file /opt/zimbra/. Tahapan : #su root #cd /opt/zimbra/amavisd/bin #cp -pa amavisd amavid.org #vi amavisd Rubah isi file di baris : #su zimbra $undecipherable_subject_tag = '***UNCHECKED*** '; menjadi $undecipherable_subject_tag = '';   $zmamavisdctl restart Di hari berikutnya saya coba cek kembali utilisasi mail dengan 'top'. Terilhat penggunaan clamd sebesar 100%. Coba dicek di log /var/log/zimbra.log |grep clamd hasilnya mail amavis[26778]: (26778-07) ClamAV-clamd: All attempts (1) failed connecting to /opt/zimbra/data/clamav/clamav.sock, retrying (1) Oct 24 10:10:43 mail amavis[26778]: (26778-07) (!)connect to /opt/zimbra/data/clamav/clamav.sock failed, attempt #1: Can't connect to UNIX socket /opt/zimbra/data/clamav/clamav.sock: Co

Migrasi Nextcloud 19 ke Nextcloud 20.02 (Beda Server)

Server A : 192.168.0.1 (Server lama : Centos 7), port 80 Server B : 192.168.0.2 (Server baru : Centos 8), port 80 Nginx Load Balance : 192.168.0.10, port 443 untuk SSL Tahapan : 1. Upgrade Nextcloud 19.0.3 ke 19.0.5 (server lama) 2. Instalasi server baru (Centos 8) 3. Backup dan restore data nextcloud dan databas ke server baru 4. Konfigurasi Nextcloud di server baru dan Nginx Server 5. Finish A. Upgrade Nextcloud 19.0.3 ke 19.0.5 Untuk Upgrade 19.0.3 ke 20.0.2 tidak dapat dijalankan secara langsung. Harus bertahap upgrade ke versi minor. 19.0.3 -> 19.0.5 secara otomais. Dan upgrade ke 20.0.2 secara manual. 1. Login ke Nextcloud 2. Setting - Administration-Overview 3. Versi yang tersedia 19.0.5 5. Pilih Open updater  4. Start Update 5.  Pilih No (for usage of the web based updater), untuk mode maintenance dan upgrade via console. 6. Masuk ke console dan ke directory /var/www/html/nextcloud 7. Jalankan $ sudo   - u  apache   php occ upgrade 8. Maintenance mode masih dalam keadaan