Archive for the ‘Linux’ Category
“The first 99% of the project flies by. But the 2nd 99%! Sheesh…” – anonymous
If you ever removed a snapshot in VMware ESX / ESXi, you’re presented with the ubiquitous progress meter. It chunks right along, increasing by 5% every so often. Encouraging.
And then it gets to the dreaded 95%. You’d think you’re almost home.
But you’re probably nowhere close. Stuck.
This is really kind of dangerous. I’ve been tempted to assume that something is hung up. And that leads to thinking a hard reset of the host is required.
How CAN you see the progress? What follows is not an elegant solution, but you’ll at least be able to see what’s going on.
First, you’ll need to go to the ESXi command line (see other posts on the internet for accessing ESXi via SSH.) In this case, I used PuTTY ( http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html ) to get to the host IP and command line.
Go to the storage directory of the host, usually /vmfs/volumes, then the LUN directory and finally the VM directory.
Use the following linux command to list the files in time order, latest files last:
This will show you what files have been most recently processed. Repeat this command over time (remember up-arrow to repeat bash commands) and you should notice a progression, disk files progress from lowest to highest, and within a disk, the delta files progress highest to lowes.
For example, if you have a VM called Server with 3 disks, they would be called
And you’d see that they’d progress (latest file change time) in that order. The delta files, created by snapshots, have 6 digit sequence numbers in their names that would progress in reverse order.
Not very exciting, true. But at least you can see some progress. I recently removed a snapshot that took 2:40 hrs. It was up to 99% in about :15 of that.
Using an online book, I’ve gotten off to a good start.
Inputing http://127.0.0.1 in my browser nets:
And clicking on this gets:
And looking for the root directory I find:
xxxx@ubuntu65:~$ sudo find / -name “apache2-default”
Turns out, though, that the default place for html is in the “www” subdirectory. I placed a test script in an got a good result from http://127.0.0.1/test.php:
Yes, I also got the two “echo” lines, but it didn’t fit in screenshot. About this table above, Janet Valade says: “Anytime that you have a question about the settings for PHP, you can use the phpinfo() statement to display this table and check a setting.”
It’s pretty cool how everything is like clockwork. Guess this is ultra-stable technology. Knock on wood!
BTW, looking in /etc/php5/apache2/php.ini there is this:
This is the default settings file for new PHP installations. By default, PHP installs itself with a configuration suitable for development purposes, and *NOT* for production purposes. For several security-oriented considerations that should be taken before going online with your site, please consult php.ini-recommended and http://php.net/manual/en/security.php.
Oops. The book says to review the listing above and check the MySQL section and I don’t see any. It’s on, then, to the passage titled “Testing MySQL.”
Well, the mysql_up.php test program abended and the book was no help.
Fatal error: Call to undefined function mysqli_connect() in /var/www/mysql_up.php on line 13
Turns out calling mysqli can only be done if a module is installed. Looked thru the package manager and found php5-mysqli (and it also needed the php5-mysql which is for older databases. Now the question is, does PHP need restarting? It’s NOT a process. I noticed that now two more lines have been added to php.ini:
I’m rebooting to see. YES! That worked (though I wish I knew what could have just been restarted.) Now I’m getting a few other errors:
Warning: mysqli_connect() [function.mysqli-connect]: (28000/1045): Access denied for user ‘mysql’@’localhost’ (using password: NO) in /var/www/mysql_up.php on line 13Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in /var/www/mysql_up.php on line 15
Warning: mysqli_error() expects parameter 1 to be mysqli, boolean given in /var/www/mysql_up.php on line 18
Yes that last line WAS left hanging like that. I had changed the user name to “mysql” in mysql_up.php since that was mentioned in /etc/mysql/my.cnf I changed it back to “root” and it works! I got the lenthy table of gibberish I was suppose to.
Chapter 3 is mostly about database and application planning and design. It provides two sample scenarios. Chapter 4 has more detailed usage info and mentions how to access a mySQL database from the command line:
xxxxxxxx@ubuntu65:~$ mysql -u root -p
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8 to server version: 5.0.24a-Debian_9-logType ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql> show databases
Now we’re talking.
I’m setting up a web server on the Risky LAN and also setting up a VMWare machine to use with VMPlayer for the NetCom 5199 class. I’m using Ubuntu Edgy (6.10) and have installed:
- Apache 2.0
- MySQL 5.0 client and server
- PHP 5 (and php5-cli which is listed for those who are afraid of Perl and Python)
During the installation it says:
- Setting port 80 to listen. If not desired edit /etc/apache2/ports.conf
- Could not determin the servers fully qualified domain name, using 127.0.0.1 (Later it forced a restart and got the same message two more times.)
On the last few installs of Ubuntu, I’ve been receiving an intermittant message at boot time:
Internal Error – failed to initialize HAL!
Today I’m getting this from the VM install, but not the real PC install. Rebooting has sometimes worked. It didn’t this morning. I changed the autologon to off and turned off, then restarted the VM. That seemed to work!
Now to install the VMWare tools. It only provides a rpm and a tar.gz version. Support docs say to use the latter and just run it as root and accept the defaults. I did and must have pressed enter over 20 times. It needed to “make” a version and needed a C compiler. I assumed since it’s Ubuntu, I didn’t have the needed development tools installed, but I pressed enter so more, accepted the default screen resolution of 800 x 600 and it seemed to proceed without complaint.
It says I’ll need to run /usr/bin/vmware-toolbox.
Interesting observation on the VMWare support site follows. I don’t think this should be a problem since I’m running on a P4 and I’d bet the PCs at Cincinnati State use Intel:
During installation, many distributions of Linux choose a kernel that is optimized for the specific processor on which it is being installed, and some distributions install a generic kernel by default, but provide architecture-specific kernels that the user can choose to install. The kernel might contain instructions that are available only on that processor. These instructions can have adverse effects when run on a host with the wrong type of processor.
Thus, a Linux virtual machine created on a host with an AMD processor might not work if migrated to a host with an Intel processor. The reverse is also true: a Linux virtual machine created on a host with an Intel processor might not work if migrated to a host with an AMD processor.
This problem is not specific to virtual machines and also occurs on physical computers. For example, if you move a hard drive with a Linux installation from an AMD machine to an Intel machine, you are also likely to experience problems trying to boot from that drive.
Started the 5199 class yesterday and was thinking about running a small Linux distro on a USB.
Bought a $30 1Gig USB from Sams and tried it in the Vista machine as a ReadyBoost drive just to see if it was a speedy one. It is not. The Event Viewer showed that it didn’t pass due to low write speed of 1028kbs (1 Mbps?) I also tried my 1Gig Flash Voyager and it failed with Vista reporting that it only had a 110MB portion that was fast.
Looked at pendrive linux and attempted Ubuntu on a USB. It took about half hour to setup and when I attempted to boot, it looked like it would work, but I bailed after 5 minutes! Besides, it indicated that it was a Live CD version. Duh! I can do that just burning a CD or two. So I tried the DSL version which is described at:
I also downloaded a torrent of Xubuntu 6.10 Live and burnt it as a comparison.
Neither ended up booting properly. They both seemed to be booting for half a minute of so. They seemed very slow. I’m going to try a different route. The Live CDs are so easy and work well. They just lack the ability to save configuration changes.
Worked on MTLC LTSP issues. See that BLOG.
Setup WinSrv2003 in Parallels. For some reason, Win does not install a working NIC driver for the Realtek RTL8029. BUT, when you install the Parallels Tools, it puts in a functioning driver.
Ran two instances of VMPlayer today and one just “went away.” Hmm?
Was able to VPN connect server to server on same network (big whoop!) as per the Eckert/Schitka book. Still need to add documenation to last tuesday’s blog. That is still confounding. Will ask prof about it on Tuesday.
Yesterday, Camilo arrived with a student, Grant, to setup a practice Terminal Server using Edubuntu 6.10 and a bunch of old computers as thin-clients. It was a resounding success and clearly this kind of system will and can be employed in the MayaTech’s Guatemala classrooms.
As with any lab experiment, there were some unresolved issues and some follow up tasks that need to be addressed. They are listed here:
[Oops. Not added.]
On the 5th Camilo wrote saying that he wanted to explore using thin client computing to alleviate the lack of PCs in Guatemala. See our thread of conversations on email that ensued where we investigated installing Edubuntu 6.10. After a few days of playing around, I got it running without being able to log in, but Camilo was able to login and email me last night (the 12th) This could be pretty cool. We’ll see. We’re going to try setting up a lab on the 22nd. Maybe I’ll setup a 2nd drive. Maybe time to get another IDE drive to just have for booting into Edubuntu purposes. Maybe get that layer 3 100/1000Mbps switch working? Hit Ebay?