Now, in our previous example,
we learned how to work with cloud images
that have preinstalled operating systems on them.
So we don't need to install one,
a different scenario we can encounter is if
we actually want to install an operating system,
that is we don't want to use a preconfigured disk image.
We want to start fresh and create a clean install.
Now, in this case, we can create a virtual machine
attach a virtual CD ROM or DVD ROM to it
and create an empty disk image.
Then Vert install can boot from the CD ROM or DVD ROM
and install the operating system on top of that disk image.
Here's an example of a command that we could run for such a purpose.
There are a couple of important differences here.
First of all, we no longer use the dash dash import option.
We have no prebuilt disk image, no preinstalled operating system.
So there's nothing to import.
Then we don't point the dash dash disk option to
the path of an image file since none is available.
Now it's kind of broken with the line return here. But with size equal 10,
we tell the bird install to create a new image with 10 gigabytes available on it.
Finally, with the dash dash location option, we point to an ISO
file which is basically an image of a CD or DVD ROM installation disk.
And again, we do dash dash graphics. None.
At the end of our command,
we'll need an extra option with dash dash extra args console equals TT Ys zero.
We tell the Linux kernel booting in the virtual machine to expose
what is called a serial console represented by TT Ys zero.
Here.
In essence,
it gives us a way to connect to that virtual
machine and interact with it in a text only environment.
Without this option,
it would boot in such a way that we'd have no way to
connect to the console without a graphical user interface available on the system.
Now, we won't run this command since we don't have a de
and 12 installation
iso available and we won't waste time downloading one because we
have an even more efficient way to get this done.
We can tell Vert dash
install to get its required files directly from the internet
and it can download only what it needs.
And that reduces the time necessary for the operation.
All we have to do is edit our location parameter
instead of using a parameter to point it to an iso
file. We use a parameter pointing to a web address,
the web address we type here needs to offer access to a
certain directory and file structure that bird install can understand and use.
You can visit the address in your web browser if
you want to see the file and directory structure.
And this is the URL that we're going to use.
So instead of this iso
location,
we will put in this location and I'll put in
for secure
and we will press enter.
And as we can see,
it's gonna start pulling down the necessary files to do this installation.
There we go.
And after we see a bit of output from the Linux kernel,
we're greeted by the installer.
Now, sometimes depending on your terminal, this can be a little messed up like this.
Now, we've booted a very minimal installation environment.
So extra languages aren't available.
We can just press enter and pick the defaults for the
first two steps to see how this actually works as intended.
But in our demo,
let's stop here since the next steps start
downloading stuff and we'd have to wait around.
But now let's press control and closing bracket
to close out our terminal.
Now, as a note, our output might be a bit messed up
and clear, doesn't always fix it.
And this is how we can create a virtual machine and install an operating system on it.
Now,
most of the time you'll want to use the
cloud images that we used in the previous lesson,
but it's helpful to know this method as Well, and now on to the next lesson.