How to add DMA controller to a guest via virt-manager on ARM64 host? - virtual-machine

I created a guest on an ARM64 host (running Centos 8.4). The guest is Debian 11 (ARM64). It seems that there is no DMA controller in the guest, by ls /sys/class/dma (which is empty).
Is there a way to add a DMA controller to the guest (either from virt-manger GUI or from command line)?
From the virt-manager I don't see related options:
This is the overview page of the guest:

Related

Cannot access USB UART in VirtualBox Guest on macos Host

I've created a virtualbox via docker-machine:
$ docker-machine create --driver virtualbox default
Within the Guest-OS I'd like to access my USB-Serial device, which is a Nordic nRF52840 DevKit, which is listed in macos as /dev/tty.usbmodem144241.
However, this device is not listed as USB device by virtualbox. I've also tried adding the devices as a Serial Port with the Port Mode "Host-Device" as described in this link, but without any success:
If I add the Serial Port as .tty-usbmodem the virtualbox will hang in 'Starting', I have to kill all virtualbox processes or disconnect the serial cable in order to start again. If I use .cu-usbmodem the virtualbox starts up but immediately crashes.
I'm running out of ideas here. I'm stuck at this issues since docker for mac does not support the --devices mapping without virtual machine, and for the virtual machine I somehow can't manage to add the port.
Any ideas on what else I could try?
So as it turns out virtualbox is quite picky about when a device is actually connected and does not work as seamlessly as I'm used from using VMWare:
The device I was using really just shows up as SEGGER J-Link in the USB menu
It must be added as filter (filter is really confusing > first I thought it would ignore the device)
The device cannot be added to the virtualbox 'on the fly' (using the USB-icon in the 'Show' window, see screenshot), it must not be connected before the virtualbox starts up.
The serial-tab is irrelevant > it's all handled via the USB tab.
The important fact is that the device must not be connected wenn the virtualbox fires up. So the steps to add a device are the following:
Power down the virtualbox
Make sure the USB controller is enabled
Connect the USB/serial device to the computer (host)
Add it to the filter in the virtual box
Now every time you want to use the device with the virtualbox:
Make sure the virtualbox is down (e.g. docker-machine stop default)
Disconnect the USB/serial device from the computer
Start up the virtualbox (e.g., docker-machine start default)
Virtualbox should now be able to "intercept" the device and list it under /dev, e.g., as /dev/ttyACM0
Un-/Plugging a filtered device once the box is up also works (you don't have to power down the virtualbox again if you forgot to disconnect the device before starting it up. Just wait for the box to be up, unplug, plug in, should be good).

Cannot do Vagrant ssh after Vagrant up on windows Machine

I am building a sample vagrant box to install Jenkins and push it to atlas cloud.Please find below the steps that I followed.
Vagrant init ubuntu/trusty64
and the normal command to initialize the vagrant machine.
vagrant up
After this if i type command to ssh into the machine
vagrant ssh
It gives me error saying please increase timeout and so.
The main question is how can I ssh into the newly created vagrant machine.
To understand this, I have to go through all the basics. Please find below my findings.
Not attached
In this mode, VirtualBox reports to the guest that a network card is present, but that there is no connection -- as if no
Ethernet cable was plugged into the card. This way it is possible to "pull" the virtual Ethernet cable and disrupt the connection, which can be useful to inform a guest operating system that no network connection is available and enforce a reconfiguration.
Network Address Translation (NAT)
If all you want is to browse the Web, download files and view e-mail inside the guest, then this
default mode should be sufficient for you, and you can safely skip the rest of this section. Please note that there are certain limitations when using Windows file sharing (see Section 6.3.3, “NAT limitations” for details).
NAT Network
The NAT network is a new NAT flavour introduced in VirtualBox latest versions.
Bridged networking
This is for more advanced networking needs such as network simulations and running servers
in a guest. When enabled, VirtualBox connects to one of your installed network cards and exchanges network packets directly, circumventing your host operating system's network stack.
Internal networking
This can be used to create a different kind of software-based network which is visible to selected virtual machines, but not to applications running on the host or to the outside world.
Host-only networking
This can be used to create a network containing the host and a set of virtual machines, without the need for the host's physical network interface. Instead, a virtual network interface (similar to a loopback interface) is created on the host, providing connectivity among virtual machines and the host.
Generic networking
Rarely used modes share the same generic network interface, by allowing the user to select a driver which can be included with VirtualBox or be distributed in an extension pack.
At the moment there are potentially two available sub-modes:
UDP Tunnel
This can be used to interconnect virtual machines running on different hosts directly, easily and transparently, over existing network infrastructure.
VDE (Virtual Distributed Ethernet) networking
This option can be used to connect to a Virtual Distributed Ethernet switch on a Linux or a FreeBSD host. At the moment this needs compiling VirtualBox from sources, as the Oracle packages do not include it.
Out of these, only NAT and Host-only network is important.So, to solve this issue, I modified the predefined Vagrant file with the following code.
jenkins.vm.provider "virtualbox" do |vb|
jenkins.vm.network "private_network",ip:'192.168.56.5',:adapter => 2
jenkins.vm.hostname = 'jenkins.ci'
vb.name = "Jenkins"
end
Here, I have created a private network with static Ip and also, I specified the adapters count to use 2. The Private adapter is Host-only adapter and 1st adapter which is default one is NAT.

Connect to junos on VirtualBox (using netconf protocol)

I have done everything like in this article. There is an account (with super-user privileges), password, set netconf ssh and set ssh commands issued along with an ip address (for em0 192.168.56.150/24). My host OS (windows 8.1) for Ethernet adapter VirtualBox Host-Only Network has 192.168.56.101. I have downloaded and "ready to run" Netconf java toolkit (by juniper group). How can I connect to junos instance from java toolkit ? (how to set adressess between host os and juniper os running inside virtualbox)
On junos box:
config# set system services netconf ssh
config# commit
Use the below link to create simple java program on host and the program:
Link
Device device = new Device("junos-box-ip-address", "username-junos", "password-junos", null);

Unable to start X11 through ssh using Putty

Currently trying to setup the mininet virtual machine. I did all according to the instructions. Before proceeding following is my setup details.
My host platform - Windows 8.1
My guest OS : Ubuntu 14.04, 32-bit with mininet. I downloaded the
ovf this one - mininet-2.2.0-141209-ubuntu-14.04-server-i386. Running on VirtualBox
I installed the required packages on the mininet-ubuntu-server (xserver-xorg-core,xserver-xorg,xorg,xorg openbox,ubuntu-desktop). One package fxlrg, I could not install as it was saying "unable to locate package"
Then I used the command "startx" on virtualbox console, it started the ubuntu desktop but very slow and with poping up 4 to 5 errors.
I have already setup the network for host-only adapter, I am able to ping from host machine to guest machine, I am able to ssh from host machine to guest machine using PuTTy. I am able to login with no problems.
But I don't know to see the x11 window from PuTTy. I have already enabled the X11 forwarding on PuTTy and I have already installed the Xming on windows. Please suggest how to debug and how to fix this. I have no idea how to proceed now.
You may need to enable X11 SSH Forwarding in the /etc/ssh/ssh_config file.

Ubuntu on VirtualBox and Rails server

I have Windows 7. Installed VirtualBox and Ubuntu 11.04 as guest OS.
Networking is done by NAT.
Everything is fine: I have internet on Ubuntu.
I can access Windows from Ubuntu by its ip.
But i can't access Ubuntu by it's ip which is shown by ifconfig.
I run rails on Ubuntu.
How can I solve this problem: connect to Ubuntu/Rails server on ort 3000 from my Windows?
By default, VirtualBox's NAT allows the virtual machine to access the Internet ; but doesn't allow the physical machine to access the Virtual one.
The simplest solution would be to use another networking setting than NAT, for your Virtual Machine -- for instance, bridge should work fine (your VM would be visible on your network, though).
Another solution would be to use port forwarding ; about that, this article might help : Howto Access via ssh a Virtualbox Guest machine.
I used to struggle with configuring a similar setup until I found Vagrant. Vagrant makes it very simple to setup, connect to and work with a Linux virtual machine. After Vagrant is configured you can just type vagrant ssh to enter the virtual machine and your account has automatic sudo rights and everything works as expected - you don't even have to deal with logging into the vm. The initial setup for ssh does look to be a little more work under Windows though as you need to configure Putty before you can connect.
There is a simple configuration file in Vagrant that you use to specify which ports from the VM you want forwarded to your machine using a syntax like:
config.vm.forward_port("rails", 80, 3000)
config.vm.forward_port("tomcat", 8000, 8080)
and everything is taken care of. Details are here
If, for example, you are using Rails and you start vagrant with the command vagrant up in your Rails project directory than that directory is available on the VM. Since it is the same shared directory between machines, any changes you make in your Rails project directory on your machine using your regular editor is seen on the VM also. This makes testing in other environments very easy.
Instructions for setting Vagrant up with Windows are here and a RailsCast about it is here. Note that Vagrant has nothing to do directly with Rails - you can use it for setup of any virtual machine environment you need.
In short, you can't.
It is a local host not a public domain therefore not publicly accessible outside of your virtualbox environment.
Maybe someone has a clever hack for this but why would you want to do this in the first place?
Your solution is to either use firefox to browse to your localhost within your virtualbox linux session or develop on windows.
Personally I work the other way round I run Ubuntu 11.04 and I have virtualbox installations of xp, 2,000, me, vista and 7 so I can test in different environments. Inevitably I end up sharing my project folder from Ubuntu so that I can run the project in whatever OS I am testing for.