Milestone10:OpenstackandWindows - echadbourne/SYS-350 GitHub Wiki

Enable ip forwarding:

  • Update the value sudo sysctl -w net.ipv4.ip_forward=1
  • Make this persistent upon restart
    • Go to sudo nano /etc/sysctl.conf
    • Uncomment net.ipv4.ip_forward = 1

Install kvm

  • sudo apt install qemu-kvm libvirt-daemon-system bridge-utils virtinst virt-manager

Originally this command also had libvert-clients in it but that package was not found so I had to remove that

  • check if the service is active with sudo systemctl is-active. It is okay if it returns inactive, we just want to check if the command works

It returned active for me

Add your ubuntu user to the libvirt group

  • sudo usermod –a –G libvirt [user_name]

Relog, then open the virtual machine manager with sudo virt-manager

{4E1EFFAB-CAB1-44B0-B1C1-FE8F4F845FF6}

Download the VirtIO drivers and windows iso, and move them to /var/lib/libvirt/images

Make sure virt-manager is open, and go to file > new vm

  • Select the ISO option, and browse to the windows ISO. Make sure to change the operating system to Microsoft Windows Server 2019, not 2022

I had to delete the autodetected one and retype the name and click the right one to get it to stay

{8A90C2D7-514C-48C5-8582-CCEDF04C7B01}

Set the memory and CPU

{546D5695-F07A-4823-B04D-85E3945E5CBB}

Create a new storage volume in the /var/lib/libvirt/images directory with the following settings

{DC5D2FDD-EEE5-42A3-A857-8AC9BCA6EE57}

{4C8E35A4-2006-4460-AEF9-FA8DC38D7DDF}

Change the SCSI disk to VirtIO

{8F121335-195E-4F3B-90FC-6DEA93D4A6F5}

Make sure to click apply, this button was originally off the screen for me

I also decided to make a new disk with the "add hardware" button. I made it 10 GB, as per the tutorial

{F0F9883D-D7AB-4C38-8516-1666EF443A29}

Make sure the SATA cdrom 1 device points to the windows iso

{0989994E-C35A-4BFD-8135-B32DD65DF541}

Create a new sata cdrom that points to the virtio driver

{6C2DBC90-2AFA-48D5-8E61-20A90542FAF5}

Set the NIC device model to virtio

{FA165048-2BC3-4C75-9697-1373EAE57914}

Begin the Installation

Windows Installation

Go through the setup, select standard desktop experience, when it asks for a disk click load drivers > ok, make sure to select "2k19" on the drivers window

{22AF624D-C939-4EF9-BF6C-C31E657C7ECE}

Select the 25GB drive, and finish the install.

Let the computer reboot, use sconfig to do the following

  • Set the time zone to eastern
  • Update the os (optional)
  • Set updates to manual

Allow remote desktop in the firewall with the powershell command: Enable-NetFirewallRule -name RemoteDesktop-UserMode-In-TCP

  • Set-ExecutionPolicy Unrestricted

{E7B41D75-E8F9-4AFE-B69D-CB050B5E6179}

Install drivers

Navigate to the virtio-win CDROM and run "virtio-win-gt-x64" to install the drivers, and "virtio-win-guest-tools" for the guest tools

{06155985-9C3D-47D0-9E68-4CFF90584FEB}

It asked for a restart here so I restarted it

Install chrome, I had to download the chromesetup.exe from the class file server and run it

I then downloaded and ran the cloudbase setup file. I kept everything default, and used these options in the configuration options

{E1F42299-52F9-4B6A-8E51-0DFA6D4E759C}

I then clicked the two checkboxes at the end of the installer, clicked finish, and let the sysprep do its thing.

Image Import

Start by creating a network and corresponding subnet called sys350. I created a 10.0.17.0/24 network, with a gateway of 10.0.17.1.

The ip allocation is 10.0.17.100,10.0.17.254

Create a new interface on the router for the sys350 subnet

Create new keypair

New floating IPs

Change ownership of the file

Import it to openstack

Success!

Flavor created for the new instance

Instance created

Security group applied

Security group rules

Floating IP allocation

As I understand it, this allocates an IP that can be accessed from outside of the SYS350 network, aka via our super, which is acting as a router for the sys350 internal network. the sys350 network is being hosted "inside" the super via openstack, and we need floating ips like the 20.20.20.1 to access things inside. This is separate from the WAN the super is also on alongside other supers.

Next I had to ping the floating IP for the VM. This didn't work initially, because the windows firewall automatically had pings to the computer disabled, so I had to go and enable "File and Printer Sharing (Echo Request - ICMP)" For both outbound and inbound on the windows firewall, then it worked.

{6C962C48-D857-44F8-99AC-3A03FDF5FF51}

{FE16D9A1-E042-4A22-B3AE-092B75FECBF8}

I then installed remmina with sudo apt install remmina and set up a new connection with the following settings:

  • Name: Windows2019
  • Server: 10.20.20.175:3389
  • Username: Administrator
  • Password: [password for the administrator account]

image

I then hit "Save and connect" and had a working vm with remote desktop

image

In order to get RDP to work, I had to enable remote desktop via the settings. Once I hit this button, it was fine. image

Reflection

This deployment was definitely different form vsphere, but I actually think it went smoother for me than vsphere did. There was a good amount of documentation on openstack, and while it was definitely finicky, it worked pretty much as expected with little issue. I feel like the only problems I had with it were a lack of understanding of the tool on my part, since it is completely new to me, and I already had prior experience with vsphere from other classes. I think this was a pretty good and informative part of the course.