Wednesday, May 30, 2012

ERROR: database disk image is malformed in Fedora 17

Got a spanking brand new Fedora 17 install, it looks a lot different from Fedora 16 on the surface which is a welcome change, quite refreshing actually. Tried to do a software update but instead got the following error message:
ERROR: database disk image is malformed
 Seems like my rpm database got corrupted for some reason but this is a new install on VirtualBox. Anyway, got it fixed by doing the following:

$ sudo yum clean dbcache 

~ts

Saturday, May 26, 2012

Force ntp sync on OpenSUSE


I am running openSUSE under VirtualBox to play around with the distribution. I am not really using it on a regular basis so it can be in the "Saved state" for several days.

I am also using the guest additions that comes with it and for some reason it is not syncing with the host automatically. Got no time to investigate today but I would like to sync the time so that I can check for updates.

As always in Linux land, there are thousand ways to do this and below is one quick way of doing it.
sudo /etc/init.d/ntp restart

Of course you have to do this at the command line.

Reference(s):
http://www.krazyworks.com/force-ntp-time-update-on-linux/

Have fun!!!

Technos


Saturday, May 12, 2012

How to get computer model of a computer

This is just one of the many ways to get computer model, this will be through WMI. Type the following to get the computer model:
wmic csproduct get name

Enjoy!

 Reference(s):
http://myserverissick.com/2008/04/find-a-computers-model-using-the-command-line-or-in-a-batch-file/

Saturday, May 05, 2012

How to remotely manage Hyper-V on Windows 7

If you are running non-Windows OS or Windows OS without integration services installed in Hyper-V, then remotely managing those guest machines can be painful and in some cases not usable. Think non-Windows machine that you need to configure via GUI. GUI configuration of non-Windows machine over remote client connection (RDP) does not work - guest machine can't grab the mouse. To get around this limitation, you can install  Remote Server Administration Tools for Windows 7 and some other minor tweaks.

Following are the steps:
  1. Of course you need to have a client OS, I will be using Windows 7 in this scenario but I hear that Windows Vista is also supported but not Windows XP and older versions. 
  2. Download and install Remote Server Administration Tools for Windows 7. This download link only works for Windows 7 with Sp1 (Enterprise, Ultimate, Prof). This is no small download, around 230MB for x86 as of this writing. And yes, the install also takes quite a while.
  3. Open Control Panel then select Programs.
  4.  Under Programs and Features click on Turn Windows features on or off.
  5. In Windows Features select Remote Server Administration Tools | Role Administration Tools Feature | Hyper-V Tools then hit on OK.
  6. At this point you should have Hyper-V Manager installed but connecting to a Hyper-V Server will probably fail at this time. I believe this has to do with security and more... good thing is that someone from Microsoft created a cscript that makes this configuration a little easier. The tool is called Hyper-V Remote Management Configuration Utility. From what I can see, it is not officially supported by MSFT but hey it works. Anyway, download the tool from here.
  7. Open an elevated command prompt and navigate to where hvremote.swf was downloaded.
  8. Run the following to enable remote administration on the client OS.
  9. cscript hvremote.wsf /mmc:enable
    
  10. Since my system is workgroup environment, need to run the following. I believe this is to allow remote DCOM access to Anonymous logon.
  11. cscript hvremote.wsf /anondcom:grant
    
  12. Assuming that same user account exists between Hyper-V Server and this client OS and that the server was already configured, then you should now be able to remotely manage that Hyper-V Server.

~ts

Friday, May 04, 2012

Setting up Eclipse 4.1 as IronPython IDE

There are various IDEs available out there that can be used for IronPython. One of them is Eclipse + PyDev + Subclipse for version control. The nice thing with this setup is that it provides intellesense and it does understand Python language well.

Setting it up is fairly easy. First download Java Runtime, I have used v6 update 32 for this exercise. Second, download Eclipse 4.1 (4.1.2 as of this writing). The way I see it, version 4.x is not yet for the mainstream use but it does work fairly well. Third, install latest PyDev and finally install Subclipse for SVN integration.

~ts

Tuesday, May 01, 2012

Installing Fedora 16 on VirtualBox

Installing Fedora 16 on Virtualbox is a no sweat activity. But for those uninitiated it probably helps to provide a little guidance. See below for one of the many possible configurations:
General
Name: f16
OS Type: Fedora

System
Base Memory: 1024 MB
Processor(s): 1
Execution Cap: 100%
Boot Order: CD/DVD-ROM, Hard Disk
VT-x/AMD-V: Enabled
Nested Paging: Enabled
 
Display 
Video Memory: 128 MB
3D Acceleration: Enabled
2D Video Acceleration: Disabled
Remote Desktop Server: Disabled
 
Storage
IDE Controller
  IDE Secondary Master (CD/DVD): Empty
SATA Controller 
  SATA Port 0: f16.vdi (Normal, 80.00 GB)
 
Audio
Host Driver: Windows DirectSound
Controller: ICH AC97
 
Network
Adapter 1: Intel PRO/1000 MT Desktop (NAT)
 
Serial Ports
Disabled

USB
Device Filters: 0 (0 active)
This is typical configuration with NAT networking. So guest can connect to the outside world but the outside world cannot connect to the guest directly.

For this exercise, I use live CD as the media for installation. This should be available directly from Fedora or from a mirror site near you, this sample link is from University of Texas.

With LiveCD available and VirtualBox guest configured, it is now time to power-up the guest and start breezing through the installation. Since the base install is easy, I will just show the highlights during install.

Figure 1. Boot screen

Figure 2. First sign that Fedora 16 does not like VirtualBox or VirtualBox does not like Fedora 16 ;) . Basically this tells us that GNOME 3 detected that the machine is not good enough to run GNOME 3 goodies. The bar now is higher to use GNOME 3, need more powerful machine to enjoy it. But it does fallback pretty good.

Figure 3. Fedora 16 live in fallback mode. Got selected Install Hard Drive here to start installing the software.

Figure 4. Select keyboard

Figure 5. Storage device, using iSCSI? Don't know what it means? Pick the first one.

Figure 6. You are warned, this will destroy any existing data ;)

Figure 7. Hostname, provide name as you like.

Figure 8. Pick your time zone. This is used by the system to figure out your local time.

Figure 9. Set root account password

Figure 10. You familiar with partitioning hard disk and specific layout? Nope? Use default

Figure 11. You are being warned again, this will destroy existing layout and of course data.

Figure 12. Installation complete, that was easy.

Figure 13. Welcome to Fedora!!!

Figure 14. Licensing... you using this at home? Yes, just accept it.

Figure 15. Date and time, do you want to keep your time sync with the rest of the world? Enable Synchronize date and time over the network.

Figure 16. Create user that you will be using on this machine on regular basis

Figure 17. Hardware profile, wanna help a little bit Fedora? Then send profile to them

Figure 18. Login screen

Figure 19. GNOME 3 fallback desktop

Now you should have a working Fedora 16 installation in VirtualBox. If you are adventurous and wanna see how full GNOME 3 looks like, then follow along.

Ensure that everything is updated/current:
$: sudo yum check-update
$: sudo yum update
Install supporting libraries and gcc to compile VirtualBox modules:
$: sudo yum -y install gcc kernel-devel
From VirtualBox client window for this guest machine, do Devices | Install Guest Additions... Once ISO is detected, from the terminal do:
$: cd /media/VBOXADDITIONS_4.1.8_75467
Of course, replace the folder above with the version of your VirtualBox. Once inside that folder do:
$: sudo ./VBoxLinuxAdditions.run
Wait for the installation to complete and reboot. Ok, the pain is not over yet. For some reason SELinux and VirtualBox guest additions does not like each other, so we need to let VirtualBox guest additions be exempted from the prying eyes of SELinux. So, do:
$: sudo grep gnome-session-c /var/log/audit/audit.log | audit2allow -M mypol
$: sudo semodule -i mypol.pp
Reboot and congratulations... you now have a GNOME 3 desktop running in VirtualBox. But this is a very short lived celebration as VirtualBox and GNOME 3 are not best of friends :). I find it that it is not stable and gets into your way getting things done. Like not refreshing properly, lock-ups, buttons not responding as you would have expected. To cut the story short, I have to force GNOME 3 to run in fallback mode. Now it is not too bad.

Fedora 16 is free, and I am not directly contributing to the distribution, so the best I can do is praise for the hard work and may the team have the desire to continue to improve the distribution and hopefully in the future get with VirtualBox team and iron out the problems with the integration between these two great projects.

~ts

Configuring TUN/TAP virtual network interface for use with QEMU on Xubuntu 24.04

Configuring TUN/TAP virtual network interface for use with QEMU on Xubuntu 24.04 I am planning to run qemu-system-ppc to play around QEMU ...