通过下载Ubuntu ova文件在Virtual Box快速安装ubuntu

下载ova文件

到清华源下载:Index of /ubuntu-cloud-images/noble/current/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror

具体来说是这个文件

复制代码
https://mirrors.tuna.tsinghua.edu.cn/ubuntu-cloud-images/noble/current/noble-server-cloudimg-amd64.ova

可以浏览器下,也可以wget下载

Virtual box 导入

下载后,到Virtual box 导入

导入成功

创建和使用网上cd image

这个镜像需要使用网上的image,因此启动后需要执行下面命令

复制代码
sudo apt install cloud-utils

这是Ubuntu下的方法啊!

Create and attach an ISO image

To create an ISO image we'll use the cloud-localds function from the cloud-utils package. On Ubuntu and Debian systems you can install this via apt:

复制代码
sudo apt install cloud-utils

For other operating systems, follow the instructions from the cloud-utils upstream repository.

Additionally, to set up remote access for your machine, you'll need to have a set of SSH keys. To learn more about SSH keys and their generation, refer to SSH/OpenSSH/Keys.

Once these prerequisites are met, you can generate and attach the ISO seed image.

  1. Create a YAML file with password authorization enabled:

Choose between two YAML configurations based on your cloud-init version:

FreeBSD下的操作

安装软件

复制代码
sudo pkg install cdrtools

创建文件

复制代码
skywalk@fb98:~/VirtualBox VMs/ubuntu-noble-24.04-cloudimg-20260826/iso $ cat meta-data 
instance-id: iid-local01
local-hostname: ub86


skywalk@fb98:~/VirtualBox VMs/ubuntu-noble-24.04-cloudimg-20260826/iso $ cat user-data
#cloud-config
# 设置默认用户 ubuntu 的密码
password: "Ubuntu"
chpasswd:
  list: |
    ubuntu:Ubuntu
  expire: False

# 允许 SSH 使用密码登录(默认为 no,必须显式开启)
ssh_pwauth: true

# 可选:确保 sshd 配置被重载
runcmd:
  - [ systemctl, restart, sshd ]

生成cd

复制代码
mkisofs -output seed.iso -volid cidata -joliet -rock user-data meta-data

到VirtualBox里导入这个iso文件,启动的时候,它就会生效,用配置的密码登录即可!

注意,就第一次启动的时候是可以的,如果启动多次,这个密码估计就登不进来了.

登上去立刻改密码!

相关推荐
小白的码BUG之路1 小时前
linux -- ssh两台机器相连
运维·服务器·ssh
缓慢更新3 小时前
表单引擎的存储建模:宽表与文档库的取舍
运维·服务器·网络·数据库·低代码·oracle·适配器模式
续写烂尾3 小时前
贴片 SD NAND、eMMC、TF 卡规格怎么定?硬件工程师选型清单
运维·服务器·网络
不昀3 小时前
网口Link Up后仍然掉线,怎样区分物理链路和数据通路问题?
linux·以太网
迪康妍妍3 小时前
终端管控实操:封堵网盘与IM外发通道的落地思路
运维·网络·安全·架构·安全性测试
sxgzzn3 小时前
如何选择合适的开关柜在线监测工具?
运维·重构·无人机·开关柜局放在线监测·光伏运维管理系统
Lhan.zzZ4 小时前
Qt WebEngineView 在 Linux 上无法加载网页:从“看不见 HTML“到“禁用沙箱“
linux·c++·qt
zxcvb1534 小时前
运维经验分享:监控网页更新内容的几种思路
运维
Fcy6485 小时前
Linux下 多路转接select详解
linux·select·多路转接
云飞云共享云桌面5 小时前
设计师共享单台图形服务器,解决 SolidWorks大装配卡顿难题
运维·服务器·3d·自动化·电脑·制造