-
Notifications
You must be signed in to change notification settings - Fork 69
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
Ubuntu Server fails #2
Comments
How did you obtain the kernel and initrd files ? I'm trying to find this since yesterday 😅 |
You can find vmlinuz and initrd inside the iso image. (I used Keka to mount it). For the vmlinuz, you have to copy it, then rename it as .gz and extract. |
Did you do anything to the initrd file ? |
no |
if you type exit at the prompt, it may give you some insight at what is going on. |
try with |
I got this after connect with screen /dev/ttys002 waiting message:
How I am create the disc /Users/peter/VM/VM-Ubuntu.dmg ? |
Create an empty disc with the MacOS disk utility. The virtual machine failed to start! |
Hi all (I'm late to the thread, real life intervened) :) I've just tried an ubuntu-server ISO again, and can re-create. Two things to note:
Notes on installers:
However.... I don't believe running the installers is as easy as it sounds at this stage: once the packages are installed to your disc.img, then you'll need to fish out a kernel/initrd from the installed image, back to macOS, to boot it. (The initrd and likely the kernel will be different to those the installer uses.) For this reason, enduring a chicken & egg situation and solving with another Linux box is IMO the easiest route currently. For example, installing Ubuntu or Debian using debootstrap, something like:
That doesn't help anyone that's desperate to use CentOS/Fedora etc. :) Anyone know if they have a debootstrap equivalent? Finally: legend has it that there will be an EFI-related boot method in future, which may pave the way to booting ISOs (or even OVMF/edk2) directly, and that removes all of this faffing around with finding kernels/initrds. Hopefully a future macOS release will provide, here. |
Oh dear -- I haven't seen this error before. The disc simply needs to be a file that exists and is of the size you want to use. For example, But, see my previous message -- at this stage it is probably easiest to use Virtualization.framework/vftool with a disc image that is pre-installed elsewhere, unfortunately. Someone suitably motivated could perhaps write a script to extract kernels/initrds from a distribution install ISO, run the installer and then re-extract kernels/initrd from the installed disc, perhaps. I'll see if I can recreate that error, though, how odd. |
I've had good luck with the Ubuntu cloud images linked by a kind user on the MacRumors forums [1]:
Let's assume you place all of these files in a
The initrd (just renaming for convenience):
And finally, the disk image:
With these being cloud images, I want to disable cloud-init, set the root password, generate some SSH host keys, and configure DHCP. To work on the disk image, we'll boot the virtual machine without specifying the root to the Linux command line.
In another terminal, use
Kill the VM with
You can now connect with |
Works well, thanks |
Got to install Ubuntu server on a disk image but not able to boot into it. Tried passing command line arguments to set root directory, doesn't seem to work. Got any idea? stuck on initramfs. |
I use this to install the initramfs
CTRL-C inside the VM Then boot with disk:
|
How I can expand or add a filesystem?
|
I did this with qemu-img installed using brew Then, you will need to resize the fs |
You install the emu with rosetta 2 intel brew? I got the installation error at ny arm brew installation?
|
I install qemu with rosetta 2. I resize the image:'
But after start inside the ubuntu vm the resizing isn't available:
|
The disk info show that the image can grow...
|
Ahh! |
Were you able to boot into the disk? I always end up with the live version? If so, how did you manage to get it boot from the disk as the root! Any help is very much appreciated! |
Now docker is running at the vm. Container Hacking is possible at the M1.... Can I help to document the setup? |
It is a two phase boot process. Frist boot with RAM disk and create the /dev/vda manually without login |
Thanks a ton! But if I reboot won’t I lose the changes since we’re not writing the changes! Correct me if I’m wrong! Can you walk me through the process? That’d be of great help |
a few days ago I created a turn-key ready bundle containing SimpleVM and Ubuntu. the image works with vftool, too: I also made a binary of vftool: |
fwiw, it's not necessary to install qemu (and homebrew on rosetta). Then:
|
Hi, I've started with the finestructure tutorial and ended up here. I also tried with the image, vmlinuz, and initrd posted in a previous comment and I am always getting a My files:
Command: Output:
Any clues on what might be happening? Thanks! |
@rpvilao Are you in a tmux session by chance? |
@pgib thanks for replying. I am using a regular terminal session (zsh) |
@pgib your question gave me an idea... I opened the terminal using rosetta (to make it work with brew), without rosetta it works thanks :) |
I've enabled the "Discussions" GitHub feature which may be of use to capture some of the good info people have provided in this issue. I've noticed a bunch of Linux setup questions posed as vftool issues -- strictly we should create issues only for vftool bugs/requests (otherwise bugs are likely to get lost). I'm glad folks are helping each other out (thanks!), so the wiki/discussions should be a useful place to do this (and would make general Linux tips/info easier to find). |
I'm unfortunate to run into
when attempting to connect with |
@shroomist iTerm? it uses tmux, if so ... |
Does anyone feel that the IO speed in the Ubuntu OS is too slow? It shouldn't be related to the image. |
yep, definitely slower than it should be... |
hey @rossbachp , Ive followed your guide - all works fine. [code] any thoughts? |
Another way to resize image(without qemu):
Then we have the ubuntu.img in 40GB size. |
I did it way simpler using dd to append 20 GB of zeros to the img file (truncate may work just as well), booted the VM, and used resize2fs to resize the filesystem (live!). |
I try the ubuntu server installer.
|
Check out my repo project-mendacius |
Following exaclty #2 (comment) on Macbook Pro 2019 (Intel) using zsh. I get the error everyone else is getting -
Any help would be super appreciated! |
I'm having the issue where the VM will not start as well. Sandbox: com.apple.Virtua(8285) deny(1) syscall-unix 220 Could these be related? |
I've found the solution for the problem with:
I was trying to update the network configuration file: sudo nano /Library/Preferences/SystemConfiguration/com.apple.vmnet.plist
The first vmnet had been I suggest making backups before doing changes in those files. |
I made a small makefile that does the bare minimum in downloading, extracting, and running Just a heads up - if your vm immediately exits, make sure you have downloaded the arm64 ubuntu image, not the amd64 ubuntu image if you are on an M1 mac. Spent an embarrassingly long time with that small issue. |
Check out https://github.com/PraneetNeuro/Project-Mendacius allows you to download images based on the architecture and a user friendly gui based tool |
Is there a way to make share folders between host and guest? |
For the people with the |
In case it helps anyone, as I was tearing my hair out a bit trying to get a consistent setup on Intel and ARM Macs, for our developers... it seems the intel vmlinuz file is compressed differently to the ARM one and does NOT need uncompressed before use. If it helps anyone, here's the full steps for setting up an ubuntu 20.04 server on both intel and arm macs: https://gist.github.com/mungler/c7f67bbb27ddbac01d30a1727c0346b5 |
This comment solved my issue |
I have met an error when I first start the VM by vftool, can you guys have some available solutions? THX!! |
Hello,
I am very interested in trying this.
I am trying ubuntu-20.04.1-live-server-arm64.iso and would like to perform a install. so I also created a DMG. But it does not seems to launch the installer ... do you have an idea what I am doing wrong ?
I use the following parameters
./vftool -k /Users/simonph/Desktop/Ubuntu/UbuntuServer/vmlinuz -i /Users/simonph/Desktop/Ubuntu/UbuntuServer/initrd -d /Users/simonph/Desktop/Ubuntu/VM.dmg -c /Users/simonph/Desktop/Ubuntu/UbuntuServer/ubuntu-20.04.1-live-server-arm64.iso
And here is the console
The text was updated successfully, but these errors were encountered: