Archive for category Business News

Xen Domain, some tips and hints.

If you have to create a xen virtual domain use this command:

xen-create-image –hostname=DOMAINNAME –size=2Gb –swap=256Mb –ide –ip=IPADDRESS –netmask=255.255.255.192 –gateway=IP_ADDRESS_HOST_SYSTEM –dir=/xen –memory=1024M –kernel=/boot/vmlinuz-2.6.26-2-xen-amd64 –initrd=/boot/initrd.img-2.6.26-2-xen-amd64 –debootstrap –dist=lenny –mirror=http://ftp2.de.debian.org/debian/ –passwd

in the DOMAINNAME.cfg please enter :

extra = “console=hvc0 xencons=tty”

to be able to login trough

xm console DOMAINNAME.cfg

Shutdown of the DOMAIN is used by xm destroy DOMAINNAME

Create is done by xm create DOMAINNAME.cfg

apt-get install udev after you have logged in

Ok, I am using Xen to create a domain (virtual machine). Now i want to resize the virtual disk image, because 2GB are not enough ?

The solution is easy :

First go to the place where my virtual disks are

cd /xen/images/DOMAINNAME/

Now i use the command dd to create a 10 GB file

dd if=/dev/zero of=10gbfile bs=1024 count=10000000

And first shutdown the guest system with xm shutdown DOMAINNAME.cfg

Now append the 10gbfile to the virtual image file

cat 10gbfile >> disk1.img

Now you have to fix the resized big file disk1.img with :

resize2fs -f disk1.img

:) done.

Now you have 10GB more on your disk1.img

How to make a image of your SD card

If you have a sd card and want to make a identical copy of it, the process is very easy. Just use the dd command, on linux or mac.

Here is the example how to make the image:


$ dd if=/dev/sdd1 conv=sync,noerror bs=64k |gzip -c > sdcard.img.gz

This makes a sdcard.img.gz file in the actual path.

To copy this on the second sd card, just enter the card in the card reader and :


$ gunzip -c sdcard.img.gz | dd of=/dev/sdd1 conv=sync,noerror bs=64K

After a while you have a identical sd card in your hand.

Very easy :) thanks to the dd command.