Can Linux Container run on a virtual machine? [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
As far as I know, Linux container is different from virtual machine. It's lightweight virtualization technology. So I'm wondering if it can be run on a virtual machine which provisioned by hypervisor like xen, kvm or vmware?
I was trying setup a Linux container(docker + LXC userspace tool) on a virtual machine based on zex. It failed.
[root#docker lib]# service docker start
Starting cgconfig service: Error: cannot mount cpuset to /cgroup/cpuset: Device or resource busy
/sbin/cgconfigparser; error loading /etc/cgconfig.conf: Cgroup mounting failed
Failed to parse /etc/cgconfig.conf [FAILED]
Starting docker: [ OK ]
and if trying to run a container:
root#docker lib]# docker run -i -t ubuntu /bin/echo hello world
lxc-start: error while loading shared libraries: liblxc.so.1: cannot open shared object file: No such file or directory
2014/03/27 14:03:27 Error: start: Cannot start container da0d674d3e31a7c36a9e352f64fd84986cbb872e526cb2dd6adb7473d4f5a430: exit status 127
Actually, I followed a blog to do, the author made it, while I screw it.
Any one can explain that? Or simply tell me it can not be ran on a virtual machine. Really appreciate.

Yes, it can. If your VM's operating system supports the appropriate filesystems, and have containers. I suggest you go though as suggested on https://www.docker.io/gettingstarted/ and use a recent Ubuntu release, since that is known to work.

Related

Cannot mount windows share on boot using fstab [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 12 months ago.
Improve this question
I've got a problem on Debian 10.11 (but I think it's not only Debian related) with onboot mounting Windows share.
cifs-utils 2:6.8-2 amd64 Common Internet File System utilities
cat /etc/fstab | grep share2
gives
//10.100.0.204/share2 /home/share2 cifs auto,vers=default,rw,file_mode=0775,dir_mode=0775,noperm,gid=100,username=user1,password=passwordhard 0 0
When I type:
command mount /home/share2 Works as expected.
dmesg gives me an errors:
[ 5.045482] CIFS VFS: Error connecting to socket. Aborting operation.
[ 5.046471] CIFS VFS: cifs_mount failed w/return code = -101
I think that linux tries too early to mount samba shares.
What can I do about it?
I know that I can use crontab and:
#reboot root sleep 15; mount /home/share2
as workaround but I like resolving problems at source.
If the problem is indeed samba service is loading too fast.
It is possible to edit samba service file.
Add Requires=<a service-name that need to be loaded prior to samba>
This trick is the official pattern to control/manage/order systemd service loading.

qemu-x86_64-static Exec format error after chroot [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I am on termux with root permission.
My phone has aarch64 cpu architecture.
I'm trying to chroot a ubuntu filesystem with amd64 architecture
i've seen and this https://unix.stackexchange.com/a/222981
here's my command
sudo chroot ubuntu /bin/qemu-x86_64-static /bin/bash --login
i logged in successfully but when i run command
ls or any
it's give an error like Exec format error
then i tried that command with qemu-x86_64-static like qemu-x86_64-static /bin/ls it's execute successfully
any idea for this???
i think i can add alias for all command for starts with qemu-x86_64-static but that's not good idea...
You need to tell the kernel that when it sees an arm64 binary it should run it by launching QEMU. The mechanism for this is called "binfmt-misc", and to configure it you need to write data in the correct format to special files in the host system's /proc/sys/fs/binfmt_misc/ directory. Most Linux distros will do this for you automatically when you install their QEMU packages, but obviously Android won't do this for you.
First check that your phone's kernel has binfmt-misc support compiled in at all: there should be a file /proc/sys/fs/binfmt_misc/status and if you cat its contents it should read enabled. If not, try modprobe binfmt_misc. If after that the status file is still not there then you won't be able to get this working unless you can somehow build a new kernel for your phone.
If the support is present in your phone's kernel, you can try the qemu-binfmt-conf.sh script that upstream QEMU ships as a mechanism for registering QEMU with the binfmt-misc machinery:
https://github.com/qemu/qemu/blob/master/scripts/qemu-binfmt-conf.sh
(This is just a script which writes the correct lines of data to /proc/sys/fs/binfmt_misc/register.)

Error while installing Antmedia on windows using ubuntu terminal [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I was trying to install antmedia and at the time of running the server i got the error :
System has not been booted with systemd as init system (PID 1). Can't
operate.
These are the steps i followed:
Step 1:
wget https://github.com/ant-media/Ant-Media-Server/releases/download/ams-v2.1.0/ant-media-server-2.1.0-community-2.1.0-20200720_1340.zip
Step 2:
unzip ant-media-server-2.0.0-community-2.0.0-20200504_1842.zip
Step 3:
wget https://raw.githubusercontent.com/ant-media/Scripts/master/install_ant-media-server.sh && chmod 755 install_ant-media-server.sh
Step 4:
sudo ./install_ant-media-server.sh ant-media-server-2.0.0-community-2.0.0-20200504_1842.zip
Step 5:
service antmedia status
After runnning "Step 4" I got the error at the last.
Any Solution for this?
or
Am I doing something wrong?
The error I got:
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
E: Command line option 'y' [from -y] is not understood in combination with the other options.
update-alternatives: error: no alternatives for mozilla-javaplugin.so
update-java-alternatives: plugin alternative does not exist: /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/IcedTeaPlugin.so
System has not been booted with systemd as init system (PID 1). Can't operate.
antmedia: unrecognized service
antmedia: unrecognized service
There is a problem in installing the ant media server. Please send the log of this console to contact#antmedia.io
ScreenShot of Terminal
As I understand, you are using Ant Media Server in Ubuntu environment with Windows system. We recommend using Ant Media Server as a start.sh script instead of a service. The other choice is using Ant Media Server in Virtualbox or Vmware.

Migrate from LXC to LXD [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
I have installed LXC(Linux Containers) on Ubuntu Server 14.4 Host and i have some virtual servers running on it,but now i want to migrate all these containers to LXD, i have worked so hard configuring these containers and i don't want to lose all of these configurations.
This is my sketch:
HOST
Ubuntu Server LXC
Container Container Container
Ubuntu 12 Ubuntu 12 CentOS
Is there any way to do it?
Thanks
As I said in migrating lxc to lxd, you can do so by creating a dummy LXD container and replacing its rootfs, then updating some of the config to match your LXC container's configuration.
Specifically, if your source container was privileged, you'll want to set security.privileged=true at least until such time as you have confirmed your workload works properly unprivileged (just set security.privileged=false and restart the container with "lxc restart").
If you talk about: http://www.ubuntu.com/cloud/tools/lxd I think it's very early to start with it.
I have started to follow this project with first initial commit 3 month before. There wasn't release yet.
PS:
Getting started with LXD
Our OpenStack container capability, codenamed nova-compute-flex is included in Ubuntu OpenStack for Juno, which you can download via the Ubuntu Cloud Archive. Simply type the following commands to enable and use it:
sudo add-apt-repository cloud-archive:juno
sudo apt-get update
sudo apt-get install nova-compute-flex
OpenStack Juno is available for Ubuntu Server 14.04 LTS and 14.10.

Unable to access “Drive:” [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I've installed both windows 8 and Linux 3.8.0-35-generic on my Laptop.
I'm unable to access the other drives other than one in which Linux has been installed.
It is showing following error. Casket is name of the partition.
Error mounting /dev/sda4 at /media/rancher/Casket: Command-line `mount -t "ntfs" -o
"uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,dmask=0077,fmask=0177" "/dev/sda4" "/media/rancher/Casket"' exited with non-zero exit status 14: The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Failed to mount '/dev/sda4': Operation not permitted
The NTFS partition is in an unsafe state. Please resume and shutdown
Windows fully (no hibernation or fast restarting), or mount the volume
read-only with the 'ro' mount option.
I thought shutting down windows properly would solve the problem ,but no change.
Is there any other way to shut down windows properly. Or any other way to access the contents of the drives.
Did you try the suggestion at the bottom of that error message - mounting the filesystem read-only?
sudo mount -o ro -t auto /dev/sda4 /media/rancher/Casket
Or just add the -o ro to your /etc/fstab file for the /dev/sda4.

Resources