Francesco Romani
2016-Apr-07 12:26 UTC
[libvirt-users] how to list and kill existing console sessions to VMs?
Hi everyone, If a VM is configured to have a console attached to it, like using http://libvirt.org/formatdomain.html#elementCharConsole Libvirt offers access to VM serial console's using the virDomainOpenConsole API[1] However, I didn't find a way to 1. list the existing connections to the console 2. kill an existing connection - without reconnecting using VIR_DOMAIN_CONSOLE_FORCE[2] Am I missing something? How can I do that? Rationale for my request oVirt [3] offers a management interface for VMs, and we have recently integrated user-friandly VM serial console access [4] in the system; in the future release we want to enhance the administation capabilities allowing to check existing connections and to terminate them (maybe because it got stuck). +++ [1] http://libvirt.org/html/libvirt-libvirt-domain.html#virDomainOpenConsole [2] http://libvirt.org/html/libvirt-libvirt-domain.html#VIR_DOMAIN_CONSOLE_FORCE [4] http://www.ovirt.org/ [5] https://www.ovirt.org/develop/release-management/features/engine/serial-console/ et. al. -- Francesco Romani RedHat Engineering Virtualization R & D Phone: 8261328 IRC: fromani
TomK
2016-Apr-07 23:32 UTC
[libvirt-users] Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path
Hey All, I've an issue where libvirtd tries to access an NFS mount but errors out with: can't canonicalize path '/var/lib/one//datastores/0 . The unprevilidged user is able to read/write fine to the share. root_squash is used and for security reasons no_root_squash cannot be used. On the controller and node SELinux is disabled. [oneadmin@mdskvm-p01 ~]$ virsh -d 1 --connect qemu:///system create /var/lib/one//datastores/0/38/deployment.0 create: file(optdata): /var/lib/one//datastores/0/38/deployment.0 error: Failed to create domain from /var/lib/one//datastores/0/38/deployment.0 error: can't canonicalize path '/var/lib/one//datastores/0/38/disk.1': Permission denied I added some debug flags to get more info and added -x to the deploy script. Closest I get to more details is this: 2016-04-06 04:15:35.945+0000: 14072: debug : virStorageFileBackendFileInit:1441 : initializing FS storage file 0x7f6aa4009000 (file:/var/lib/one//datastores/0/38/disk.1)[9869:9869] 2016-04-06 04:15:35.954+0000: 14072: error : virStorageFileBackendFileGetUniqueIdentifier:1523 : can't canonicalize path '/var/lib/one//datastores/0/38/disk.1': https://www.redhat.com/archives/libvir-list/2014-May/msg00194.html Comment is: "The current implementation works for local storage only and returns the canonical path of the volume." But it seems the logic is applied to NFS mounts. Perhaps it shouldn't be? Anyway to get around this problem? This is CentOS 7 . Cheers, Tom K. ------------------------------------------------------------------------------------- Living on earth is expensive, but it includes a free trip around the sun.
Peter Krempa
2016-Apr-08 12:07 UTC
Re: [libvirt-users] how to list and kill existing console sessions to VMs?
On Thu, Apr 07, 2016 at 08:26:20 -0400, Francesco Romani wrote:> Hi everyone, > > If a VM is configured to have a console attached to it, like using > > http://libvirt.org/formatdomain.html#elementCharConsole > > Libvirt offers access to VM serial console's using the virDomainOpenConsole API[1] > However, I didn't find a way to > 1. list the existing connections to the console > 2. kill an existing connection - without reconnecting using VIR_DOMAIN_CONSOLE_FORCE[2] > > Am I missing something? How can I do that?Neither of those is possible currently.> > Rationale for my request > oVirt [3] offers a management interface for VMs, and we have recently integrated user-friandly > VM serial console access [4] in the system; in the future release we want to enhance the administation > capabilities allowing to check existing connections and to terminate them (maybe because it got stuck).I think the plan that danpb has in this aspect is to use virlogd to distribute the console output to almost any number of clients, which would solve this kind of problem. Additionally, doesn't oVirt use just one connection from VDSM for this purpose. In that case it's rather trivial to know which connection (to libvirt) has currently opened console stream. ;) Peter
TomK
2016-Apr-09 15:08 UTC
Re: [libvirt-users] Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path
Adding in libvir-list. Cheers, Tom K. ------------------------------------------------------------------------------------- Mobile: 416 618 8456 Home: 905 857 9652 Living on earth is expensive, but it includes a free trip around the sun. On 4/7/2016 7:32 PM, TomK wrote:> Hey All, > > I've an issue where libvirtd tries to access an NFS mount but errors > out with: can't canonicalize path '/var/lib/one//datastores/0 . The > unprevilidged user is able to read/write fine to the share. > root_squash is used and for security reasons no_root_squash cannot be > used. > > On the controller and node SELinux is disabled. > > [oneadmin@mdskvm-p01 ~]$ virsh -d 1 --connect qemu:///system create > /var/lib/one//datastores/0/38/deployment.0 > create: file(optdata): /var/lib/one//datastores/0/38/deployment.0 > error: Failed to create domain from > /var/lib/one//datastores/0/38/deployment.0 > error: can't canonicalize path '/var/lib/one//datastores/0/38/disk.1': > Permission denied > > I added some debug flags to get more info and added -x to the deploy > script. Closest I get to more details is this: > > 2016-04-06 04:15:35.945+0000: 14072: debug : > virStorageFileBackendFileInit:1441 : initializing FS storage file > 0x7f6aa4009000 (file:/var/lib/one//datastores/0/38/disk.1)[9869:9869] > 2016-04-06 04:15:35.954+0000: 14072: error : > virStorageFileBackendFileGetUniqueIdentifier:1523 : can't canonicalize > path '/var/lib/one//datastores/0/38/disk.1': > > https://www.redhat.com/archives/libvir-list/2014-May/msg00194.html > > Comment is: "The current implementation works for local > storage only and returns the canonical path of the volume." > > But it seems the logic is applied to NFS mounts. Perhaps it shouldn't > be? Anyway to get around this problem? This is CentOS 7 . > > Cheers, > Tom K. > ------------------------------------------------------------------------------------- > > Living on earth is expensive, but it includes a free trip around the sun. > > _______________________________________________ > libvirt-users mailing list > libvirt-users@redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users
Possibly Parallel Threads
- Re: Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path
- Re: [libvirt] Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path
- Re: [libvirt] Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path
- Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path
- Re: [libvirt] Libvirtd running as root tries to access oneadmin (OpenNebula) NFS mount but throws: error: can’t canonicalize path