You can’t. Once you have fail, the power of fail has you. There is no escape, but there is hope.
If you’ve fought the fail of corrupt ESX snapshots and missing -flat.vmdk files (once the -flat.vmdk file is gone, so is your data), you’ve experienced the joy of hoping you have a backup somewhere… anywhere.
Max has a nice collection of resources to monitor snapshot removal, check progress, recover from corruption, kill a hung VM and generally give you a better tomorrow.
While there is no easy way out, you may still survive.
Did you find this post useful or have questions or comments? Please let me know!
Tags: ESX
I get this a lot from friends and Google is full of examples, but here it is again.
If you have a file that begins with a hyphen (one of these: -) you’ll have a tough time removing it unless you remember something simple from Command Line 101. In most CLI environments, your shell has two ways to access a file: relative path and absolute path.
See, all I had to do was type that and 90% of you just went “Durr!” and removed your file.
For the rest of you, just refer to the file by it’s full path. Example:
/tmp$ ls -la|grep ^\-
-rw-r--r-- 1 bob bob 0 2009-10-28 12:50 -somefile
Oh look, I have a file in /tmp called -somefile. What ever shall I do to remove it?
/tmp$ rm -somefile
rm: invalid option -- s
Try `rm ./-somefile' to remove the file `-somefile'.
Try `rm --help' for more information.
Oh my! That didn’t work at all! The rm command thinks I’m passing it a flag called -somefile. Conveniently, rm knows I’m not very bright and tells me how to remove it!
/tmp$ rm ./-somefile
/tmp$
Well blow me down! Alternately, you can refer to the file with the full path:
/tmp$ rm /tmp/-somefile
/tmp$
The key is to remember that the shell knows where you are, but doesn’t know what you want. If you imply that you want to delete something, the shell does it’s best guess. In this case, it guesses wrong because rm command flags take precedence over arguments. If you are explicit in what you want, the shell does not have to guess.
Of course, being fully explicit means issuing the full command for rm:
/bin/rm /tmp/-somefile
But you have to know where rm lives. You can guess, or you can find it with which:
$ which rm
/bin/rm
But how do you know where which is?
``/usr/bin/which which` rm` /tmp/-somefile
Ok, that’s dumb. Go remove your file.
Did you find this post useful or have questions or comments? Please let me know!
Tags: How Tos · Unix · linux
If you install a NIC in a Solaris SPARC box, at least on Solaris 9, and you don’t know the device name, the following will help:
prtconf -pv | more
look for
device_type: 'network'
Near the network device you’ll see model and name, similar to this:
model: 'SUNW,pci-qfe'
name: 'SUNW,qfe'
In this case your device is a qfe card. You can get it up and running with
ifconfig qfe0 plumb
Did you find this post useful or have questions or comments? Please let me know!
Tags: How Tos · solaris