Why do cloud images have KVM labeled kernel as Guest? It seems KVM is most relevant for the Host. Maybe they are optimized for the Host, but I'm having to use the generic Linux kernel to get Desktops to work. Am I missing any performance by doing so? If not, why do the Guests use the KVM labeled kernel then?
I'm going to self-answer what I found, but dont hesitate to add to it.
Installing the linux-generic kernel took about 1GB of disk space. It turns out the kvm kernel is only about 6mbs according to apt show linux-image-5.4.0-1049-kvm. So yes, I likely need all that extra stuff to run the Desktop graphic display.
I could share the kernel externally to the VM to save space, but would have to make sure the Host included it with updates. Looking into a way to include a different distro repo in updates.. (looks like kernels are in security repo like deb http://security.ubuntu.com/ubuntu/focal-security main restricted
), but need to add signature.
Bummer, there is no longer a kernel PPA. Probably for security reasons. The is a script in an answer here, but uses Python:
https://askubuntu.com/questions/47397/how-do-i-add-the-kernel-ppa
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
You can add the public key with apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5 https://raspberrypi.stackexchange.com/questions/115827/updating-from-such-a-repository-cant-be-done-securely-raspberry-pi
However, get errors:
The following packages have unmet dependencies:
linux-image-generic : Depends: linux-firmware but it is not installable
Depends: intel-microcode but it is not going to be installed
Depends: amd64-microcode but it is not installable
Recommends: thermald but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
So it looks like either copy the initrd.img* file over from another OS (possibly inside an ISO or VM image), or install it in the Guest VM to keep it up to date. The former allows sharing between VMs, the latter does not, but can have automatic updates.
I dont see a place to download the initrd.img and vmlinuz files directly. Please correct me if Im wrong.
Related
First of all I'm sorry if someone already did this question, in this case please paste the link here because I didn't find anything.
I'm learning vagrant, using virtualbox i don't have problem in running VM, but if I would like to use VMware as provider. I encounter this message and I can't find a way to get out of this.
I think everything is well configured but obviously something is wrong.
When I launch vagrant up --provider=vmware_desktop, I have this error message:
Vagrant encountered an unexpected communications error with the
Vagrant VMware Utility driver. Please try to run the command
again. If this error persists, please contact support#hashicorp.com
I'm currently using Fedora 35
Operating System: Fedora Linux 35 (Workstation Edition)
Kernel: Linux 5.17.5-200.fc35.x86_64
Architecture: x86-64
I have followed this thread:
https://github.com/hashicorp/vagrant-vmware-desktop/issues/22
and someone had prepared a nice gist -- which I copied below just in case the gist link wasn't anymore.
My issue was mainly the Vagrant 2.2.19 which somehow was not ok with VMWare. 2.2.18 worked fine. Just make sure you follow the above gist step by step.
https://gist.github.com/sbailliez/f22db6434ac84eccb6d3c8833c85ad92
My issue was mainly the Vagrant 2.2.19 which somehow was not ok with VMWare. 2.2.18 worked fine. Just make sure you follow the above gist step by step.
Vagrant and VMWare Tech Preview on Apple M1 Pro
This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated
from discussions in https://github.com/hashicorp/vagrant-vmware-desktop/issues/22
Installing Rosetta
First install Rosetta if not already done, this is needed to run x86 code:
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
Installing Vagrant
Install Vagrant via brew or install it manually. Note that I use 2.2.18 as 2.2.19 did not work for me. (YMMV)
brew install vagrant#2.2.18
Installing VMWare Fusion Tech Preview
You will need to create an account on vmware as it needs user and key information that are user specific.
The registration process is kinda convoluted. Be careful about passwords as the password needs to be less than 20 characters and there are no error messages for this.
You can download the tech preview via the download page.
Once this is installed you will NEED to create a symlink as the vagrant vmware utility etc.. assumes that vmware is installed in a specific directory and the tech preview is installed in a different one.
ln -s /Applications/VMWare\ Fusion\ Tech\ Preview.app /Applications/VMWare\ Fusion.app
Installing Vagrant VMWare provider
It requires two steps. This is detailed in the documentation but follow the steps below:
First go to Vagrant vmware Utility and download the binary and install it. It says x86_64 but it is fine.
The direct link is:
https://releases.hashicorp.com/vagrant-vmware-utility/1.0.21/vagrant-vmware-utility_1.0.21_x86_64.dmg
It needs to be version 1.0.21
Next install the provider:
vagrant plugin install vagrant-vmware-desktop
Create a Vagrant file
Create a file Vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "spox/ubuntu-arm"
config.vm.box_version = "1.0.0"
end
Run vagrant
vagrant up
and then
vagrant ssh
Hopefully this should work and you should find yourself with mostly everything working.
Troubleshooting
I have observed various issues that makes the whole experience unstable or creating conflicts.
vagrant 2.2.19 is broken
I have had issues trying to run vagrant 2.2.19. Use 2.2.18
vagrant-vmware provider forwarded ports bound
If you declare forwarding port on your box, for some reasons the provider persists them and keeps it bound in LISTEN state even after you do a vagrant halt.
You can check this using something like:
sudo lsof -i -P | grep LISTEN | grep 'vagrant-v'
You can see the ports are stored in:
cat /opt/vagrant-vmware-desktop/settings/portforwarding.json
To stop the provider use:
sudo launchctl unload -w /Library/LaunchDaemons/com.vagrant.vagrant-vmware-utility.plist
To start it again, use load instead of unload.
nfs exports conflicts
If your vagrant box uses nfs, it seems to pollute the /etc/exports file with duplicate or stale entries over time which will cause vagrant to get angry at you at some point. You may need to prune the entries. It seems related to vagrant#11418
I encountered this same issue you had with the architecture compatibility while trying to set up VM on my Mac M1. Found my solution in this GitHub thread
I just added this lines to the Vagrantfile
config.vm.provider :vmware_desktop do |v|
v.vmx["ethernet0.pcislotnumber"] = "160"
end
I'm trying to resize a qcow2 img I created and installed a guest mac os. When I try to use virt-resize I get the following error:
virt-resize: error: libguestfs error: /usr/bin/supermin exited with error status 1.
This seems to have to do with not being able to access the kernel or wrong permissions on the kernel. I'm running Ubuntu via WSL2 and I'm not sure how to give libguestfs-tools access to the kernel WSL2 runs on. How would you do this?
This comes about because there's not really a good way (at least, not any obvious one after a bit of time with Google) to get access to the WSL2 kernel from within WSL2 without custom-compiling your own.
In lieu of that, libguestfs-tools will work just fine if you install the normal Ubuntu kernel packages and do the usual Ubuntu follow-up step for libguestfs-tools:
sudo apt install linux-image-generic-hwe-20.04
sudo chmod go+r /boot/vmlinuz-*
This will populate your /boot and /lib/modules/* directories with a kernel that will satisfy libguestfs-tools.
I would like to install a custom kernel image on a Google Compute Engine instance. I have an instance running with:
foo#instance-1:/boot/efi$ uname -a
Linux instance-1 4.10.0-22-generic #24-Ubuntu SMP Mon May 22 17:43:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
And I've built and installed my kernel image:
sudo dpkg -i linux-image-4.10.0-rc8.10.0-rc8_amd64.deb
It shows up in the grub configuration file, I've set the default grub menu item to correct number, and I've run
sudo update-grub
Yet, when I reboot, I get the same kernel I started with.
Google documentation on this seems to be non-existent. There is one spot that suggests I might have to create the image externally, install the kernel, and import it. However, I will need to do this a lot, so I'd rather just install new kernels the old fashioned way.
Turns out that in Google's stock Ubuntu image, there's a grub config file:
/etc/default/grub.d/50-cloudimg-settings.cfg
that overrides what's in
/etc/default/grub
Editing the first file got everything working.
Before attempting this, I assume you have a fallback option? Some way of falling back to your current state. This is important because it seems you may not have physical access to the system.
Please check what /boot/grub/grub.cfg shows as default kernel. It will be a section beginning with menuentry and under that, an entry starting with linux. If that points to /boot/<default-kernel> then that's what you need to update along with initrd entry so that both kernel image and initramfs point to your custom kernel.
Also, it's possible that boot order of kernel images is alphabetical so newer kernel images (later in alphabetical order) have preference over older ones. In that case if you can change kernel image's file name to be higher than default kernel image, and same for the corresponding initramfs and config files (they will all be similarly named) and then run update-grub that may be quicker way of booting into your custom kernel. You can find those files under /boot/.
What worked for me was going into /boot/ and removing the old images and then running sudo dpkg -i <new_image> and rebooting the system with sudo reboot
I am trying to get a virtual machine working with Vagrant. Everything seems to run fine and it begins to unpack/install all the needed files. But every single time it just stalls when I get to this point.
==> default: Setting up grub-pc (2.02~beta2-36ubuntu3.11) ...
Here is a screen shot of what is going on:
I shut down the virtual machine and booted it back up. I can ssh into it but nothing seems to work. By this I mean there is no psql, no SQLAlchemy. These, among other things, are supposed to be set up in the VM. It seems as if it halts before installing the necessary software.
I've tried vagrant destroy and reinstalling, downloading a new image in case that one was corrupt and I tried reinstalling Vagrant. I am running Vagrant 1.9.5
Looks like you're provisioning with shell commands. I'm guessing that there's some sort of install prompt that's coming up and demanding some sort of user interaction / response. Because vagrant's handling the provisioning behind the scenes, you can't respond to the prompt and the install is not continuing.
You should be able to fix the issue by editing your Vagrantfile. As a guess, it looks like grub-pc is causing the issue (there's actually a grub-pc command prompt in the image you shared). See if you can figure out which package is installing grub-pc. If you're lucky, the problem can be solved by piping in a yes along with the install command (which will automatically answer yes to all install questions). This looks something like yes | sudo apt-get install grub-pc. If grub-pc is being installed as part of another package, you'll need to do some educated guessing to figure out which package is installing it and adding the yes | apt-get pipe to that install line (or just add the pipe before every install line).
This being said, I ran into an issue when I was installing the Java SDK on vagrant, where Oracle was demanding I accept their terms of use before the install would complete and a yes pipe wouldn't solve the issue. I was able to fix it by searching the web for "silent java sdk install via command line". If you can figure out which package is causing the issue, and a yes pipe isn't enough, searching for how to "silently" install that package via command line should help.
UPDATE
As you can see in a comment on this answer
Unfortunately a yes pip didn't do the trick this time but a quick
search on how to "silently" install grub led me to this.
DEBIAN_FRONTEND=noninteractive apt-get -y -o
Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
upgrade . After editing my Vagrant file it worked perfectly
I installed Debian-jesse on Virtualbox. However, the max screen size is 1024 x 768. I have a larger monitor that can have a larger window size. Does anyone have any thoughts on how I can increase that? If I drag the window edge, a white band comes around the Debian window, but I can't use it. I installed dkms as suggested by other threads, but that doesn't fix it.
You need to have the contrib section in your apt sources in your jessie guest system. You might need to add contrib to the respective line in your /etc/apt/sources.list, like so
deb http://ftp.debian.org/debian/ jessie main contrib
Then, as root, run
apt update
apt install virtualbox-guest-x11
and reboot the guest system (restarting its X server may also suffice).
If you have manually configured your X server in the guest system, an idea would be to move /etc/X11/xorg.conf out of the way, if it exists. Or, more bluntly, to purge xserver-xorg, reinstall, and then reinstall the guest additions.