machines from aws exporting

51
Exporting Machines from AWS Georgia Smith Security Admin, PCCC & Kevin A. McGrail Principal Evangelist, Dito

Upload: others

Post on 08-Jun-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Machines from AWS Exporting

Exporting Machines from AWSGeorgia SmithSecurity Admin, PCCC&Kevin A. McGrailPrincipal Evangelist, Dito

Page 2: Machines from AWS Exporting

Student, UVA Wise ‘21Math BS, Computer Science BS

Security AnalystPeregrine Computer Consultants Corporation

Introductions - Georgia Smith

Page 3: Machines from AWS Exporting

Kevin A. McGrailPrincipal Evangelist, Dito

Google Workspace TC, GDE & Ambassador

https://www.linkedin.com/in/kmcgrail

Introductions - KAM

Page 4: Machines from AWS Exporting

The Problem

Page 5: Machines from AWS Exporting

Vendor Stickiness aka Roach Motel

You can't NORMALLY export an instance if:

It contains third-party software provided by AWSExample: Windows or SQL Server or any instance created from an image in the AWS Marketplace

It has more than one virtual disk

It has more than one network interface.

Page 7: Machines from AWS Exporting

Cost to Export Using Clonezilla

Page 8: Machines from AWS Exporting

The Solution

Page 9: Machines from AWS Exporting

“Clonezilla is a partition and disk imaging/cloning program...”

Page 10: Machines from AWS Exporting

Clonezilla Machine Specs

Debian Machine (any Debian Based Distro works)- 30 GB Magnetic Storage

- t2.micro

Clonezilla Installation: - sudo apt-get update

- sudo apt-get install clonezilla- sudo drblsrv -i

Page 11: Machines from AWS Exporting

Availability Zones

IMPORTANT: The Clonezilla Instance needs to be in the same Availability Zone (Set On Machine Creation)

Page 12: Machines from AWS Exporting

Security GroupPort 22 for SSH

Clonezilla Ports9001900390099015

Page 13: Machines from AWS Exporting

Consider a Clonezilla AMI

- Easy to Spin Up

- Easy to get the correct Availability Zone

Page 14: Machines from AWS Exporting

Migrating a Linux Box

Page 15: Machines from AWS Exporting

Linux Machine to MigrateCentOS 7 loaded from the

AWS Marketplace

- 8GB Magnetic Storage- Same Availability Zone

- t2.micro- 1 GB RAM- 1 vCPU

- Security Group for SSH

Page 16: Machines from AWS Exporting

Set Sudo / Passwd- The default AWS user (centos) is only accessible

using a key

- Consider setting a password and sudo access

Page 17: Machines from AWS Exporting

Turn Off The Instances- Prepare to attach the Volume for the Instance to

Migrated to the Clonezilla Instance

- The Instances to be Migrated and Clonezilla MUST be turned off to do this

-

Page 18: Machines from AWS Exporting

Detach & Attach Volume - Detach the Volume to be Transferred

- Attach the Volume to Clonezilla InstanceHINT #1: Use the Default location of /dev/sdf HINT #2: Name the Volumes & Instances in AWS for Easy Identify instead of AWS’ long id strings!

Page 19: Machines from AWS Exporting

Prepare Destination MachineFor Best Results: The Destination Machine should

match the MINIMUM specifications from the source and the exact same or more storage space.

Page 20: Machines from AWS Exporting

Example Dest: VMware ESXI

Page 21: Machines from AWS Exporting

Clonezilla Live on Dest Machine- https://clonezilla.org/downloads.php

- The ISO allows for migration directly to the target machine

Page 22: Machines from AWS Exporting

Source Clonezilla (AWS)

Page 23: Machines from AWS Exporting

Source Clonezilla (Cont.)

Page 24: Machines from AWS Exporting

Source Clonezilla (Cont.)

Page 25: Machines from AWS Exporting

Source Clonezilla (Cont.)

Page 26: Machines from AWS Exporting

Destination Clonezilla

Page 27: Machines from AWS Exporting

Migration - Destination Machine

Page 28: Machines from AWS Exporting

Destination Clonezilla (Cont.)

Page 29: Machines from AWS Exporting

Destination Clonezilla (Cont.)

Page 30: Machines from AWS Exporting

Destination Clonezilla (Cont.)

Page 31: Machines from AWS Exporting

Destination Clonezilla (Cont.)

Page 32: Machines from AWS Exporting

Linux Boot Problems

Page 33: Machines from AWS Exporting

Fixing Linux Boot Problems

Page 34: Machines from AWS Exporting

Fixing Linux /etc/resolv.conf

Page 35: Machines from AWS Exporting

Remove cloud-init

Page 36: Machines from AWS Exporting

Linux Boot Problem SOLVED!

Page 37: Machines from AWS Exporting

Migrating a Windows Box

Page 38: Machines from AWS Exporting

Windows Server 2019 Datacenter Edition(from AWS Marketplace)

- 30GB Magnetic Storage- Same Availability Zone

- t2.micro- 1 GB RAM- 1 vCPU

- Security Group: RDP

Windows Machine to Migrate

Page 39: Machines from AWS Exporting

Make Sure You Have Credentials- Get Instance RDP Details and Password

Page 40: Machines from AWS Exporting

Migration is the Same- Follow the same steps as with the Linux box

- Configure the network how you like (Static, DHCP, Public, Private, etc)

NOTE: Will need to know the IP for RDP!

Page 41: Machines from AWS Exporting

Final Notes from KAM

Page 42: Machines from AWS Exporting

Bombing Out after Partition 1?- We found a repeatable issue with one box where

partitions after the first.-

- SOLUTION: Clone it like normal. When it fails on partition 2, the partition table has already been cloned. Now use partition to partition overtop for

the other Partitions. Works great!

Page 43: Machines from AWS Exporting

Avoid the Issue to Begin With

Consider tools like spinning up boxes in Vmware ESXI or VirtualBox and them importing into the cloud

Page 44: Machines from AWS Exporting

Licensing

IMPORTANT: Boxes with licensing like Windows WILL report being unlicensed soon

(though it might take some time).

Page 45: Machines from AWS Exporting

Cloud Pros & ConsEase of Licensing with hosting like AWS

However, ESXI is free and a great tool!

Anthos is also amazing but not Free.

Three main types of Data Centers. EACH TYPE HAS A PURPOSE!

Page 46: Machines from AWS Exporting

Total Cost of OwnershipVirtual Machines STILL need administration!

55 points for an full-time IT Administrator

1 point per workstation

5 points per server

4 points per virtual server

Page 47: Machines from AWS Exporting

Death by Papercuts #1

Page 48: Machines from AWS Exporting

Death by Papercuts #2

Page 49: Machines from AWS Exporting

Q: How Much is $0.0928 per Hour per Month?

Page 50: Machines from AWS Exporting

A: ~$70.00

Page 51: Machines from AWS Exporting

Slides will be on KAM’s LinkedIn & mcgrail.com/downloads

Image Credits:

KAM photo taken by Ted King, used with permissionCompany logos used to represent the firms and do not imply any approval

Cockroach Photo courtesy of Homero Ohapa Black Flag commercial for trademark purposes and does not imply any approval

Thanks!

Kevin A. McGrailwww.linkedin.com/in/kmcgrail

Georgia Smithwww.linkedin.com/in/ga-smith