-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
ISSUE TYPE
- Documentation Report
COMPONENT NAME
Single Node System
CLOUDSTACK VERSION
4.19.0.1
CONFIGURATION
Basic Networking, Single Node System running on Hyper-V, Nested Virtualisation
OS / ENVIRONMENT
Windows 11 Pro (23H2) running Hyper-V, CentOs 7 with KVM
SUMMARY
I was trying to install a basic system on my home PC for learning Cloudstack and ran into a few issues, I've eventually got it working but thought I would document the solutions here for anyone else with similar problems.
STEPS TO REPRODUCE
Following the Quick Start Guide from here: http://docs.cloudstack.apache.org/en/4.19.0.0/quickinstallationguide/qig.html
I set-up a new hyper-v VM with the following configuration:
- 16Gb of RAM
- 8 vCPUs
- 127Gb Hard Disk
- Networking was using the vSwitch attached to the physical PC NIC in bridge mode so was using IP addresses from my PC network (192.168.20.0/24)
Before booting, I enabled nested virtualisation on the VM, by opening a powershell command prompt as administrator and running the following command:
Set-VMProcessor -VMName <VM Name> -ExposeVirtualizationExtensions $true
For the boot iso, I used the centos 7 minimal installer mentioned in the documentation and installed a VM setting the hostname to svr1.cloud.priv (saved messing around with the hostname --fqdn later), so far so good, when I then rebooted after install, the network was not working, I found some instructions here (https://achubbard.com/2018/01/31/centos-7-minimal-installation-hyper-v/) which said that the default setting of (ONBOOT=no) within the /etc/sysconfig/network-scripts/ifcfg-eth0 file should be set to:
ONBOOT=yes
I then rebooted (or ran "systemctl restart network") and networking was working, when then allowed me to upgrade the OS and install the bridge packages.
One issue not mentioned in the docs is to permit root login over SSH, so edit the file: /etc/ssh/sshd_config and uncomment this line:
PermitRootLogin yes
Then:
systemctl restart sshd
Ensure you follow the networking section very carefully, especially about disabling NetworkManager, I didn't do this first time so when restarting networking I was getting an error about "RTNETLINK answers: File exists".
I followed the rest of the guide and ran all the way through quite successfully, I had the 2 System VM's start-up, but when the SSVM (secondarystoragevm) was trying to download the "CentOS 5.5(64-bit) no GUI (KVM)" template, it was coming up with an error about "unable to resolve download.cloudstack.org". This was confusing as logging into the main VM I was able to resolve all fine, after much troubleshooting I was able to determine that the SSVM running under nested virtualisation was the one which couldn't resolve download.cloudstack.org. I was able to connect to the SSVM by using this command as root from the hyper-v VM:
ssh -i /root/.ssh/id_rsa.cloud 169.254.x.x -p 3922
Running an arp command showed it was unable to resolve the PC networks default gateway (192.168.20.1) to a MAC address:
arp -an
I eventually found this was a hyper-v security feature which was blocking the VM from MAC Spoofing causing the traffic to be blocked, so back in powershell administrator shell, I ran this command with the VM shutdown:
Get-VMNetworkAdapter -VMName <VM Name> | Set-VMNetworkAdapter -MacAddressSpoofing On
I then started up the VM and everything was then working fine.
I hope this guide helps someone and I'm now happy to start experiementing with Cloudstack.
EXPECTED RESULTS
Work first time
ACTUAL RESULTS
Worked eventually after some troubleshooting