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
- Go to
Install kvm
sudo apt install qemu-kvm libvirt-daemon-system bridge-utils virtinst virt-manager
Originally this command also had
libvert-clientsin 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
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
Set the memory and CPU
Create a new storage volume in the /var/lib/libvirt/images directory with the following settings
Change the SCSI disk to VirtIO
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
Make sure the SATA cdrom 1 device points to the windows iso
Create a new sata cdrom that points to the virtio driver
Set the NIC device model to virtio
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
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
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
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
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.
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]
I then hit "Save and connect" and had a working vm with remote desktop
In order to get RDP to work, I had to enable remote desktop via the settings. Once I hit this button, it was fine.
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.