VirtualBox Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 17: Line 17:
Settings -> Storage -> Controller: SATA -> HD Icon + -> Create new disk -> VDI -> Size Dynamically Allocated.
Settings -> Storage -> Controller: SATA -> HD Icon + -> Create new disk -> VDI -> Size Dynamically Allocated.


Detected by the O/S as <tt>/dev/sdb</tt>.
Detected by the OS as <tt>/dev/sdb</tt>.


This device then can be added to an existing Volume Group (see [[Linux Logical Volume Management Concepts]]), or it can be initialized with a different Volume Groups, etc.  
This device then can be added to an existing Volume Group (see [[Linux Logical Volume Management Concepts]]), or it can be initialized with a different Volume Groups, etc.


<font color=red>When doing this, update [[Linux Logical Volume Management Concepts]] with details.</font>
=Resizing an Existing Virtual Disk=
 
Select the VM in the VirtualBox Manager and stop It.
 
Go to the host directory where VirtualBox maintains the file:
 
<pre>
cd /Users/ovidiu/VirtualBox VMs/Windows/Windows10
</pre>
 
Copy the .vdi file as a precaution:
 
<pre>
cp Windows10.vdi  Windows10.vdi.backup
</pre>
 
Resize it (the space is specified in MB). The following command resizes the disk to 100 GB.
 
<pre>
VBoxManage modifyhd Windows10.vdi --resize 102400
</pre>
 
The size does not get modified right away, but the disk will grow as needed.
 
<font color=red>After I've done this, I have not seen any change in the Windows guest, the file system has the same size. What to do next? I ended up [[#Creating_and_Installing_a_new_Virtual_Disk]]. However, a possibility is to Right Click on Start -> Disk Management -> select the partition that was just resized -> right click -> Extend Volume.</font>
 
=Getting Information about a Guest=
 
Guest window -> Machine -> Session Information.
 
=Managing an Environment from Command Line=
 
<blockquote style="background-color: #f9f9f9; border: solid thin lightgrey;">
:[[VirtualBox Managing an Environment from Command Line]]
</blockquote>
 
=Restoring a VM from a Snapshot=
 
<font color=red>TODO</font>.
 
More about snapshots: {{Internal|VirtualBox Concepts#Snapshot|VirtualBox Snapshots}}
 
=VirtualBox Virtual Machine and Linux O/S Clone=
 
{{Internal|VirtualBox Virtual Machine and Linux O/S Clone|VirtualBox Virtual Machine and Linux O/S Clone}}

Latest revision as of 01:01, 23 May 2017

Internal

Virtual Machine Deletion

Power down.

Right click -> Remove.

Delete all files. This removes everything under ~/VirtualBox VMs/<machine-name>.

Creating and Installing a new Virtual Disk

Select the VM in the VirtualBox Manager and stop It.

Settings -> Storage -> Controller: SATA -> HD Icon + -> Create new disk -> VDI -> Size Dynamically Allocated.

Detected by the OS as /dev/sdb.

This device then can be added to an existing Volume Group (see Linux Logical Volume Management Concepts), or it can be initialized with a different Volume Groups, etc.

Resizing an Existing Virtual Disk

Select the VM in the VirtualBox Manager and stop It.

Go to the host directory where VirtualBox maintains the file:

cd /Users/ovidiu/VirtualBox VMs/Windows/Windows10

Copy the .vdi file as a precaution:

cp Windows10.vdi  Windows10.vdi.backup

Resize it (the space is specified in MB). The following command resizes the disk to 100 GB.

VBoxManage modifyhd Windows10.vdi --resize 102400

The size does not get modified right away, but the disk will grow as needed.

After I've done this, I have not seen any change in the Windows guest, the file system has the same size. What to do next? I ended up #Creating_and_Installing_a_new_Virtual_Disk. However, a possibility is to Right Click on Start -> Disk Management -> select the partition that was just resized -> right click -> Extend Volume.

Getting Information about a Guest

Guest window -> Machine -> Session Information.

Managing an Environment from Command Line

VirtualBox Managing an Environment from Command Line

Restoring a VM from a Snapshot

TODO.

More about snapshots:

VirtualBox Snapshots

VirtualBox Virtual Machine and Linux O/S Clone

VirtualBox Virtual Machine and Linux O/S Clone