Thursday, December 17, 2015

ofa to ovf for vmware import follies

let's dance, shall we?

it all started out with:
ResourceType instance ID 3 no support ofr hardware device type 20


How to convert VirtualBox OVA to Vsphere OVF
2. Microsoft Checksum Verify utility (Need to check SHA1)
3. Text editor.

First of all, export your virtual machine from Virtualbox. Give the location for the file and save as ova file
VirtualBox Ova Export
After, Install the VMware OVF Tool. I am using the version 3.0.1
Once, the file has been created and the tool is installed.
Open the command line and navigate to the OVF tool folder.
Type the command below : ovftool.exe –lax <source.ova>  <destination.ovf> 
ovftool.exe –lax “C:\Users\ygotame\Desktop\Asterix Now.ova” “C:\Users\ygotame\Desktop\Asterix Now.ovf”
OVF Tool Export
Once the command is complete, you will see three files :
1. Asterix  SHA1 Info File
2. Asterix Now.ovf   Configuration file
3. Asterix Now-disk.vmdk   Virtual Hard drive
Now open, Vsphere client and click to deploy ovf file.
vSphere OVF Deploy
Give the OVF file location and try to upload to the server.
You might this error : Unsupported hardware family virtualbox-2.2
Error: OVF Package is not supported by target:
 Line 25: Unsupported hardware family 'virtualbox-2.2'.
vSphere OVF Deploy Family 2.2 ErrorNote : The image is in French
If it is the case for you, open the ovf file with your favorite text editor.
And, change the line :
with this
To avoid the error message : Line 66: OVF hardware element ‘ResourceType’ with instance ID ‘5’: No support for the virtual hardware device type ’20’
In the same file, modify the item Instance 5:
<rasd:Description>SATA Controller</rasd:Description>
With this
<rasd:Description>SCSI Controller</rasd:Description>
Save the change and try again to deploy
At this time, you will get the error saying the file fail the control of integrity and could be corrupted. As the vpshere sever check the <file>.mf to verify the integrity. We will modify that to make sure the correct information is enter.
Integrity Error Vsphere
For that, download the Microsoft toll that I mention above and extract the file where you prepare. I will dump it at C:\Temp
Now, we need to find out new SHA1 key for <file>.ovf because we made some change.  Therefore, open command line and navigate to the place where you had extracted the Microsoft tool.
Execute the command : fciv.exe -sha1 <filename.ovf>
fciv.exe C:\Users\ygotame\Desktop\ItSecure\OVF file new SHA1.png
OVF file new SHA1
Now, copy the new SHA1 key 51bd98… and open <filename>.mf
Paste the new value in the file and save it.
Modify SHA1 Key

Once that has been done,  try one more time to deploy the vm machine. This time, it should be working without any issue.
Deploy Finish Step

Tuesday, December 15, 2015

vnc for mac control-alt-delete

of course...

Laptop keyboard: fn+control+command+delete
Full-size keyboard: control+option+delete

Thursday, December 10, 2015

reset admin pass on win2k8 r2 when erd 6.5 doesn't work

How to Reset Your Forgotten Domain Admin Password on Server 2008 R2

Forgetting your password is always a pain, but luckily there’s an easy way to reset your Domain Administrator password. All you need is a copy of the Windows Server 2008 R2 installation disk and one simple command line trick.

Replacing Utilman.exe

Boot off the Windows disk and select the “Repair your computer” option from the lower left-hand corner.
Follow through until you get to the option to open the Command Prompt, which you’ll want to select.
First you’ll want to type in the following command to backup the utilman.exe file:
MOVE C:\Windows\System32\Utilman.exe C:\Windows\System32\Utilman.exe.bak
Now you will need to copy cmd.exe and rename it Utilman.exe:
COPY C:\Windows\System32\cmd.exe C:\Windows\System32\Utilman.exe
Now you can go ahead and reboot your machine. When its done booting up again and you are at the Logon screen click on the Ease of access icon.
I bet you weren’t expecting that open a command prompt  Smile To change the password type:
net user administrator *
Once you press enter you will asked to set a new password and then confirm it, when entering your new password don’t worry if you can’t see them as you type, they are invisible, they are however being remembered.
Once you’re logged in again don’t forget to delete Utilman.exe and then rename Utilman.exe.bak back to plain old Utilman.exe.
from here:

Thursday, December 3, 2015

no ldapsearch for me

 oh come on. no ldapsearch? for serious now?  
 on a nice box:  
 # rpm -q --whatprovides /usr/bin/ldapsearch  
 oh okay.  
 # yum install openldap-clients  
 let's try something simple...  
 authenticated bind:  
 ldapsearch -h -p 389 -x -D "cn=admin,dc=no,dc=where,dc=org" -b "dc=no,dc=where,dc=org" -w comp\!\!plex  
 stupid admin and his bangs in passwords <- oh wait. that's me. heh.  
 unauthenticated bind  
 ldapsearch -h -p 389 -x -b "dc=no,dc=where,dc=org"  

 oh hey, what's up with no lsof on these systems... you know who you are.

Wednesday, December 2, 2015

sles 11 enterprise to a vm hillarity

 damn you old suse 10 enterprise system that i just virtualized.  
 1. first i get scsi ioc errors.  
 2. i fix that and get gdm can't start.  
 3. oh, and then i try to log the eff in and i get module not found or some crap.  
 4. and then i try to use yast and you barf.  
 5. and then i try to fix your ethernet card to the vmware one and no dice.  
 i want to call it a day, but i can't. you will not win. oh. you have reiserfs*.
 r e i s e r f s.  for serious?  
 1. After conversion, change the VMWare SCSI controller from LSI Logic Parallel to LSI Logic SAS.  
 2. Easy. Use your favorite LiveCD, boot up and edit /etc/inittab . 
    Change from 5 to 3. Servers should not have GUIs.  
 3. Someone installed an Oracle DB. I check /var/log/messages and see:  
    login: PAM [error: /lib/security/ wrong ELF class: ELFCLASS32]  
 This is a x64 bit system. I head to /etc/pam.d/login and see this line:  
 session required    /lib/security/  
 No no. The PAM stack is controlled via /lib64/security . Remove that preceeding PATH.  
 4. The VM is on a SAN. Apparently YAST likes to do things too quickly.  
 # find /sys/class/scsi_generic/*/device/timeout -exec grep -H . '{}' \;  
 # echo 180 > /sys/block/sd{a|b}/device/timeout  
 That's temporary.  
 Make it permanent:  
 # touch /etc/udev/rules.d/99-vmware-scsi-udev.rules  
 put this in the file:  
 ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{vendor}=="VMware, " , ATTRS{model}=="VMware Virtual S", RUN+="/bin/sh -c 'echo 180 >/sys$DEVPATH/device/timeout'"  
 5. VMWare isn't very smart when dealing with those NICs, huh?  
 VMWare commented out stuff hoping YAST would do stuff. Yast didn't. Put this in:  
 SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:50:56:98:66:5a", IMPORT="/lib/udev/rename_netiface %k eth0"  
 The {address} can be found on your VMWare VM properties.  
 # cd /etc/sysconfig/network/  
 # cp ifcfg-eth-id-whateveritisnow ifcfg-eth-id-00\:50\:56\:98\:66\:5a  
 edit ifcfg-eth-id-00\:50\:56\:98\:66\:5a  
 NAME='VMWare 82545EM Gigabit Ethernet Controller (Copper)'  
 *reiserfs murders your wife.