Schlagwort-Archiv: Virtualisierung

JRockit Virtualization Edition

Ab heute gibt es Oracle WebLogic Server on JRockit Virtualization Edition als Download. Vor ein paar Wochen gab es bereits ein Meldung bei heise.de zu neuen Java-Virtualisierungswerkzeugen von Oracle – Oracle präsentiert Java-Virtualisierungswerkzeuge. Die technische Basis für dieses Produkt wurde Ende 2006 von der Firma BEA als Liquid VM angekündigt (theserverside.com – JRockit’s Liquid VM could be the first real Java OS). Hinter der JRockit Virtualization Edition steckt der Ansatz eine Java VM direkt auf virtualisierter Hardware, ohne Betriebssystem-Schicht, laufen zu lassen. Einen ähnlichen Ansatz stellt das Projekt JNode.org (Java New Operating System Design Effort) dar.

Oracle liefert die JRockit Virtualization Edition zusammen mit Weblogic als 370 MB grosses Zip-File. Darin sind folgende Dateien enthalten:

# unzip -t wlsvePackage.zip 
Archive:  wlsvePackage.zip
    testing: wlsve/                   OK
    testing: wlsve/system.img         OK
    testing: wlsve/vm.cfg             OK
    testing: wlsveimagetool.jar       OK
    testing: README.txt               OK
    testing: wlsve_medrec_domain_with_odb.pdf   OK
    testing: THIRDPARTYLICENSEREADME.txt   OK

Hauptbestandteil ist das Disk-Image system.img

$ qemu-img info wlsve/system.img 
image: wlsve/system.img
file format: raw
virtual size: 1.0G (1073741824 bytes)
disk size: 1.0G

Als Dateisystem wird in diesem Disk-Image ext2 verwendet, die Disk lässt sich daher unter Linux ohne Schwierigkeiten direkt mounten.

# mount -o loop wlsve/system.img /mnt
# cd /mnt
# ls -l
total 20
drwx------ 8 root root 4096 2010-04-14 02:48 application
drwx------ 3 root root 4096 2010-04-14 02:49 boot
drwx------ 8 root root 4096 2010-04-14 02:49 jrockitve
drwx------ 2 root root 4096 2010-04-14 02:48 lost+found
-rw------- 1 root root  361 2010-04-14 02:49 VERSION

Für den Betrieb einer Virtuellen-Maschine mit JRockit VE wird eigentlich Oracle VM benötigt. In einem ersten Test ließ sich das Disk-Image aber auch in einer normalen Xen-Umgebung booten. Hierzu wurde die Konfigurations-Datei vm.cfg mit folgendem Inhalt versehen:

name="wlsve01"
bootloader="/usr/bin/pygrub"
memory=1024
disk=['tap:aio:/var/nfs/system.img,sda1,w']
vif=['bridge=xenbr0']

Der Start der Xen-Domain erfolgt dann wie gewohnt mit den entsprechenden Xen-Befehlen.

# xm create -c vm.cfg

VMware Server under FC6 Kernel 2.6.19

Sometimes the Linux Kernel can be a little bit painful in my opinion. Just tried to compile the VMware Server Kernel Modules under 2.6.19 and got:

make[1]: Entering directory `/usr/src/kernels/2.6.19-1.2911.6.5.fc6-i686'
  CC [M]  /tmp/vmware-config0/vmnet-only/driver.o
  CC [M]  /tmp/vmware-config0/vmnet-only/hub.o
  CC [M]  /tmp/vmware-config0/vmnet-only/userif.o
/tmp/vmware-config0/vmnet-only/userif.c: In function ‘VNetCopyDatagramToUser’:
/tmp/vmware-config0/vmnet-only/userif.c:629: error: ‘CHECKSUM_HW’ undeclared 
(first use in this function)
/tmp/vmware-config0/vmnet-only/userif.c:629: error: (Each undeclared identifier is 
reported only once
/tmp/vmware-config0/vmnet-only/userif.c:629: error: for each function it appears in.)
make[2]: *** [/tmp/vmware-config0/vmnet-only/userif.o] Error 1
make[1]: *** [_module_/tmp/vmware-config0/vmnet-only] Error 2

If you search for the error message in google you can already find some patches for the VMware Kernel Modules. But I preferred to get it working manually…

I added CHECKSUM_HW to /lib/modules/2.6.19-1.2911.6.5.fc6/build/include/linux/skbuff.h:


#define CHECKSUM_NONE 0
#define CHECKSUM_PARTIAL 1
#define CHECKSUM_HW 1
#define CHECKSUM_UNNECESSARY 2
#define CHECKSUM_COMPLETE 3

Since config.h is missing as well, I gave config.h an touch as well:

touch /lib/modules/2.6.19-1.2911.6.5.fc6/build/include/linux/config.h

Now the Kernel Modules compile and VMware Server is up and running :-D

Freshmeat for the Weekend 22/06

VMware Server RC 1 (Build 24927) got released! It is free, so grab a copy and give it an test drive. I just want to outline two advanced topics:

  • Linked Clones is an concept to use one basedisk for several VMs. Changes made by the VMs are written to snapshot images. That helps you to safe diskspace when using a lot of VMs. You can read more on how to do linked clones with VMware Server in the following thread on VMTN.
  • Use arbitrary block devices as Physical Disks in VMs. VMware normally allows you to use /dev/sd* and /dev/hd* devices. So you may run in to problems if you wanted to use LVM, soft-RAID (md) or things like AoE (ATA over Ethernet). vmware-bdwrapper solves such problems. Read how to get vmware-bdwrapper working with VMware Server in that thread.

But VMware Server RC1 was not the only release you should check out, get the following things as well if you are interested: