Sei sulla pagina 1di 14

Clone Virtual Disks And Create A New Virtual Machine

Extend Vitual Disk Space And Overcome Problems With Snapshots

1) Clone Virtual Disks And Create A New Virtual Machine ........................................................ 2


Location of Virtual Machines on your PC ................................................................................... 2
Cloning Virtual Disk (Command Line)......................................................................................... 2
Create A New Virtual Machine After Cloning............................................................................. 4
Attaching The Cloned Disks To The New Virtual Machine ......................................................... 6
The Latter Configuration Steps Of The New Virtual Machine.................................................... 7
2) Extend Vitual Disk Space And Overcome Problems With Snapshots .................................. 10
Extending Disk Space on Windows Server ............................................................................... 10
Extending Disk Space on Linux Server ...................................................................................... 14
Links .......................................................................................................................................... 14

1) Clone Virtual Disks And Create A New Virtual Machine


Location of Virtual Machines on your PC
Verify where exactly your Virtual Machines are strored by clicking on "File" and then
"Preferences"
In my case i did not allow the Virtual Machines to be stored on "C " Drive so i altered
it to save on "D Drive"
This is a good practise to save Virtual Machines on a different Drive to get good
performance

Change to the directory or drive where the Virtual Machines are stored. In my case it
is simply D drive so i typed "d: " and pressed "Enter" key to change to d drive
You call the "VBoxManage" putting the complete path in (" " ) as shown below

Cloning Virtual Disk (Command Line)

The command follows so :


D:\> "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" clonehd D:\Clone-Win2008\Ora-1-WIN08R2-bak.vdi D:\Ora-10-OS-Win08\Ora-10-Win08-OS.vdi --format VDI
--variant Standard

The yellow highlighted is the disk (source) you want to clone and the blue underlined
is the destination (target) Folder and Disk Name how and where you want to save it
For clarity, mention a good directory name so that it is easily identified by you
The command creates a directory for you if does not exist
The "Ora-10-OS-Win08" is a folder name
In this example an Operating System disk and the 3 other additional disks are cloned
Verify wheather the disks are created after you see 100% success
Vith "--format VDI --variant Standard" you create another "Dynamic disk " but not
"fixed disk"
It is important to understand the difference between a Dynamic Disk and Fixed Disk if
you are new to Virtual Machine creation
Remember the folder names that you create. For clarity, i do so often with names like
D1, D2 and D3 etc. which makes me clear there are additional disks in the folders.
The below examples show how the additional disks are cloned

The red underlined shows how you can place disks in a folder/ location, doing so in
this way we can improve the system perfomance

The snapshots are in fact stored by default in this way


When the disks cloning is successful you can create another Virtual Machine
Make sure you give a name to the virtual macine that does not match to another
folder's name

Create A New Virtual Machine After Cloning


The below example shows how you can create another Virtual Machine :

Verify how much memory you allocated to previous (source) Virtual Machine
In my case i gave the same memory to this new virtual machine too

In the next step we just simply start to attach the disks that we cloned in earlier step
by navigating the folders
The starting disk will be Operating System disk and follows other disks. In my case
it was D1 - , D2 -and D3 - etc.cloned Disks

The below screen shows it :

Verify how many processors you allocated to the previous Virtual Machine

Attaching The Cloned Disks To The New Virtual Machine


The below screen shows how you can attach the additional disks one after the other

Finally you can see all the disks that were cloned for this new Virtual Machine

Start the newly created Virtual Machine and you can see the login accounts that
were created already

The Latter Configuration Steps Of The New Virtual Machine

Some changes are needed to be done so that there will be "no-network-conflict"


when both virtual machines are running
The very important changes needed to be done are :
1. Network (IP) Address and
2. Computer Name

In my case I do not use IPv6 but only IPv4. Just uncheck IPv6 to disable it

These are the default IP Address by Virtual Box Network.


It is called a Class C Network
If you saved any details in " Hosts File" you can open it with a command as shown
below and do the required changes . As an "Administrator" you could change it.

2) Extend Vitual Disk Space And Overcome Problems With Snapshots


Extending Disk Space on Windows Server
Assume you took Snapshots and do not know what changes you made while testing
Below you could see I had Snapshots since long time
You can extend Disk Space if Snapshots exists

Take a fresh new Snapshot which is a simple or easiest step

The easiest step is now you can start deleting the older Snapshots that goes so 3, 2
and 1

Lastly you delete the 4the Snapshot that is a fresh new one
Below you see there are not anymore Snapshots

Below screen shows the disk size before extending

Extend the disk space. In this example I extended a 15 GB Disk to 20 GB

Below screen shows the disk size after extending

Login to the Computer/Server and navigate "Computer Management -> Disk


Managment"
5 GB Unallocated is displayed

Right click and select "Extend Volume"

Match for the same MB "5120" in my case

Verification

Take a fresh new Snapshot if you want

Extending Disk Space on Linux Server


The steps below are for GUI based disk space extentsion using GParted :
1. Download
http://gparted.org/download.php
For latest computers :

2. Assume you followed the above steps for Snapshots that was shown for Windows
3. Attach this Gparted live ".iso" (CD) and start the Linux
4. The Gparted screens ask for basic information and later on you will be presented with a
screen to extend disk space
Links
http://oracle-base.com/articles/vm/virtualbox-extend-disk-and-file-system.php
https://www.virtualbox.org/

Potrebbero piacerti anche