New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fully implement CloudInit (Ubuntu) #1552
base: develop
Are you sure you want to change the base?
Conversation
7bb5ea6
to
6b771f1
Compare
That was a painful development. I'm not adding any more distributions unless there is at least some standardization 😖 |
Labeling this pull request (PR) as abandoned since it has gone 14 days or more since the last update. An abandoned PR can be continued by another contributor. The abandoned label will be removed if work on this PR is taken up again. |
@raandree ? :) |
Sorry for the delay, @nyanhp. I have just tried the lab you have provided. The deployment wasn't able to reach the Linux VM. Where can I start troubleshooting?
The Linux VM has trouble reaching the internet. I guess I need a network adapter connected to the internet. I am wondering how your lab worked successfully. |
My lab has a router, in case you didn't try it |
@raandree powershell is not yet available for 23.04. Please use an LTS version. |
Looks like your VM still boots the installation medium. |
If you need/want someone else to test, I am trying to use exactly what you are using (Ubuntu 22.04.03) and run into a similar issue. I downloaded the server installer, and it sits and waits for a cloud-init response, then continues on with the regular install process. I may be able to explain my issue due to the type of networking I'm doing. I'm using a software NAT ( If you need help testing something I'll do what I can to help. I think I may end up using this with some of my colleagues for some training instances so helping to further the cause is in my best interest. :) |
Labeling this pull request (PR) as abandoned since it has gone 14 days or more since the last update. An abandoned PR can be continued by another contributor. The abandoned label will be removed if work on this PR is taken up again. |
🎉 Sorry for the long hiatus @raandree , being a VP is surprisingly time-consuming. I've rethought my approach and now think it works better. The machine's Install VHD is detached and removed after it has shut down during the automated setup. This ensure the VM boots properly, without random issues. I've tested with this beauty as suggested by @dkettman. Remember to use your own SSH keys when testing, @raandree # Lab Variables
$labName = 'MYLAB'
$labSubnet = '172.0.99' #Just the first three octets
$sql_iso_url = 'https://go.microsoft.com/fwlink/p/?linkid=2215158&clcid=0x409&culture=en-us&country=us'
Import-Module AutomatedLab
#checking if our NAT is created. We want internet access!
$nats = Get-NetNat
if ($nats.Count -eq 0) {
Write-ScreenInfo -Message "No NATs defined! Defining one for us!"
New-NetNat -Name $labName -InternalIPInterfaceAddressPrefix $labSubnet'.0/24'
}
else {
Write-ScreenInfo -Message "There is already a NAT defined. Windows can only handle one NAT at a time. (Weak!)"
Write-ScreenInfo -Message "Checking if we can use it..." -TaskStart
if ($nats.InternalIPInterfaceAddressPrefix -like "$labSubnet*") {
Write-ScreenInfo -Message "As far as I can tell, it looks like this should work. If not, remove the NAT using"
Write-ScreenInfo -Message "the 'Remove-NetNAT' cmdlet and restart this script." -TaskEnd
}
else {
Write-ScreenInfo -Message "Looks like this NAT may not work."
Write-ScreenInfo -Message "Please double-check that the existing NAT will and adjust accordingly."
Write-ScreenInfo -Message "Without a NAT configured to handle the $labSubnet.0/24 subnet, you will not have Internets Access" -TaskEnd
break
}
}
#create an empty lab template and define where the lab XML files and the VMs will be stored
New-LabDefinition -Name $labName -DefaultVirtualizationEngine HyperV
#make the network definition
Add-LabVirtualNetworkDefinition -Name $labName -AddressSpace $labSubnet'.0/24'
# Define the Domain and the Domain Administration acocunt
Add-LabDomainDefinition -Name MYLAB.lab -AdminUser cs_admin -AdminPassword Somepass1
# Create a local user on each box as an administrator of 'cs_admin'
Set-LabInstallationCredential -Username cs_admin -Password Somepass1
# Setting up defaults for all machines. These can be overridden when the machine is defined
$PSDefaultParameterValues = @{
'Add-LabMachineDefinition:DomainName' = 'MYLAB.lab'
'Add-LabMachineDefinition:Network' = $labName
'Add-LabMachineDefinition:Gateway' = $labSubnet + '.1'
'Add-LabMachineDefinition:DnsServer1' = $labSubnet + '.10'
'Add-LabMachineDefinition:ToolsPath' = "$labSources\Tools"
'Add-LabMachineDefinition:OperatingSystem' = 'Windows Server 2022 Standard (Desktop Experience)' # GUI by default
}
# Machine Definitions
# DC01
## Roles: RootDC
Add-LabMachineDefinition -Name dc01 `
-Memory 2GB `
-OperatingSystem 'Windows Server 2022 Standard' `
-IpAddress $labSubnet'.10' `
-DomainName MYLAB.lab `
-Roles RootDC, CaRoot
Add-LabMachineDefinition -Name ubuntu01 `
-Memory 8GB `
-Processors 1 `
-IpAddress $labSubnet'.90' `
-SshPublicKeyPath "$home\.ssh\AzurePubKey.pub" `
-SshPrivateKeyPath "$home\.ssh\AzurePubKey" `
-OperatingSystem 'Ubuntu-Server 22.04.3 LTS "Jammy Jellyfish"'
# Get to work!
Install-Lab
|
Little side note, of course you already know this: PowerShell on Ubuntu 23 is not yet supported and the package cannot be found in the package repository. I've skipped generating errors due to this, but it means that 23 is not yet remotely reachable. |
@nyanhp, I have tried it again today. The domain controller was installed fine of course, the Ubuntu machine ran into a timeout:
This is the screen of the ubuntu machine. Unfortunately I cannot scroll up to see the rest: |
So, which version of ubuntu did you use? From what I can see it failed to partition the disk which is odd. |
Description
Fixes #1498
Type of change
How was the change tested?