Control KVM guest Linux OS using Java without network access


User 1050755

I know there are

kvm -stdio

A kvm guest can be accessed without setting up a network. But this is slow and can be cumbersome. Is there a better solution? I want to run commands and transfer data.

The main problem is that I don't want to run anything with root privileges, and I don't want to have a local bridged network requirement for ssh access, as this requires specific host configuration that user ad-hoc can't do. Maybe there are other options? User network etc?

User 1050755

From http://www.linux-kvm.org/page/Networking :

kvm -hda img -device e1000,netdev=user.0 \
    -netdev user,id=user.0,hostfwd=tcp::5555-:22 -nographic

User network via port forwarding. Users can listen on ports greater than 1024 and kvm redirects them to port 22. Should work with all tcp (ssh, scp, rsync, telnet, etc).

Related


Install Freebsd as guest OS on kvm without VNC

Nick Notwin I want to run Freebsd as a guest OS on kVM running on Ubuntu server 10.04. All methods mention that VNC is necessary to start and complete the installation process. Can I install freebsd on kVM without using VNC? I would like to have a text based i

Install Freebsd as guest OS on kvm without VNC

Nick Notwin I want to run Freebsd as a guest OS on kVM running on Ubuntu server 10.04. All methods mention that VNC is necessary to start and complete the installation process. Can I install freebsd on kVM without using VNC? I would like to have a text based i

How to access KVM guest console without password?

Chris How do I configure a KVM guest running CentOS to allow passwordless console access from the hypervisor? I would like to be able to log in directly to the virtual machine from the hypervisor using the following command without being prompted for a passwor

How to access KVM guest console without password?

Chris How do I configure a KVM guest running CentOS to allow passwordless console access from the hypervisor? I would like to be able to log in directly to the virtual machine from the hypervisor using the following command without being prompted for a passwor

kvm guest network issue

Order I have a server running kvm that has been upgraded from ubuntu 13.10 to 14.04 and since the upgrade takes hours (less in some cases) client machines (mix of linux and windows, using both virtio, realtek and intel as the network interface)), network probl

kvm guest network issue

Order I have a server running kvm that has been upgraded from ubuntu 13.10 to 14.04 and since the upgrade takes hours (less in some cases) client machines (mix of linux and windows, using both virtio, realtek and intel as the network interface)), network probl

How to install guest OS (ubuntu server) in kvm without vnc?

Folding I'm definitely not new to KVM/QEMU. I've used HyperV for a long time - but it's easy with a simple GUI ;) So I have used kvm to access the headless ubuntu server via ssh. Now I want to install another ubuntu server as a vm - but I don't have VNC access

How to install guest OS (ubuntu server) in kvm without vnc?

Folding I'm definitely not new to KVM/QEMU. I've used HyperV for a long time - but it's easy with a simple GUI ;) So I have used kvm to access the headless ubuntu server via ssh. Now I want to install another ubuntu server as a vm - but I don't have VNC access

Access the guest's hostname using KVM DNS (Ubuntu 14.04)

Mill I have a guest running ubuntu 14.04 on an Ubuntu 14.04 host running KVM/QEMU. Everything works fine except for one thing. Given my guest's hostname is virtual-machine-1, I want to be able to find it from the host. In particular, if I host virtual-machine-

Access the guest's hostname using KVM DNS (Ubuntu 14.04)

Mill I have a guest running ubuntu 14.04 on an Ubuntu 14.04 host running KVM/QEMU. Everything works fine except for one thing. Given my guest's hostname is virtual-machine-1, I want to be able to find it from the host. In particular, if I host virtual-machine-

Guest Wifi access point without access to parent network

Doug I'm trying to design a guest wifi network for an existing network, but I'm not sure how to secure the guest wifi access point from the parent network when the access point is contained in the parent network. I've tried searching, but I've only gotten resu

Guest Wifi access point without access to parent network

Doug I'm trying to design a guest wifi network for an existing network, but I'm not sure how to secure the guest wifi access point from the parent network when the access point is contained in the parent network. I've tried searching, but I've only gotten resu

Guest Wifi access point without access to parent network

Doug I'm trying to design a guest wifi network for an existing network, but I'm not sure how to secure the guest wifi access point from the parent network when the access point is contained in the parent network. I've tried searching, but I've only gotten resu

Access VirtualBox Mac OS guest on Windows 10 host network

Shahzad Latif | I have a Windows 10 host with an IP address of 192.168.8.101, a subnet mask of 255.255.255.0 and a gateway of 192.168.8.1. I also have Mac OS Sierra installed on VirtualBox on this Windows host. This guest macOS has an IP like 10.0.2.15 and a g

Access VirtualBox Mac OS guest on Windows 10 host network

Shahzad Latif | I have a Windows 10 host with an IP address of 192.168.8.101, a subnet mask of 255.255.255.0 and a gateway of 192.168.8.1. I also have Mac OS Sierra installed on VirtualBox on this Windows host. This guest macOS has an IP like 10.0.2.15 and a g

Access VirtualBox Mac OS guest on Windows 10 host network

Shahzad Latif | I have a Windows 10 host with an IP address of 192.168.8.101, a subnet mask of 255.255.255.0 and a gateway of 192.168.8.1. I also have Mac OS Sierra installed on VirtualBox on this Windows host. This guest macOS has an IP like 10.0.2.15 and a g

Access VirtualBox Mac OS guest on Windows 10 host network

Shahzad Latif | I have a Windows 10 host with an IP address of 192.168.8.101, a subnet mask of 255.255.255.0 and a gateway of 192.168.8.1. I also have Mac OS Sierra installed on VirtualBox on this Windows host. This guest macOS has an IP like 10.0.2.15 and a g

Access VirtualBox Mac OS guest on Windows 10 host network

Shahzad Latif | I have a Windows 10 host with an IP address of 192.168.8.101, a subnet mask of 255.255.255.0 and a gateway of 192.168.8.1. I also have Mac OS Sierra installed on VirtualBox on this Windows host. This guest macOS has an IP like 10.0.2.15 and a g

Access VirtualBox Mac OS guest on Windows 10 host network

Shahzad Latif | I have a Windows 10 host with an IP address of 192.168.8.101, a subnet mask of 255.255.255.0 and a gateway of 192.168.8.1. I also have Mac OS Sierra installed on VirtualBox on this Windows host. This guest macOS has an IP like 10.0.2.15 and a g

Access the console of the Ubuntu 16.04 KVM Guest

Compiler When I added Debian 8 to my KVM management tools , I found that I would not be able to access the console unless added console=ttyS0to the grub boot config . It's not great, but it works. I'm adding Ubuntu 16.04 to the admin tools and this time when I

KVM guest access host USB serial dongle

Sardathrion - Preventing SE Abuse I have a KVM virtual machine running CentOS 7 on a host running Fedora 24. I installed a USB serial dongle (actually an RFID reader, but that should be fine) on that host. The host can see it after running: sudo modprobe usbse

Access the console of the Ubuntu 16.04 KVM Guest

Compiler When I added Debian 8 to my KVM management tools , I found that I would not be able to access the console unless added console=ttyS0to the grub boot config . It's not great, but it works. I'm adding Ubuntu 16.04 to the admin tools and this time when I

KVM guest access host USB serial dongle

Sardathrion - Preventing SE Abuse I have a KVM virtual machine running CentOS 7 on a host running Fedora 24. I installed a USB serial dongle (actually an RFID reader, but that should be fine) on that host. The host can see it after running: sudo modprobe usbse

Suspend/suspend guest in KVM without virsh and libvirtd

User 54 I have installed KVM without libvirt/virsh and virtualmanager. Installed packages are kvm qemu-kvm bridge-utils libguestfs-tools How can I suspend/suspend the VM in this case? User 54 After a long search and experimentation, the best option for me is q

Multiple virsh/kvm guest consoles without graphics

Delphi I have a serial console working for a centos7 guest without graphics and can access it using virsh console vm. The guest has the appropriate console=ttyS0,115200n8kernel command line arguments. Is it possible to configure another console so I can speak

Suspend/suspend guest in KVM without virsh and libvirtd

User 54 I have installed KVM without libvirt/virsh and virtualmanager. Installed packages are kvm qemu-kvm bridge-utils libguestfs-tools How can I suspend/suspend the VM in this case? User 54 After a long search and experimentation, the best option for me is q

Multiple virsh/kvm guest consoles without graphics

Delphi I have a serial console working for a centos7 guest without graphics and can access it using virsh console vm. The guest has the appropriate console=ttyS0,115200n8kernel command line arguments. Is it possible to configure another console so I can speak