Replace the four network values with your own, you can get all the information from the two commands above, this assumes you will know the static ip address range of your own router for the IPADDR.(NETWORK will be under 'Destination', GATEWAY will be under 'Gateway' and NETMASK will be under 'Genmask' using either route -n or netstat -nr commands)# service network restartTo relaunch the new configuration$ ifconfig -a eth0 Link encap:Ethernet HWaddr 00:02:44:4B:52:D8 inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::202:44ff:fe4b:52d8/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6071 errors:0 dropped:0 overruns:0 frame:0 TX packets:6899 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3804377 (3.6 MiB) TX bytes:1416715 (1.3 MiB) Interrupt:18 Base address:0x8000 Some setups may require a reboot

Setting up a Network Bridge on Centos 6/RHEL with a Static IP is relatively straightforwardThe bridge enables virtual machines to be accessed from other hosts as if they are physical systems in the network.$ sudo yum -y install bridge-utilsRename your existing file and get some information from it(This assumes you have an existing connection 'eth0')

The above commands fetch needed information Create a bridge file # vi ifcfg-br0 add the followingDEVICE="br0"BOOTPROTO="static"IPADDR=192.168.0.100NETMASK=255.255.255.0NETWORK=192.168.0.0GATEWAY=192.168.0.1IPV6INIT="yes"IPV6_AUTOCONF="yes"NM_CONTROLLED="no"ONBOOT="yes"PEERDNS="yes"TYPE="Bridge"Replace the 4 network values with your own, you can get all the information from the 2 commands above, this assumes you will know the static ip address range of your own router for the IPADDR.(NETWORK will be under 'Destination', GATEWAY will be under 'Gateway' and NETMASK will be under 'Genmask' using either route -n or netstat -nr commands)# service network restartTo relaunch the new configuration$brctl show

Wednesday, 29 August 2012

A handy little script for gathering system information isgetinfo, it's available from elrepo

$ sudo rpm --import http://elrepo.org/RPM-GPG-KEY-elrepo.org

$ sudo rpm -Uvh http://elrepo.org/elrepo-release-6-5.el6.elrepo.noarch.rpm$ sudo vi /etc/yum.repos.d/elrepo.repo Disable it by default$ sudo yum -y install getinfoRunning it will save information to a temp file or post it to pastebin.centos.org. All options can be run as a normal user but fdisk information can only be provided if run as root. Check first the contents of the output file to ensure it does not contain any sensitive information such as public IP addresses or hostnames.

Thursday, 23 August 2012

With the release of VirtualBox-4.1 it is fairly easy to export an image in the VMDK format to import into VMware-Workstation should the need arise, either through bad planning or simply through a desire to do so.This tutorial walks through the installation of Windows Vista as an example on VirtualBox, then the cloning and exporting of it into VMware-Workstation in a fully working condition. If you have not yet installed VirtualBox go here for a quick tutorial. It also assumes that you have VMware-Workstation installed somewhere though not necessarily on the same machine. The host operating system is Centos 6 Linux.The main thing to remember when first installing the guest OS on VirtualBox is to ensure that the hard disk type chosen is the VMDK format, in case the need arises to move it.The following shows the installation of Windows Vista onto VirtualBox and then the cloning of it into VMware-Workstation.Installing on VirtualBox - Create Virtual Disk

Open VirtualBox and create new virtual disk

Assign a suitable ram amount

Create a new disk

Select the VMDK box

Select fixed disk

Select a disk size

Hit 'Create' and wait

After a few minutes your disk will be created and ready to install the operating system. We do this as in the images below.

Be aware that during the installation it is probably best to select full screen mode and you may have to toggle between VM and your computer occasionally with Right Ctrl.

Installing on VirtualBox - Vista Installation

Now open up VirtualBox and click on the newly created machine in the left column to start the first run wizard.

Select the CD/DVD Drive

Double click on the VM (left column) to start the procedure

Go through the install procedure

Until finished and installed

Below is the OS as installed after completing the steps described above.

Windows Vista installed on Virtualbox

Cloning from VirtualBox

Now we are going to clone the Windows Vista VM into a state ready to import into VMware-Workstation.

With your VM shut down but selected in the left panel, go to 'Machine' > 'Clone' remembering to check the

'reinitialise the mac address' box.

Click 'Next' and at the next screen select 'Full Clone', then hit 'clone' and wait.

It takes quite a while to complete, when it does you will have a new clone folder in your VirtualBox VMsdirectory.

Now copy over thenew clone to theVMware directory which should be in your home directory.

Once it has copied over we are ready to start the import.

Importing into VMware-Workstation

Open up VMware and start the New Virtual Machine wizard.

Select advanced options

Leave at defaults

Select install OS later

Select OS type

Browse to the folder you copied earlier

Select a suitable ram amount

Select network connection

Select hard drive controller

Important: Select use existing disc

Browse to the cloned disk and select it

Select convert to newer format

Click finish and your cloned disk is imported ready to start.

So now your new import will be showing as 'Windows Vista' unless you specified otherwise, hit 'Power on this Virtual Machine'

and let it load up. You will get something resembling the image below.

Windows Vista cloned from VirtualBox into VMware-Workstation

You can now install VMware tools and finish any drivers etc. The above procedure can be performed on any OS you have installed, not only Windows Vista.

With the 4.1 release of VirtualBox it is fairly easy to export an image in the VMDK format to import into VMware-Workstation should the need arise, either through bad planning or simply through a desire to do so.
This tutorial walks through the installation of Debian Linux on VirtualBox, then the cloning and exporting of it into VMware-Workstation in a fully working condition. If you have not yet installed VirtualBox go to the quick tutorial. It also assumes that you have VMware-Workstation installed somewhere though not necessarily on the same machine. The host operating system is Centos 6 Linux.
I used a Debian disk but you should be able to use any distro.The main thing to remember when first installing the guest OS on VirtualBox is ensure that the hard disk type chosen is the VMDK format, in case the need arises to move it.
The following shows the installation of a Debian Linux distro onto VirtualBox and then the cloning of it into VMware-Workstation.Installing on VirtualBox

Open VirtualBox and create new virtual disk

Assign a suitable ram amount

Create a new disk

Select the VMDK format

Select fixed disk

Assign a disk size

Hit 'Create' and wait

After a few minutes your disk will be created and ready to install the operating system. I am not going to go into that here as I assume that if you are a Linux user you will know how to install an operating system whether it is on a VM or a physical drive. Just be aware that during the installation process it is probably best to select full screen mode and you may have to toggle between VM and your computer occasionally with Right Ctrl.

Belowis the OS as I installed it after completing the steps described above.

Debian installed on Virtualbox

Cloning from VirtualBox

Now we are going to clone the Debian VM into a state ready to import into VMware-Workstation.

With your VM shut down but selected in the left panel, go to 'Machine' > 'Clone' remembering to check the

'reinitialise the mac address' box

Click 'Next' and at the next screen select 'Full Clone', then hit 'clone' and wait. It takes quite a while to complete, when it does you will have aclone folder in your VirtualBox VMs directory.

Now copytheclone folder to the VMware directory which should be in your home directory. Do this manually via your file manager as it can get messy in the terminal due to folder name spaces.

Once it has copied over we are ready to start the import.

Importing into VMware-Workstation

Open up VMware and start the New Virtual Machine wizard.

Select advanced options

Leave at defaults

Select install OS later

Select OS type and browse to the folder you copied earlier

Select a suitable ram amount

Select network connection

Select hard drive controller

Select use existing disc

Browse to the cloned disk and select it

Select convert to newer format

Click finish and your cloned disk is imported ready to start.

So now your new import will be showing as 'Other Linux' unless you specified a distribution, hit 'Power on this Virtual Machine'

and let it load up. You will get something resembling the image below.

Debian cloned from VirtualBox into VMware-Workstation

You can now install VMware tools and finish any drivers etc. The above procedure can be performed on any OS you have installed, not just Linux guests.