VirtualBox Operations: Difference between revisions
(Created page with "=Internal= !!!VM Deletion Power down. Right click -> Remove. Delete all files. This removes everything under ~/VirtualBox VMs/<machine-name> !!!Creating and Insta...") |
|||
(14 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=Internal= | =Internal= | ||
* [[VirtualBox#Subjects|VirtualBox Subjects]] | |||
=Virtual Machine Deletion= | |||
Power down. | Power down. | ||
Line 8: | Line 9: | ||
Right click -> Remove. | Right click -> Remove. | ||
Delete all files. This removes everything under ~/VirtualBox VMs/ | 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 <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. | |||
=Resizing an Existing Virtual Disk= | |||
Select the VM in the VirtualBox Manager and stop It. | 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
Restoring a VM from a Snapshot
TODO.
More about snapshots: