/var/lib/dbus/machine-id
and is symbolically linked
to /etc/machine-id
two virtual machines do have
the same D-Bus machine ID,
follow the procedure below to
generate a new one:
$ sudo rm -f /etc/machine-id
$ sudo dbus-uuidgen --ensure=/etc/machine-id
Deploying
Virtual Machines
to the Cloud
1.- There are a multitude of IaaS
(infrastructure as a service) providers
available that run hypervisor systems and
that can deploy virtual guest images for
an organization.
1.- all of these providers have tools in place
that allows an administrator to build,
deploy and configure custom virtual
machines based on a variety of Linux
distributions.
2.- Many of these companies also
have systems in place that allow
for the deployment and
migrations of virtual machines
built from within a customer’s
organization.
2.- Deployment
1.- Computing Instances
1.-Many cloud providers will
charge usage rates based on
“computing instances”
2.- Careful planning of how
much processing time
applications
3.- refer to the number of
virtual machines that are
provisioned in a cloud
environment.
2.- Block Storage
1.- Cloud providers also
have various levels of
block storage
2.- Some offerings are simply
meant to be web-based
network storage for files,
4.- offerings relate to external storage
for a cloud provisioned virtual
machine to use for hosting files.
3.- The cost for such offerings will
vary based on the amount of
storage used, and the speed of
the storage
3.- Networking
1.-web-based utilities that can be
utilized for the design and
implementation of different
network routes, subnetting, and
firewall configurations.
2.- Some will even provide DNS
solutions so that publicly
accessible FQDN (fully qualified
domain names) can be assigned
to your internet facing systems.
3.- There are even “hybrid” solutions
available that can connect an existing,
on-premise network infrastructure to a
cloud-based infrastructure through the
means of a VPN (
Securely Accessing
Guests in the Cloud
The most prevalent method in use for
accessing a remote virtual guest on a cloud
platform is through the use of OpenSSH
software.
Administrator
ssh-keygen
and follow the prompts to
create a public and private
SSH key pair
Private Key
(stored in ~/.ssh/)
System Local
permissions 0600
Public Key
copied to the
remote cloud
system
permissions
0644
$ ssh-copy-id -i <public_key> user@cloud_server
this will copy the public SSH key from the key pair
just generated to the remote cloud server.
The public key will be recorded in the
~/.ssh/authorized_keys file of the cloud
server
Some cloud providers will automatically
generate a key pair when a new Linux
system is provisioned.
The administrator will then need to download the
public key for the new system from the cloud
provider and store it on their local system
Preconfiguring
Cloud Systems
the cloud-init utility.
A useful tool that simplifies the
deployments of cloud-based virtual
machine
with the associated configuration
files and pre-defined virtual
machine image,
Utilizing YAML (YAML Ain’t Markup
Language) plain-text files an administrator
can pre-configure network settings,
software package selections,
cloud-init will read in the settings from
YAML configurations files and apply them.
This process only needs to apply to a
system’s initial setup, and makes deploying
a fleet of new systems on a cloud provider’s
platform easy.
#cloud-config
timezone:
Africa/Dar_es_Salaam
hostname: test-system
# Update the system
when it first boots up
apt_update: true
apt_upgrade: true #
Install the Nginx web
server packages: -
nginx
Containers
1.- Container technology is similar in some
aspects to a virtual machine, where you get
an isolated environment to easily deploy an
application.
6.- a container uses just enough
software to run an application. In
this way, there is far less
overhead.
2.- Containers allow for greater flexibility
over that of a virtual machine.
3.- An application container can be migrated
from one host to another, just as a virtual
machine can be migrated from one
hypervisor to another
5.- Containers also make it easy to
deploy new versions of applications
in tandem with an existing version
4.- Containers make use of the control groups
(better known as cgroups) mechanism
within the Linux kernel
cgroups
1.- is a way to partition
system resources
such as memory,
processor time as well as
disk and network
bandwidth for an
individual application.
2.- An administrator can use cgroups
directly to set system resource
limits on an application,
3.- or a group of applications that
could exist within a single
cgroup.
Pregutas y Respeustas
1.- What CPU extensions are necessary on an x86
based hardware platform that will run fully
virtualized guests?
VT-x for Intel CPUs or
AMD-V for AMD CPUs
2.- A mission-critical server installation that will
require the fastest performance will likely use
what type of virtualization?
paravirtualizado
3.- Two virtual machines that have been cloned from the same
template and that utilize D-Bus are performing erratically. They both
have separate hostnames and network configuration settings. What
command would be used to determine if each of the virtual machines
have different D-Bus Machine IDs?
dbus-uuidgen --get
Pregntas Exploratorias
1.- Run the following command to see if your system
already has CPU extensions enabled to run a virtual
machine (your results may vary depending on your CPU):
grep --color -E "vmx|svm" /proc/cpuinfo
2.- If your processor supports virtualizations,
seek out your distribution’s documentation
for running a KVM hypervisor.
Ubuntu — https://help.ubuntu.com/lts/serverguide/libvirt.html
Fedora — https://docs.fedoraproject.org/en-US/quick-docs/getting-started-with-virtualization/
Arch Linux — https://wiki.archlinux.org/index.php/KVM
3.- If you are using a graphical desktop environment, it is
recommended to also install the virt-manager application which is a
graphical front-end that can be used on a KVM installation. This will aid
in virtual machine installations and management.3
$ sudo apt install virt-manager
4.- Download a Linux distribution ISO image of your
choice, and following your distribution’s
documentation create a new virtual machine
using this ISO.
This task is easily handled by the virt-manager
package. However a virtual machine can be created
from the command-line using the virt-install
command. Try both methods to get an
understanding of how virtual machines are
deployed.