<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Karoline,<br>
<div class="moz-cite-prefix">On 24.07.2014 10:29, Karoline Haus
wrote:<br>
</div>
<blockquote
cite="mid:1406190569.4678.YahooMailNeo@web171405.mail.ir2.yahoo.com"
type="cite">
<div style="color:#000; background-color:#fff;
font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial,
Lucida Grande, sans-serif;font-size:12pt">
<div><span>No I'm pretty sure I'm getting the right machine
object and the session is valid as well. I can change other
properties.</span></div>
</div>
</blockquote>
Mysterious... VBoxManage doesn't do anything special in this area.<br>
<br>
<a class="moz-txt-link-freetext" href="https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp#L344">https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp#L344</a><br>
<blockquote
cite="mid:1406190569.4678.YahooMailNeo@web171405.mail.ir2.yahoo.com"
type="cite">
<div style="color:#000; background-color:#fff;
font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial,
Lucida Grande, sans-serif;font-size:12pt">
<div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida
Grande,sans-serif; background-color: transparent; font-style:
normal;"><span>Do I have to call saveSettings() after changing
cableConnected, or will it have immediate effect without
calling saveSettings()?</span></div>
</div>
</blockquote>
The usual rules for runtime settings changes apply: they take
immediate effect, but it's good practice to save such settings. Many
do that automatically (which is kind of inconsistent), but if you
can't change the setting you want it's irrelevant to talk about
saving.<br>
<br>
Klaus<br>
<span></span>
<blockquote
cite="mid:1406190569.4678.YahooMailNeo@web171405.mail.ir2.yahoo.com"
type="cite">
<div style="color:#000; background-color:#fff;
font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial,
Lucida Grande, sans-serif;font-size:12pt">
<div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida
Grande,sans-serif; background-color: transparent; font-style:
normal;"><span>Thanks, Karoline<br>
</span></div>
<div class="qtdSeparateBR"><br>
<br>
</div>
<div style="display: block;" class="yahoo_quoted">
<div style="font-family: HelveticaNeue, Helvetica Neue,
Helvetica, Arial, Lucida Grande, sans-serif; font-size:
12pt;">
<div style="font-family: HelveticaNeue, Helvetica Neue,
Helvetica, Arial, Lucida Grande, sans-serif; font-size:
12pt;">
<div dir="ltr"> <font face="Arial" size="2"> Klaus
Espenlaub <a class="moz-txt-link-rfc2396E" href="mailto:klaus.espenlaub@oracle.com"><klaus.espenlaub@oracle.com></a> schrieb
am 18:56 Mittwoch, 23.Juli 2014:<br>
</font> </div>
<br>
<br>
<div class="moz-signature">Karoline,<br clear="none">
<br clear="none">
On 23.07.2014 16:34, Karoline Haus wrote:<br
clear="none">
> Hi if I use VBoxManage I can disconnect a VM's
virtual network cable<br clear="none">
> using controlvm setlinkstate while the VM is
running but I do not seem<br clear="none">
> to be able to do that via the API/SDK. I don't seem
to find the right<br clear="none">
> commands to set. I tried to set cableConnected of
INetworkAdapter but it<br clear="none">
> does not allow me to change this while the VM is in
running state. How<br clear="none">
> can I unplug the cable via the API whilst the VM is
running?<br clear="none">
<br clear="none">
This means you're using the wrong Machine object, or
completely lack the <br clear="none">
session handling... it works fundamentally the same way
as if the VM <br clear="none">
isn't running: create a session, get a shared lock (an
exclusive one <br clear="none">
isn't possible while the VM is running), and use the
Machine reference <br clear="none">
associated with this session.<br clear="none">
<br clear="none">
That one is writable.<br clear="none">
<br clear="none">
> Basically I'm trying to simulate a network
connection loss to the VM so<br clear="none">
> that it then tries to obtain a new IP address via
DHCP.<br clear="none">
<br clear="none">
Klaus
<div class="yqt4508456706" id="yqtfd61049"><br
clear="none">
<br clear="none">
><br clear="none">
> Thanks<br clear="none">
> Karoline</div>
<a moz-do-not-send="true" shape="rect"
ymailto="mailto:vbox-dev@virtualbox.org"
href="mailto:vbox-dev@virtualbox.org"></a><a
moz-do-not-send="true" shape="rect"
href="https://www.virtualbox.org/mailman/listinfo/vbox-dev"
target="_blank"></a>
<!-- This signature was generated by the MyDesktop Oracle Business Signature utility version 4.2 -->
</div>
</div>
</div>
</div>
</div>
</blockquote>
</body>
</html>