-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This requires an Ubuntu 22.04 image that has been run through cloud-init such that the user/password combination in the adapter can be used to log in via the serial console. I've uploaded an image to catacomb that has this property. Tested via a local run with the new guest OS type.
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
//! Guest OS adaptations for Ubuntu 22.04 images. These must be prepped with | ||
//! a cloud-init disk that is configured with the appropriate user and password. | ||
|
||
use super::{CommandSequence, CommandSequenceEntry, GuestOs}; | ||
|
||
pub(super) struct Ubuntu2204; | ||
|
||
impl GuestOs for Ubuntu2204 { | ||
fn get_login_sequence(&self) -> CommandSequence { | ||
CommandSequence(vec![ | ||
CommandSequenceEntry::WaitFor("ubuntu login: "), | ||
CommandSequenceEntry::WriteStr("ubuntu"), | ||
CommandSequenceEntry::WaitFor("Password: "), | ||
CommandSequenceEntry::WriteStr("1!Passw0rd"), | ||
CommandSequenceEntry::WaitFor(self.get_shell_prompt()), | ||
]) | ||
} | ||
|
||
fn get_shell_prompt(&self) -> &'static str { | ||
"ubuntu@ubuntu:~$" | ||
} | ||
|
||
fn read_only_fs(&self) -> bool { | ||
false | ||
} | ||
} |