Why does âvirsh list --allâ shows running as normal user but âshut offâ with sudo?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
The server1's correct state is shut off but when i run the command as normal user it shows the state as running for normal user and shut off with sudo
[msingh@localhost VMFiles]$ virsh list --all
Id Name State
----------------------------------------------------
1 server1 running
[msingh@localhost VMFiles]$ sudo virsh list --all
[sudo] password for msingh:
Id Name State
----------------------------------------------------
- generic shut off
- server1 shut off
- server2 shut off
- windows shut off
[msingh@localhost VMFiles]$
here is another command:
[msingh@localhost server1]$ sudo virsh dominfo server1
Id: -
Name: server1
UUID: acd31081-b513-4e46-b2a2-20ad6bb9ac2e
OS Type: hvm
State: shut off
CPU(s): 1
Max memory: 1048576 KiB
Used memory: 1048576 KiB
Persistent: yes
Autostart: disable
Managed save: no
Security model: selinux
Security DOI: 0
[msingh@localhost server1]$ virsh dominfo server1
Id: 1
Name: server1
UUID: 8f6fa56a-b062-424a-9100-7f411df1c28b
OS Type: hvm
State: running
CPU(s): 1
CPU time: 18.8s
Max memory: 1024 KiB
Used memory: 2048 KiB
Persistent: yes
Autostart: disable
Managed save: no
Security model: selinux
Security DOI: 0
Security label: unconfined_u:unconfined_r:svirt_t:s0:c290,c658 (enforcing)
centos kvm virsh
add a comment |Â
up vote
0
down vote
favorite
The server1's correct state is shut off but when i run the command as normal user it shows the state as running for normal user and shut off with sudo
[msingh@localhost VMFiles]$ virsh list --all
Id Name State
----------------------------------------------------
1 server1 running
[msingh@localhost VMFiles]$ sudo virsh list --all
[sudo] password for msingh:
Id Name State
----------------------------------------------------
- generic shut off
- server1 shut off
- server2 shut off
- windows shut off
[msingh@localhost VMFiles]$
here is another command:
[msingh@localhost server1]$ sudo virsh dominfo server1
Id: -
Name: server1
UUID: acd31081-b513-4e46-b2a2-20ad6bb9ac2e
OS Type: hvm
State: shut off
CPU(s): 1
Max memory: 1048576 KiB
Used memory: 1048576 KiB
Persistent: yes
Autostart: disable
Managed save: no
Security model: selinux
Security DOI: 0
[msingh@localhost server1]$ virsh dominfo server1
Id: 1
Name: server1
UUID: 8f6fa56a-b062-424a-9100-7f411df1c28b
OS Type: hvm
State: running
CPU(s): 1
CPU time: 18.8s
Max memory: 1024 KiB
Used memory: 2048 KiB
Persistent: yes
Autostart: disable
Managed save: no
Security model: selinux
Security DOI: 0
Security label: unconfined_u:unconfined_r:svirt_t:s0:c290,c658 (enforcing)
centos kvm virsh
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
The server1's correct state is shut off but when i run the command as normal user it shows the state as running for normal user and shut off with sudo
[msingh@localhost VMFiles]$ virsh list --all
Id Name State
----------------------------------------------------
1 server1 running
[msingh@localhost VMFiles]$ sudo virsh list --all
[sudo] password for msingh:
Id Name State
----------------------------------------------------
- generic shut off
- server1 shut off
- server2 shut off
- windows shut off
[msingh@localhost VMFiles]$
here is another command:
[msingh@localhost server1]$ sudo virsh dominfo server1
Id: -
Name: server1
UUID: acd31081-b513-4e46-b2a2-20ad6bb9ac2e
OS Type: hvm
State: shut off
CPU(s): 1
Max memory: 1048576 KiB
Used memory: 1048576 KiB
Persistent: yes
Autostart: disable
Managed save: no
Security model: selinux
Security DOI: 0
[msingh@localhost server1]$ virsh dominfo server1
Id: 1
Name: server1
UUID: 8f6fa56a-b062-424a-9100-7f411df1c28b
OS Type: hvm
State: running
CPU(s): 1
CPU time: 18.8s
Max memory: 1024 KiB
Used memory: 2048 KiB
Persistent: yes
Autostart: disable
Managed save: no
Security model: selinux
Security DOI: 0
Security label: unconfined_u:unconfined_r:svirt_t:s0:c290,c658 (enforcing)
centos kvm virsh
The server1's correct state is shut off but when i run the command as normal user it shows the state as running for normal user and shut off with sudo
[msingh@localhost VMFiles]$ virsh list --all
Id Name State
----------------------------------------------------
1 server1 running
[msingh@localhost VMFiles]$ sudo virsh list --all
[sudo] password for msingh:
Id Name State
----------------------------------------------------
- generic shut off
- server1 shut off
- server2 shut off
- windows shut off
[msingh@localhost VMFiles]$
here is another command:
[msingh@localhost server1]$ sudo virsh dominfo server1
Id: -
Name: server1
UUID: acd31081-b513-4e46-b2a2-20ad6bb9ac2e
OS Type: hvm
State: shut off
CPU(s): 1
Max memory: 1048576 KiB
Used memory: 1048576 KiB
Persistent: yes
Autostart: disable
Managed save: no
Security model: selinux
Security DOI: 0
[msingh@localhost server1]$ virsh dominfo server1
Id: 1
Name: server1
UUID: 8f6fa56a-b062-424a-9100-7f411df1c28b
OS Type: hvm
State: running
CPU(s): 1
CPU time: 18.8s
Max memory: 1024 KiB
Used memory: 2048 KiB
Persistent: yes
Autostart: disable
Managed save: no
Security model: selinux
Security DOI: 0
Security label: unconfined_u:unconfined_r:svirt_t:s0:c290,c658 (enforcing)
centos kvm virsh
edited Jun 6 at 18:56
sourcejedi
18.1k22375
18.1k22375
asked Jun 6 at 12:58
munish
2,448144575
2,448144575
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
By default, sudo virsh
will access the system libvirt instance.
virsh
as an unprivileged user, will try to access the libvirt instance for that user.
You have a VM called server1
in the user instance, and a VM called server1
in the system instance, but these are not the same VM :). Your output shows they have different memory configurations, for example.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
By default, sudo virsh
will access the system libvirt instance.
virsh
as an unprivileged user, will try to access the libvirt instance for that user.
You have a VM called server1
in the user instance, and a VM called server1
in the system instance, but these are not the same VM :). Your output shows they have different memory configurations, for example.
add a comment |Â
up vote
1
down vote
accepted
By default, sudo virsh
will access the system libvirt instance.
virsh
as an unprivileged user, will try to access the libvirt instance for that user.
You have a VM called server1
in the user instance, and a VM called server1
in the system instance, but these are not the same VM :). Your output shows they have different memory configurations, for example.
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
By default, sudo virsh
will access the system libvirt instance.
virsh
as an unprivileged user, will try to access the libvirt instance for that user.
You have a VM called server1
in the user instance, and a VM called server1
in the system instance, but these are not the same VM :). Your output shows they have different memory configurations, for example.
By default, sudo virsh
will access the system libvirt instance.
virsh
as an unprivileged user, will try to access the libvirt instance for that user.
You have a VM called server1
in the user instance, and a VM called server1
in the system instance, but these are not the same VM :). Your output shows they have different memory configurations, for example.
edited Jun 6 at 18:58
answered Jun 6 at 18:53
sourcejedi
18.1k22375
18.1k22375
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f448201%2fwhy-does-virsh-list-all-shows-running-as-normal-user-but-shut-off-with-sud%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password