VMware – Linux: OS cannot mount /dev/sd* after a virtual machine is converted – Waiting for device /dev/sd* to appear… not found – fall back

This happened when I created a SLES 11 VM with VMware Workstation and then moved to to ESX for production. Problem was that VMware Workstation used LSILogic SCSI drives to emulate my disks, but for some reason it wasn’t made clear to ESX by VMware Converter during conversion.

To fix this browse to your datastore and download your guest’s configuration file <vmname>.vmx to your desktop (or use your root access and open it in vi through ssh). Open it with a text editor and add the following line above your SCSI devices:
scsi0.virtualDev = "lsilogic"

So the whole SCSI device section should look like this:
scsi0.present = "true"
scsi0.sharedBus = "none"
scsi0.virtualDev = "lsilogic"
scsi0:0.present = "true"
scsi0:0.fileName = "disk1.vmdk"
scsi0:0.deviceType = "scsi-hardDisk"
scsi0:1.present = "true"
scsi0:1.fileName = "disk2.vmdk"
scsi0:1.deviceType = "scsi-hardDisk"

Copy the config back to your datastore and start guest OS. You will be asked to confirm changes during post – answer yes to changes.

Disclaimer: Make sure you have a backup before making any change.

OpenSuSE: Disable firewall completely

I was wondering… why I can’t connect through ssh. sshd daemon is running fine, so I found out that OpenSuSE installs its stikin’ firewall by default and blocks everything. I’m pretty well protected behind enough high end security devices, and don’t need to micro-manage my connection. Here is how I disabled the firewall altogether:
/sbin/SuSEfirewall2 off

To start the firewall:
/sbin/SuSEfirewall2 on

If you want to temporarily disable your firewall:
/etc/init.d/SuSEfirewall2_setup stop

Enter the above line without “stop” and you will see all available switches.

OpenSuSE: ping: unknown host, and connect: network is unreachable

WAIT: Read the whole post before applying any changes. You will know why once you’re done!
Note: Seems like it’s kind of common for SuSE, but you can easily modify the few specific lines to work with your distro. Most commands are common Linux stuff.

This is not my first day with SuSE, really, but since I’ve been considering an enterprise distro for a few servers at work, and the fact that I rather have my jewels stabbed with a sharp icepick instead of touching REHL I started playing around with OpenSuSE 11.1. This is what I’ve been running into pretty much all day today AFTER I changed DHCP to static. Here is what I did: First edited my resolv.conf to add my DNS servers:
nano /etc/resolv.conf

added the following lines:
nameserver <internal DNS server IP>
domain <FQDN>
search <FQDN>

Fixed, right? Not quite. Now it can resolve internal servers’ hostnames, but when I trie to ping an external site I started getting “connect: network is unreachable error”. I looked at my ifconfig and noticed IPv6 crap showing up. I went ahead and disabled IPv6. You can either add the following lines to your /etc/modprobe.conf and reload modules, or just do them in shell directly:
echo "alias net-pf-10 off" >> /etc/modprobe.conf
echo "alias ipv6 off" >> /etc/modprobe.conf

Here I am, standing in front of a bowl of mashed potatoes with no pants on… this SuSE experiment has been a pain in the neck so far. A quick spark made me try:
ip route show all

and it returned: dev eth0 proto kernel scope link src dev eth0 scope link dev lo scope link

Oh, snap! Seems like there is no default gateway setup on the system, while I have the line in my /etc/sysconfig/network/ifcfg-eth0. I went ahead with the following command:
route add default gw

and booya! This is what “ip route show all” returns at the moment: dev eth0 proto kernel scope link src dev eth0 scope link dev lo scope link
default via dev eth0

I’m happy… feelin’ glad :P, but my enjoyment is short lived. It lost the gateway after a reboot and same headache was about to start, but now I know how to fix that one! Tried:
nano /etc/sysconfig/network/routes

and added the line:

Rebooted and it seems like I’m golden this time. Note that can go ahead and create the file if it does not already exist.

Note: It wasn’t IPv6’s fault after all, but since I don’t need it I left it disabled. Now I’m leaving everything here, just in case. You just pick what you need, or perform from the bottom up (that’s what she said!)