-: In this demonstration, I want to show you
how you can better secure your virtual machine
from your outside environment.
We're going to do that by using encryption
as well as disabling sharing
between the host operating system,
in my case, the Mac system,
and my Windows 10 virtual machine.
If I don't allow sharing between the two,
that way, even if the Windows machine
gets a virus or some sort of malware,
it can't escape the virtual environment
and it can't affect my host operating system,
which is the Mac.
So, from within VirtualBox, on the left side,
you'll have all of your systems listed.
On this one, it's a new install
and I only have the one Windows 10 machine
that I made earlier.
Now, if you go ahead and click on it
and then click on Settings,
you'll have these settings for it.
There's two areas that I want to go through.
The first one is Disk Encryption.
You have this file on your system
that's holding your entire Windows operating system,
that virtual machine.
So, I'm going to go into Finder
and it's in my VirtualBox VM folder.
In here, I have this one folder that is Windows 10,
and underneath it, you'll see that I have some log files,
I have some configuration files,
which is my VirtualBox settings, and this VDI.
This nine gigabyte file is the entire hard drive image
of that Windows 10 machine,
and right now, it's not encrypted
and so anybody who got access to this machine
could get the data from that Windows machine
and we don't want that.
So, one of the things you want to do is go to into VirtualBox,
and under your General tab,
there is this disk encryption setting.
You can enable disk encryption.
You can choose which cipher it's going to use,
AES-256 or AES-128.
256 is a higher-bit key so it's going to be better.
And then you can give it a long, strong password.
Something like this is going to give me
a nice, long, 16-character password,
which is a mixture of uppercase, lowercase,
special characters, and numbers.
When I click OK, it's going to go through
and encrypt that disk image.
This may take a while in your system
depending on how powerful your system is
because the encryption process does have to take
processing resources and disk access resources.
On my system, this only took about 30 seconds
because we have a very high performance system
using solid-state hard drives.
The second thing we want to do
is go into our settings and look at our shared folders.
So right now, you can see under Disk Encryption,
we do have a nice encrypted disk.
And when we go over here to our Shared Folders,
we don't have any setup right now.
Now, here inside the Shared Folders, if you add a folder,
this will make a connection between the virtual machine
and the host machine.
So, in my case, if I want to go ahead
and connect my Mac's desktop folder to this Windows machine,
I can go ahead and hit Auto-mount,
which will allow me to auto-mount this folder
as a shared resource that the Windows machine can get.
You can also do it as read-only so it's a one-way transfer
where the Windows machine can read from the Mac,
but the Mac can't read from the Windows machine.
Right now, I have it set up as a two-way share.
We'll go ahead and hit OK
and I can go ahead and boot up this Windows machine.
Once you go to boot it, because we've set that encryption,
we do have to enter that long, strong password each time.
That is decrypting the file
and allowing us to boot up the hard drive.
And now, once we're booted up into Windows,
we can click on the folder, we can go to Network,
and you'll see there is now this network server
called VBox Server.
This is what hosts all the shared files and folders,
and so here we can see, the desktop folder that I shared,
is now sitting there.
And from here you can see my Mac desktop is currently empty.
Now, if I look at the Mac,
you can see there's nothing on my desktop.
Let's go ahead and make a file here
just to show that we have a connection between the two.
I'm going to go ahead and create a text document
that said From Windows.
And now, if I go back over here,
you'll see From Windows is there.
And that two-way connection is dangerous
because if you have a Windows host system
and a Windows virtual machine system
and you get some sort of a virus or malware
inside the virtual machine,
it can then be transferred to your host computer.
So, what I recommend
is that we don't have that connection set up.
So, inside of VirtualBox,
I like to go in and delete those connections
and make sure that this virtual machine stays isolated,
that there is not a connection between the two,
and that is going to give you a little bit more security
when using these virtual machines.