TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Cloud-Localds Alternative for macOS?

1 点作者 ingvul超过 3 年前
I&#x27;m using qemu to build Ubuntu server VMs on my mac, and I want to use cloud-init to configure the VM. Everything works fine but there is one command I cannot run on my mac:<p><pre><code> cloud-localds -v --network-config=network.cfg ubuntu.img cloud_init.cfg </code></pre> I haven&#x27;t found anything similar to cloud-localds available on Mac. So, it seems that in order to boot my Ubuntu VM I first need to boot another VM to run cloud-localds... a bit frustrating. Do you know how can I achieve the same as the command line above but in MacOS?

2 条评论

ComradePhil超过 3 年前
You can install Docker Desktop and then try running it via Docker.<p>To do so,<p><pre><code> # Run the following once mkdir cloud-image-utils cd cloud-image-utils echo FROM ubuntu &gt; Dockerfile echo RUN apt update &gt;&gt; Dockerfile echo RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends cloud-image-utils &gt;&gt; Dockerfile docker build -t cloud-image-utils . # Now, you will be able to run cloud-localds by running the following docker run -v $(pwd):&#x2F;mnt cloud-image-utils cloud-localds -v --network-config=&#x2F;mnt&#x2F;network.cfg &#x2F;mnt&#x2F;ubuntu.img &#x2F;mnt&#x2F;cloud_init.cfg </code></pre> You can create an alias for the command above to make it easier to use.
ipveesix超过 3 年前
cloud-localds also works on MacOS with a little patch. After all, it&#x27;s a bash script.<p><pre><code> brew install cdrtools wget -O cloud-localds https:&#x2F;&#x2F;github.com&#x2F;canonical&#x2F;cloud-utils&#x2F;raw&#x2F;main&#x2F;bin&#x2F;cloud-localds sed -i &#x27;s&#x2F;genisoimage&#x2F;mkisofs&#x2F;g&#x27; cloud-localds chmod +x cloud-localds</code></pre>