Tuesday, May 10, 2016

Share the Terminal Output in Unix


if you want to share your terminal output and you do not have access to or do not want to use tools such as WebEx or Teamviewer  you can redirect your terminal output to another terminal.


whatever is written on the source terminal, after pressing enter it will appear in the destination terminal.

For the above to happen, get the number of terminal of the destination terminal, by typing: tty <enter>
The output should be something like: /dev/pts/7

Then on the source terminal type: script /dev/pts/7 <enter>

Now everything that is written on the source terminal will appear on the destination terminal, just note that only appear in the destination terminal after you press enter. Also the same Unix user needs to be used on both terminal.


Thursday, May 5, 2016

Move your Virtual Box machine and files location


If you need to move your vbox , vdi, and vmdk files from one location to another you may encounter that in your vbox file the location of your disks is hard coded.

After you move the files, if you try to run your VM you may get the errors:

Failed to open the hard disk <FilePath> or Cannot register the hard disk <FilePath> {GUID} because a hard disk <DifferentFilePath> with UUID {GUID} already exists.

To solve that do the following:

a) Execute vboxmanage command specifying the full path name of each one of your disks, for example:

"C:\Program Files\Oracle\VirtualBox\vboxmanage.exe" internalcommands sethduuid E:\VM\SE-disk1.vmdk

b) Edit the vbox file and update the lines where your hard disk is specified using the output of the previous command, for example:


 <HardDisks>
        <HardDisk uuid="{d2c62e46-e10e-4784-9b8e-61ca357f28b5}" location="SE-disk1.vmdk" format="VMDK" type="Normal"/>
        <HardDisk uuid="{0f563dcb-5f2c-491f-9a02-1015514778ae}" location="SE-disk2.vmdk" format="VMDK" type="Normal"/>
</HardDisks>

<AttachedDevice type="HardDisk" port="0" device="0">
          <Image uuid="{d2c62e46-e10e-4784-9b8e-61ca357f28b5}"/>
</AttachedDevice>
<AttachedDevice type="HardDisk" port="0" device="1">
          <Image uuid="{0f563dcb-5f2c-491f-9a02-1015514778ae}"/>
</AttachedDevice>


c) Remove your VM from the Manager and add it again.

That's it, you are done!!!.