Hi all,
How can I stop/disable a nic in a virtual guest using a virsh command?? I am searching the same effect like if I unplug network cable ... Is it possible?? I have tried with "detach-interface" command without luck. I don't want to remove the nic from guest configuration, only to stop the nic ...
Thanks.
P.D: Host is CentOS 6.6 x86_64 fully patched.
I don't think it can be done. I would try to remove the VM's vnet from the bridge it's connected to.
HTH Lucian
-- Sent from the Delta quadrant using Borg technology!
Nux! www.nux.ro
----- Original Message -----
From: "C. L. Martinez" carlopmart@gmail.com To: centos-virt@centos.org Sent: Tuesday, 17 February, 2015 08:18:56 Subject: [CentOS-virt] Disable/stop nic in a virtual guest with virsh
Hi all,
How can I stop/disable a nic in a virtual guest using a virsh command?? I am searching the same effect like if I unplug network cable ... Is it possible?? I have tried with "detach-interface" command without luck. I don't want to remove the nic from guest configuration, only to stop the nic ...
Thanks.
P.D: Host is CentOS 6.6 x86_64 fully patched. _______________________________________________ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
On 17/02/15 09:18, C. L. Martinez wrote:
Hi all,
How can I stop/disable a nic in a virtual guest using a virsh command?? I am searching the same effect like if I unplug network cable ... Is it possible?? I have tried with "detach-interface" command without luck. I don't want to remove the nic from guest configuration, only to stop the nic ...
Depending on your network architecture you could just ifdown the vmnet, but this just works if you don't have multiple vms on one vmnet (which you shouldn't).
HTH
On Tue, Feb 17, 2015 at 1:43 PM, Sven Kieske s.kieske@mittwald.de wrote:
On 17/02/15 09:18, C. L. Martinez wrote:
Hi all,
How can I stop/disable a nic in a virtual guest using a virsh command?? I am searching the same effect like if I unplug network cable ... Is it possible?? I have tried with "detach-interface" command without luck. I don't want to remove the nic from guest configuration, only to stop the nic ...
Depending on your network architecture you could just ifdown the vmnet, but this just works if you don't have multiple vms on one vmnet (which you shouldn't).
HTH
--
Ok, to do a ifdown of virtual bridge it seems the only option.
Many thanks to all for your answers.
On Wed, Feb 18, 2015 at 9:10 AM, C. L. Martinez carlopmart@gmail.com wrote:
On Tue, Feb 17, 2015 at 1:43 PM, Sven Kieske s.kieske@mittwald.de wrote:
On 17/02/15 09:18, C. L. Martinez wrote:
Hi all,
How can I stop/disable a nic in a virtual guest using a virsh command?? I am searching the same effect like if I unplug network cable ... Is it possible?? I have tried with "detach-interface" command without luck. I don't want to remove the nic from guest configuration, only to stop the nic ...
There's a qemu monitor command for that. You can pass it in through virsh:
$ virsh qemu-monitor-command --hmp <instance name> 'set_link <nic name> off'
Example: # virsh list Id Name State ---------------------------------------------------- 3 dwarf-00000039 running
# virsh qemu-monitor-command --hmp dwarf-00000039 'info network' net0: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:a8:85:ea \ hostnet0: index=0,type=tap,fd=24
# virsh qemu-monitor-command --hmp dwarf-00000039 'set_link net0 off'
...Juerg
Depending on your network architecture you could just ifdown the vmnet, but this just works if you don't have multiple vms on one vmnet (which you shouldn't).
HTH
--
Ok, to do a ifdown of virtual bridge it seems the only option.
Many thanks to all for your answers. _______________________________________________ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
On Wed, Feb 18, 2015 at 3:10 AM, C. L. Martinez carlopmart@gmail.com wrote:
On Tue, Feb 17, 2015 at 1:43 PM, Sven Kieske s.kieske@mittwald.de wrote:
On 17/02/15 09:18, C. L. Martinez wrote:
Hi all,
How can I stop/disable a nic in a virtual guest using a virsh command?? I am searching the same effect like if I unplug network cable ... Is it possible?? I have tried with "detach-interface" command without luck. I don't want to remove the nic from guest configuration, only to stop the nic ...
Depending on your network architecture you could just ifdown the vmnet, but this just works if you don't have multiple vms on one vmnet (which you shouldn't).
HTH
--
Ok, to do a ifdown of virtual bridge it seems the only option.
Many thanks to all for your answers.
* Definitely look to Juerg Haefliger's solution. It's exactly what you want since you requested a method that can be done from the virsh interface. Thanks Juerg!
1) down the vnetX interface from the host node ip link show dev vnetX ip link set down vnetX ip link show dev vnetX
And if using bridged networking, you have one more option. 2) remove the vnetX interface from the bridge brctl delif <bridge_int> vnetX
Certainly downing the interface using either Juerg's solution via virsh or mine via iproute2 tools is most ideal since it's easier/simpler to reinstate. You can use ifconfig if you prefer it over ip tools, but enjoy those tools and syntax while it remains! [0] ;-)
[0] https://dougvitale.wordpress.com/2011/12/21/deprecated-linux-networking-comm...
I'm dealing with an old Xen 3 server, and badly need to update it and all the vm's on it to more contemporary operating systems. So far, so good!
Can the Xen server on CentOS 5 para-virtualized CentOS 6? And if not, I'm having real trouble getting a live cd or installation media to boot in full virtualization to do the update of the guests.
I'd normally start by updating the Xen server first, but that's not workable right now.
Nico Kadel-Garcia Email: nkadel@gmail.com Sent from iPhone
On Feb 18, 2015, at 11:59, SilverTip257 silvertip257@gmail.com wrote:
On Wed, Feb 18, 2015 at 3:10 AM, C. L. Martinez carlopmart@gmail.com wrote: On Tue, Feb 17, 2015 at 1:43 PM, Sven Kieske s.kieske@mittwald.de wrote:
On 17/02/15 09:18, C. L. Martinez wrote:
Hi all,
How can I stop/disable a nic in a virtual guest using a virsh command?? I am searching the same effect like if I unplug network cable ... Is it possible?? I have tried with "detach-interface" command without luck. I don't want to remove the nic from guest configuration, only to stop the nic ...
Depending on your network architecture you could just ifdown the vmnet, but this just works if you don't have multiple vms on one vmnet (which you shouldn't).
HTH
--
Ok, to do a ifdown of virtual bridge it seems the only option.
Many thanks to all for your answers.
- Definitely look to Juerg Haefliger's solution. It's exactly what you want since you requested a method that can be done from the virsh interface. Thanks Juerg!
- down the vnetX interface from the host node
ip link show dev vnetX ip link set down vnetX ip link show dev vnetX
And if using bridged networking, you have one more option. 2) remove the vnetX interface from the bridge brctl delif <bridge_int> vnetX
Certainly downing the interface using either Juerg's solution via virsh or mine via iproute2 tools is most ideal since it's easier/simpler to reinstate. You can use ifconfig if you prefer it over ip tools, but enjoy those tools and syntax while it remains! [0] ;-)
[0] https://dougvitale.wordpress.com/2011/12/21/deprecated-linux-networking-comm...
-- ---~~.~~--- Mike // SilverTip257 // _______________________________________________ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
Sorry about the accidental bulky quoting! Boston public transit is still slow from storms, and I'm using my phone right now.
Also, has Xen console access gotten any better for fully virtualized guests? I've just been forcibly reminded how awkward it was to access the Linux installation screens to manipulate kickstart setups.
Nico Kadel-Garcia Email: nkadel@gmail.com Sent from iPhone
On Fri, Feb 20, 2015 at 10:07:54AM -0500, Nico Kadel-Garcia wrote:
Sorry about the accidental bulky quoting! Boston public transit is still slow from storms, and I'm using my phone right now.
Also, has Xen console access gotten any better for fully virtualized guests? I've just been forcibly reminded how awkward it was to access the Linux installation screens to manipulate kickstart setups.
I haven't had problems accessing the graphical console of PV or HVM guests. I'm usually using virt-viewer to use the VNC console.
-- Pasi
Nico Kadel-Garcia Email: nkadel@gmail.com Sent from iPhone _______________________________________________ CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt
On Sun, Feb 22, 2015 at 4:41 PM, Pasi Kärkkäinen pasik@iki.fi wrote:
On Fri, Feb 20, 2015 at 10:07:54AM -0500, Nico Kadel-Garcia wrote:
Sorry about the accidental bulky quoting! Boston public transit is still slow from storms, and I'm using my phone right now.
Also, has Xen console access gotten any better for fully virtualized guests? I've just been forcibly reminded how awkward it was to access the Linux installation screens to manipulate kickstart setups.
I haven't had problems accessing the graphical console of PV or HVM guests. I'm usually using virt-viewer to use the VNC console.
-- Pasi
I was referring to the TTY text console, the one that allows manipulation of boot options. It looks like it's still pretty awkward.
Either way, I'm alive right now with fully virtualized CentOS 6 installations. I'd love to switch them to be paravirtualized for the performance benefits, especially since I can't do CD based installations of new hosts on para-virtualized setups, and I don't have a PXE server running for this setup.
On Mon, Feb 23, 2015 at 9:49 PM, Nico Kadel-Garcia nkadel@gmail.com wrote:
On Sun, Feb 22, 2015 at 4:41 PM, Pasi Kärkkäinen pasik@iki.fi wrote:
On Fri, Feb 20, 2015 at 10:07:54AM -0500, Nico Kadel-Garcia wrote:
Sorry about the accidental bulky quoting! Boston public transit is still slow from storms, and I'm using my phone right now.
Also, has Xen console access gotten any better for fully virtualized guests? I've just been forcibly reminded how awkward it was to access the Linux installation screens to manipulate kickstart setups.
I haven't had problems accessing the graphical console of PV or HVM guests. I'm usually using virt-viewer to use the VNC console.
-- Pasi
I was referring to the TTY text console, the one that allows manipulation of boot options. It looks like it's still pretty awkward.
What's awkward about it? When I've passed "serial=pty" in the HVM config file and run "xl console", everything seems to work pretty well for me.
-George
On Mon, Mar 9, 2015 at 2:01 PM, George Dunlap dunlapg@umich.edu wrote:
On Mon, Feb 23, 2015 at 9:49 PM, Nico Kadel-Garcia nkadel@gmail.com wrote:
On Sun, Feb 22, 2015 at 4:41 PM, Pasi Kärkkäinen pasik@iki.fi wrote:
On Fri, Feb 20, 2015 at 10:07:54AM -0500, Nico Kadel-Garcia wrote:
Sorry about the accidental bulky quoting! Boston public transit is still slow from storms, and I'm using my phone right now.
Also, has Xen console access gotten any better for fully virtualized guests? I've just been forcibly reminded how awkward it was to access the Linux installation screens to manipulate kickstart setups.
I haven't had problems accessing the graphical console of PV or HVM guests. I'm usually using virt-viewer to use the VNC console.
-- Pasi
I was referring to the TTY text console, the one that allows manipulation of boot options. It looks like it's still pretty awkward.
What's awkward about it? When I've passed "serial=pty" in the HVM config file and run "xl console", everything seems to work pretty well for me.
And playing with the grub settings. And making sure that the installer correctly handles serial access, which tends to confuse the heck out of anaconda, and has only gotten worse with the pointlessly and insistently graphical installers in CentOS 7.
I'm not blaming the CentOS team, this came from Fedora upstream to RHEL.
On Tue, Mar 10, 2015 at 3:33 AM, Nico Kadel-Garcia nkadel@gmail.com wrote:
On Mon, Mar 9, 2015 at 2:01 PM, George Dunlap dunlapg@umich.edu wrote:
On Mon, Feb 23, 2015 at 9:49 PM, Nico Kadel-Garcia nkadel@gmail.com wrote:
On Sun, Feb 22, 2015 at 4:41 PM, Pasi Kärkkäinen pasik@iki.fi wrote:
On Fri, Feb 20, 2015 at 10:07:54AM -0500, Nico Kadel-Garcia wrote:
Sorry about the accidental bulky quoting! Boston public transit is still slow from storms, and I'm using my phone right now.
Also, has Xen console access gotten any better for fully virtualized guests? I've just been forcibly reminded how awkward it was to access the Linux installation screens to manipulate kickstart setups.
I haven't had problems accessing the graphical console of PV or HVM guests. I'm usually using virt-viewer to use the VNC console.
-- Pasi
I was referring to the TTY text console, the one that allows manipulation of boot options. It looks like it's still pretty awkward.
What's awkward about it? When I've passed "serial=pty" in the HVM config file and run "xl console", everything seems to work pretty well for me.
And playing with the grub settings. And making sure that the installer correctly handles serial access, which tends to confuse the heck out of anaconda, and has only gotten worse with the pointlessly and insistently graphical installers in CentOS 7.
I'm not blaming the CentOS team, this came from Fedora upstream to RHEL.
Ah, right -- my primary hat is as Xen developer, so I thought you were complaining about something on the xen side, not on the installer side. :-)
-George
On Fri, Feb 20, 2015 at 9:56 AM, Nico Kadel-Garcia nkadel@gmail.com wrote:
I'm dealing with an old Xen 3 server, and badly need to update it and all the vm's on it to more contemporary operating systems. So far, so good!
Can the Xen server on CentOS 5 para-virtualized CentOS 6? And if not, I'm having real trouble getting a live cd or installation media to boot in full virtualization to do the update of the guests.
I'd normally start by updating the Xen server first, but that's not workable right now.
Following up: I've gotten full virtualization of CentOS 6 on an SL 5 Xen server by using the "virt-install" command and avoiding manual editing of /etc/xen/ config files.
I've also been reminded, forcibly, of why I hated the "/etc/xen" directory. The lack of distinction between a "/etc/xen/myserfer", the example files there, and any other unqualified files there as valid configation files means making safe backups of the files such as "myserver.hvm" or "myserver.old" quite painful. I wound up putting /etc/xen/ under git source control, just for tracking changes.
On Sat, 2015-02-21 at 13:20 -0500, Nico Kadel-Garcia wrote:
... Following up: I've gotten full virtualization of CentOS 6 on an SL 5 Xen server by using the "virt-install" command and avoiding manual editing of /etc/xen/ config files.
I've also been reminded, forcibly, of why I hated the "/etc/xen" directory. The lack of distinction between a "/etc/xen/myserfer", the example files there, and any other unqualified files there as valid configation files means making safe backups of the files such as "myserver.hvm" or "myserver.old" quite painful. I wound up putting /etc/xen/ under git source control, just for tracking changes.
I use virsh list --all to get currently defined VMs and virsh dumpxml <vm name> to get domain definitions.
On Fri, Feb 20, 2015 at 09:56:46AM -0500, Nico Kadel-Garcia wrote:
I'm dealing with an old Xen 3 server, and badly need to update it and all the vm's on it to more contemporary operating systems. So far, so good! Can the Xen server on CentOS 5 para-virtualized CentOS 6?
Yes, CentOS 5 Xen host can run CentOS 6 PV domUs. Or CentOS 6 HVM guests.
And if not, I'm having real trouble getting a live cd or installation media to boot in full virtualization to do the update of the guests. I'd normally start by updating the Xen server first, but that's not workable right now.
Yeah CentOS 6 runs as Xen HVM (fully virtualized) aswell. With or without PV drivers (PVHVM).
-- Pasi
Nico Kadel-Garcia Email: n[1]kadel@gmail.com Sent from iPhone On Feb 18, 2015, at 11:59, SilverTip257 <[2]silvertip257@gmail.com> wrote:
On Wed, Feb 18, 2015 at 3:10 AM, C. L. Martinez <[3]carlopmart@gmail.com> wrote: On Tue, Feb 17, 2015 at 1:43 PM, Sven Kieske <[4]s.kieske@mittwald.de> wrote: > > > On 17/02/15 09:18, C. L. Martinez wrote: >> Hi all, >> >> How can I stop/disable a nic in a virtual guest using a virsh >> command?? I am searching the same effect like if I unplug network >> cable ... Is it possible?? I have tried with "detach-interface" >> command without luck. I don't want to remove the nic from guest >> configuration, only to stop the nic ... > > Depending on your network architecture you could just ifdown > the vmnet, but this just works if you don't have multiple > vms on one vmnet (which you shouldn't). > > HTH > > -- Ok, to do a ifdown of virtual bridge it seems the only option. Many thanks to all for your answers. * Definitely look to Juerg Haefliger's solution. It's exactly what you want since you requested a method that can be done from the virsh interface. Thanks Juerg! 1) down the vnetX interface from the host node ip link show dev vnetX ip link set down vnetX ip link show dev vnetX And if using bridged networking, you have one more option. 2) remove the vnetX interface from the bridge brctl delif <bridge_int> vnetX Certainly downing the interface using either Juerg's solution via virsh or mine via iproute2 tools is most ideal since it's easier/simpler to reinstate. You can use ifconfig if you prefer it over ip tools, but enjoy those tools and syntax while it remains! [0] ;-) [0] [5]https://dougvitale.wordpress.com/2011/12/21/deprecated-linux-networking-commands-and-their-replacements/ -- ---~~.~~--- Mike // SilverTip257 // _______________________________________________ CentOS-virt mailing list [6]CentOS-virt@centos.org [7]http://lists.centos.org/mailman/listinfo/centos-virt
References
Visible links
- mailto:kadel@gmail.com
- mailto:silvertip257@gmail.com
- mailto:carlopmart@gmail.com
- mailto:s.kieske@mittwald.de
- https://dougvitale.wordpress.com/2011/12/21/deprecated-linux-networking-comm...
- mailto:CentOS-virt@centos.org
- http://lists.centos.org/mailman/listinfo/centos-virt
CentOS-virt mailing list CentOS-virt@centos.org http://lists.centos.org/mailman/listinfo/centos-virt