重新启动Virtual Box后如何获得新的更改?

invzbl3

我正在使用Windows,但在Virtual Box上,我具有用于测试Docker的Linux OS。因此,我想重新启动我的VM以获取仅在重新启动它之后才应用的更改。如文档所述:

如果在虚拟机上进行测试,则可能需要重新启动虚拟机以使更改生效。

1)如果我关闭VM保存状态而不拍摄快照:

在此处输入图片说明

然后像这样重新运行它:

在此处输入图片说明

在Linux终端中重新启动后,我看不到任何更改。

2)如果我重置:

在此处输入图片说明

和我的设置类似(或勾选Live CD / DVD): 在此处输入图片说明

所有更改将被重置,并且将不应用任何内容。

3)如果我拍摄快照并还原它:

在此处输入图片说明

Then I see only the same actions as I have written before but nothing new will be applied.

Can I somehow restart Virtual Box to get new changes that will be applied in addtition to my actions?

Evengard

Restarting in this context is needed to apply some changes in underlying file system and configuration (i.e. loading a different kernel), which may be impossible wihout the restart as they are being used by the system. The restart makes sure that all the resources are freed and that the system can load updated ones without conflicts with previous ones.

When you either save the machine state or take a snapshot, you "freeze" your filesystem and configuration completely. So, a restart after restoring from the machine state or snapshot won't do what you are attempting to - it won't load new files and configurations, because you froze them.

It seems that you are using a LiveCD which doesn't save the data onto the HDD (the VDI file). Each "normal" reboot is making the system clean again, and snapshots won't help because you will be entering the "freeze" pitfall as described above.

您在这里拥有的唯一解决方案是在虚拟机HDD(VDI文件)上实际安装系统,然后尝试尝试完成的任何事情。通常,相同的LiveCD可以选择安装它。那可能是您在这里可能采取的唯一的一种措施。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章