Solved: How to resize Docker Quickstart Terminal Window

By default in Windows 7 Docker Quickstart Terminal Window size will be small. But it can be very annoying to work in such small window.

Here we will show you how to increase the window size as per your requirement.

  • Open the Docker Quickstart Terminal as an Administrator.
  • Right Click on the Blue whale icon on top of  Docker Quickstart Terminal .

  • Click “Properties” and Select “Layout” tab.
  • Increase the “Width” and “Height” of “Window Size” as per your requirement.
  • Finally Click OK and try re-opening the Terminal.

That’s all folks!

Solved: How to restart a docker container automatically on crash

In this post we will see how we can restart a container automatically if it crashes.

If you want a Docker container to always restart use:-

docker run -dit --name cldvds-always-restart --restart=always busybox

But if you want container to always restart unless it is explicitly stopped  or restarted, use:-

docker run -dit --name cldvds-except-stop --restart unless-stopped busybox

In case you want the container to stop after 3 restart attempt use below command.

docker run -dit --name cldvds-restart-3 --restart=on-failure:3 busybox

You can see the logs of a container using

docker logs cldvds-restart-3

If you want to change the restart policy of running container you can do it with “docker update” e.g. here we are changing restart attempt from 3 to 4 of container cldvds-restart-3.

docker update --restart=on-failure:4 cldvds-restart-3

Solved: How to use nmtui and nmcli tool to configure network in Redhat Linux

In this post we will see how to use nmtui for network management. This can be a very useful tool for starters in Redhat Linux 7.

  • Login to your server using putty and execute command “nmtui” to invoke the interface. If your machine is not in network you can login via console and follow the same steps mentioned below.
  • If you don’t have the nmtui tool installed, you can install it using yum (Note: If you don’t want to install a new package in your server you can use nmcli for network configuration. Refer the post for how to configure network with nmcli )
[root@cloudvedas ~]# yum install NetworkManager-tui
[root@cloudvedas ~]# nmtui
  • Once you get the interface you can navigate using Arrow keys , Tab key and make selection using “enter” key. So, using arrow key select “Edit a connection” and press enter.

  • We have two network interfaces enp0s8 and enp0s3 . Today we will be configuring enp0s3. As enps0s8 is already configured and in use. So once highlighted enp0s3 go to “Add” and press enter.

  • Select the type of connection. For this tutorial we are selecting “Ethernet”.

  • Once in “Edit connection” section enter “Profile name” , “Device”.  If you want static IP select “Manual” for IPv4 and select “Show”.

  • Once you select  “Show” enter your IP detail with subnet id. Here subnet id is /24 or 255.255.255.0 . Also enter gateway. If you want to use DNS enter DNS server details else leave it blank and select OK.

  • Once the IP configuration is done select “OK” again. Now you can see the new connection that you have created. Select “Quit” to come out.

  • Now let’s activate the connection. Execute “nmtui” in putty or console again and select “Activate a connection”  and press Enter.

  • Navigate with arrow key select the interface and then move right and Press enter on “Activate”. This will activate your interface as in image below.


  • Check if the new IP is configured.

  • Also let’s check in “nmcli” about the new connection.

If you want to change hostname refer this post on how to change hostname with nmtui or nmcli .

Hope this post is helpful. Do let me know if you have any query.

Solved: How to convert .usb file to .vmdk to .vdi to .vhd and vice versa

In this post we will see how we can convert a .usb file to .vmdk or .vdi  or .vhd

We will be doing this conversion using a free tool Oracle Virtualbox.

Pre-requisites:-

Download latest Virtualbox version

Once you have downloaded and installed the latest version of Virtualbox. Go to the directory in which virtual box is installed. There you will find a program “VBoxManage.exe”.  We will be using “VBoxManage.exe” for the conversion.

Convert .usb to .vmdk 

First let’s see how to convert .usb file to .vmdk . Syntax is simple:

VBoxManage.exe convertfromraw filename.usb filename.vmdk --format VMDK

In the below example we will be converting a Solaris 11 USB file  sol-11_2-openstack-x86_Copy.usb  to vmdk.

E:\Software\Openstack>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" convertfromraw sol-11_2-openstack-x86.usb sol-11_2_cldvds-openstack-x86_Copy.vmdk --format VMDK
Converting from raw image file="sol-11_2-openstack-x86.usb" to file="sol-11_2_cldvds-openstack-x86_Copy.vmdk"...
Creating dynamic image with size 8655764992 bytes (8255MB)...

Convert  .usb to .vdi

Similarly you can convert a .usb file to .vdi . Refer below example.

E:\Software\Openstack>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" convertfromraw sol-11_2-openstack-x86.usb sol-11_2_cldvds_openstack-x86_Copy.vdi --format VDI
Converting from raw image file="sol-11_2-openstack-x86.usb" to file="sol-11_2_cldvds_openstack-x86_Copy.vdi"...
Creating dynamic image with size 8655764992 bytes (8255MB)...

Convert .vdi to .vmdk

Now let’s try converting a .vdi file to .vmdk

E:\Software\Openstack>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" convertfromraw sol-11_2-openstack-x86_Copy.vdi sol-11_2_cldvds-openstack-x86_Copy.vmdk --format VMDK
Converting from raw image file="sol-11_2-openstack-x86_Copy.vdi" to file="sol-11_2_cldvds-openstack-x86_Copy.vmdk"...
Creating dynamic image with size 6624903168 bytes (6318MB)...

If you want to convert from vmdk to vdi the syntax will be:

VBoxManage.exe convertfromraw filename.vmdk filename.vdi --format VDI

Convert .vdi to .vhd

Same steps you can use to convert from .vdi to .vhd

E:\Software\Openstack>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" convertfromraw sol-11_2-openstack-x86_Copy.vdi sol-11_2_cldvds-openstack-x86_Copy.vhd --format VHD
Converting from raw image file="sol-11_2-openstack-x86_Copy.vdi" to file="sol-11_2_cldvds-openstack-x86_Copy.vhd"...
Creating dynamic image with size 6624903168 bytes (6318MB)...

You can use similar steps to convert the other way round like convert .vmdk to .vdi  or .vhd to .vdi.

Hope this post is helpful to you. Do let me know if you have any query.

Review of 70-534 70-535 Architecting Microsoft Azure Solutions Certification course on Udemy by Scott Duffy

As I mentioned in my earlier post that I had a good experience with Udemy’s online course while preparing for AWS Certified Solutions Architect – Associate exam.

So for preparation of Architecting Microsoft Azure Solutions Certification also I wanted to buy an online course.

When I started my search for a suitable course I zeroed in on  Architecting Microsoft Azure Solutions Certification  course by Scott Duffy on Udemy.

Scott himself is a certified architect and got a rich industry experience. Going through the course content I found that it covered almost all exam topics. Also Scott keeps on updating the content as the syllabus changes. And if you buy from Udemy you get free life time access to the course so I went with this one.

Now coming to the course.

After buying the course as I went through it I found the content to be good but the content delivery of Scott is not as good as Ryan of acloudguru whose AWS course I have completed.

Scott mixes many Developer course topics with this course which can be good if you are from development background but not essential for the exam.  For the exam you need the basic understanding of coding so that you can read and understand the code.

Course has many quizzes after the modules which are helpful in testing what you have learnt. It covers hands on exercises which you can follow in your own MS Azure free trial account.

It has mock exam at the end of sections but when I gave them I found that no matter how many times you give the mock exam it reflects the same score that you got when you appeared for the mock exam first time. I informed Scott about this on the forum page and he said he will get it sorted. Hope it’s fixed now.

Overall this course covers most of the exam topics and if you are a beginner in Azure it will give you a good base.  Also as of Apr-18 this is the only course on Udemy which covers most topic and get you exam ready.

If you already have background in AWS then I recommend that you also go through the course Microsoft Azure for AWS Experts by Microsoft(Update: This is now a paid course).  Few of the Azure terminologies are confusing and if you relate them to AWS it will help you understand them quickly. You can also refer to our post where we have compared the services of AWS vs Azure .

Read the post Azure exam pattern to know more about  what’s asked in exam. You can supplement your preparation with sample exam questions by Scott.

Scott also got a good course on 70-533 Implementing Microsoft Azure Infrastructure Solutions .

Do share your queries or opinion with us.