Archive for January, 2010

Romania sucks - watch out where you park your car

Tuesday, January 12th, 2010

Last night as usual I park my car on the side of a main street in the capital named Pantelimon. As usual even there it is difficult to find a parking space. Here we have literally no parking space and sidewalks have become the parking places of many car owners.

This morning I got up to go to work and as I was walking towards the area where the car was parked I noticed that the whole side of the street that is usually filed with 10 - 20 parked cars was now empty. I thought this was very strange as there are many local business there that have a constant flux of customers and there should at least be some cars.

It didn’t take long to realize that my car has been lifted by the great and wonderful company Surecom in cooperation with ADP (Public Domain Administration) which is my sorry ass countries way of trying to apply some common sense and good manners to a society that is unable or unwilling to evolve past the stone age.

Now, the fact that my car was lifted doesn’t bother me all that much. I understand there is a problem with parking in Romania. But it is not my fault as a tax paying citizen for this. I pay quite a lot in taxes and expect to have parking space made available by my government even if for a fee but this is not the case. There is literally nowhere to park your car in any of the neighborhoods throughout Romania’s capital but this is another issue altogether.

So I called ADP-2 (that’s sector 2) and got information to speak to a mr. Mihai Barsan. I called on the number provided on their website but their land line is broken and no calls would make it through. I tried the mobile number and got in touch directly with mr. Barsan which sounded like the good old type of commie bastard that our country is now famous for. Make no mistake he is a commie bastard and should be made to pay along with the majority of our defunct and stupid politicians, executives, paper pushers, lawyers, police men, hospital directors and well basically 90% of the country. Really, its that bad! We as Romanians lack the will to live comfortably and peacefully. We are at peace only when we are chizziling our fellow citizens. If they (our fellow citizens) are not constantly hassled and their goods constantly taxed upon with laws brought up out of thin air we are not happy people. Hence my hate blog post…but I digress.

He said that he was busy, he was on the field (probably picking up more cars illegally) and to call the land line mentioned above. As he was busy I was not able to get much out of him except that he thinks some company named Supercom (another government company that does a lot of dirty work) picked up my car.

Since their land lines do not function I am unable to get a hold of anyone who knows where my car is. I know the fees are 500 RON for them picking it up and 250 RON per day for parking. I intend to get it back today so I don’t pay daily parking which at that price should include a wash and a happy ending. But hey how else would our illegal and corrupt government make money to keep the likes of Ontanu and other bastards into villas while the rest of us pour our hearts into our work only to be denigrated by our government and sad living standards. Our conditions are so lousy that I see no alternative but to leave this sorry ass place.

We are being abused by our government. Our government is composed of people like you and me. You and me must be some sad people to do such things to one another. Wait a minute, I don’t to this type of stuff to anyone. I don’t speak when I’m not spoken to. I don’t steal, murder, indoctrinate kids with religion or anything that a current society considers wrong (except for that our government considers indoctrination with myths good). Yet, my government constantly abuses me, my knowledge and my person. This is a gross abuse of the governments power and of some politicians.

I have nothing to do in this case. No lawyers will go up against these bastards (Ive tried many times) so were all basically stuck and the only thing we can do is bitch about it…aint that a bitch!

UPDATE: my colleagues pinned down my car. it seems its about 10 kilometeres outside of Bucharest. Good thing they didn’t send to Timisoara or some other city…what a load of crap.

RHEV - import vmware image into RHEV

Saturday, January 2nd, 2010

Since a lot of our work lately has been based on working with RHEV and NagiosXI I wrote a small howto for converting and importing a vmware vmdk image into RHEV. The procedure details how to import into RedHats RHEV virtualization product but the converted image can be used across any KVM enabled server.

Since RHEV at its present version does not include import tools the above procedure is useful for those that need to migrate from one solution to another.

————

For those using Red Hat Enterprise Virtualization here is what I hope to be an understandable procedure for migrating your vms. The idea is to create a new vm in RHEV with a preallocated hard disk the same size or larger than the one to be imported. From here we just need to identify where the vm’s disk are located in the rhev datacenter hierarchy and copy over our converted vm.

First you must convert your nagiosXI image to qcow2 in order for RHEV to import it. This is accomplished by issuing the following command:

Code:
# qemu-img convert -O qcow2 nagiosxi-kvm.img

On the RHEV manager

1. Create a new virtual machine from the RHEV manager interface.

1.a. Select RHEL 5.x as the operating system.

2. Configure network interfaces and hard disks

Note: The RHEV Guide Me wizard will pop-up after creating the vm.

2.a. Select Configure Network Interfaces and select the network and type. When selecting the netowrk type (drivers) you can use any of the provided drivers including RedHat VirtIO (recommended) as they are included in NagiosxI.

2.b. Select Configure Virtual Disks and make sure you configure your new disk to be exactly the same size or larger than the size of the NagiosXI virtual disk. In our test environment we created a 20 GB disk. Make sure that you keep the type (driver) to IDE and select preallocated disk!

Note: The hard disk must be at least the same size as the one to be imported and preallocates.

3. Identify your newly created vm and associated disk(s) in RHEVM datacenter.

NOTE: I am assuming you only have one DataCenter. If you have more than one you need to identify the ID of the datacenter that you wish to migrate into.

3.a. Using the RHEV Manager Scripting Library display your vm’s id:

Code:
PS C:\> $vm=select-vm(”Name=“)
PS C:\> $vm

VmId : 1c657f20-1d64-4bff-9084-93530962040f
Name : w2k30-02
Description :
HostClusterId : 1
TemplateId : 2108f097-8993-4edf-b423-a81344aef747

From the above note the VmID.

3.b. Using the RHEV Manager Scripting Library display your vm’s disk id(s):

Code:
PS C:\> $vm.getdiskimages()

CreationDate : 12/25/2009 7:56:57 PM
LastModified : 12/25/2009 7:56:57 PM
ActualSizeInSectors : 1048576
ActualSizeInMB : 512
ActualSizeInGB : 0
Description : VDC_w2k30-02_12/25/2009 5:54:46 PM
SnapshotId : 46e8f0df-b41f-42c5-82fe-ad808f22ef52
VmSnapshotId : a6e9fad2-e5f6-4343-be5f-5fb79d275654
SizeInGB : 10

From the above command note the SnapshotID

The following is to be executed on one of your RHEV hosts (physical servers).

3.c. Navigate to your vm’s directory on one of your RHEV hosts.

Now to find out where the datacenter is mounted run the mount command and note the output. Look for rhev in the output.

Code:
# mount

….
192.168.0.162:/srv/iso on /rhev/data-center/mnt/192.168.0.162:_srv_iso type nfs (rw,soft,timeo=10,retrans=6,addr=192.168.0.162)
/dev/mapper/8233a333–d7cb–4b1d–9639–143b9ad68f98-master on /rhev/data-center/mnt/blockSD/8233a333-d7cb-4b1d-9639-143b9ad68f98/master type ext2 (rw)
….

In our particular case it is the second entry that contains our datacenter. Your output will differ based on the technology used (NFS,FCP,iSCSI)..

3.d. Change to the vms directory.

Code:
# cd /rhev/data-center/mnt/blockSD/8233a333-d7cb-4b1d-9639-143b9ad68f98/master/vms

3.e. Enter your vm’s directory. This is the VmID noted in step 3.a.

# cd

In this directory you will find the configuration file for your vm (VmID.ovf) and symbolic link to your disks. List the contents of the symbolic link and look for the SnapshotID you noted earlier. This is your disk.

4. Copy your nagiosxi-kvm.img image over to this server (scp,etc.) and dd it over the disk we just identified.

Code:
# dd if=/path/to/nagiosxi-kvm.img of=/rhev/data-center/…./disk-id

That’s it. Now you should have functional NagiosXI vm ready to use from within RHEV.

If things are not clear please let me know and Ill try to clear them up :)

Good luck.

———
I used the following link to convert from vmdk to qcow2. [LINK]
The following link is the howto located in the nagiosxi support forums. [LINK]