qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-discuss] Antw: Re: Virtually (dis)connect the ethernet cable


From: Steffen Weißgerber
Subject: [Qemu-discuss] Antw: Re: Virtually (dis)connect the ethernet cable
Date: Wed, 25 Jan 2017 12:14:33 +0100



>>> Vincenzo Romano <address@hidden> schrieb am Mittwoch,
25. Januar
2017 um 12:03:
> Hi Steffen!
> Thanks for the info.
> Is there a way to start a VM with the cable disconnected?

Seems to be similar to setting the password for the console. This is
(as long as I know)
also not possible to configure via start command.

Instead of virsh I use my own startskript, where I read referencing
options from the vm
config file. Then depending on their value the skript sends various
monitor commands
(like console password).

What you could do is simply append a

 '&& echo "set_link virtio-net-pci.0 off" | socat - UNIX-CONNECT:<path
to your monitor socket>'

to your start command for the vm.

Regards

Steffen

> 
> --
> Vincenzo Romano - NotOrAnd.IT
> Information Technologies
> --
> NON QVIETIS MARIBVS NAVTA PERITVS
> 
> 
> 2017-01-25 11:55 GMT+01:00 Steffen Weißgerber
<address@hidden>:
>> Hello,
>>
>> you have to call 'set_link <name> off' wher <name> is the identifier
of the 
> virtual adapter
>> you got from 'info network'.
>>
>> Regards
>>
>> Steffen
>>
>>
>>>>> Vincenzo Romano <address@hidden> schrieb am
Mittwoch, 25. Januar
>> 2017 um 10:23:
>>> I'd like to know how to virtually disconnect and connect the
ethernet
>>> cable on a VM (I am using virtio).
>>> When "disconnected", the ethernet adapter should still be visible
by
>>> the guest, but with the cable being disconnected.
>>> I mean, both the command line and the monitor commands.
>>> TIA.
>>>
>>> --
>>> Vincenzo Romano - NotOrAnd.IT
>>> Information Technologies
>>> --
>>> NON QVIETIS MARIBVS NAVTA PERITVS
>>
>>
>> --
>> Klinik-Service Neubrandenburg GmbH
>> Allendestr. 30, 17036 Neubrandenburg
>> Amtsgericht Neubrandenburg, HRB 2457
>> Geschaeftsfuehrerin: Gudrun Kappich

--
Klinik-Service Neubrandenburg GmbH
Allendestr. 30, 17036 Neubrandenburg
Amtsgericht Neubrandenburg, HRB 2457
Geschaeftsfuehrerin: Gudrun Kappich



reply via email to

[Prev in Thread] Current Thread [Next in Thread]