vbox的快照功能简介(翻译接力)

Kvm、VMware、Virtualbox、Xen、Qemu 等
pengtu
帖子: 349
注册时间: 2006-09-09 0:35

vbox的快照功能简介(翻译接力)

#1

帖子 pengtu » 2007-05-09 16:45

vbox是挺快的,虚拟硬盘里面的拷贝速度和真实硬盘差不多,看到里面有个Snapshots功能,估计就是vmware里面的‘快照’吧,用起来比较奇怪。我在xp里面虚拟vista,建了三次快照,结果在vbox的管理窗口中形成这样的Snapshots:
  Snapshot 1
     |__Snapshot 2
        |__Snapshot 3
            |__Current State(changed)
2,我想取消本次运行对vista的修改,怎么办?好像没有vpc的那种undo功能。
答:closed关机后,要在当前状态点Discard Current State,后面的Changed标记会消失,再次开机就回到快照3的原来状态。

1,我想直接回到第2步,要怎么办?我以为双击即可以了,结果只是把子目录收拢了。
答:这意味着要丢弃两个状态:当前状态和快照3。所以,选中快照3,点Discard Snapshot,快照3和派生的当前状态会一起删除,vm就回到了快照2状态。快照3就永远消失了,除非重新建立。

其实很好理解,这和很多软件的历史面板类似。我把vbox帮助文档(那个pdf)中关于快照(Snapshot)中不部分抄了出来,翻译了一部分,希望有人接力。:roll:

---------------------------------------
3.4.4.Snapshots 快照
With VirtualBox's snapshots, you can save aparticular state of a virtual machine for later use. At any later time, you can revert to that state, even though you may have changed the VM considerably since then.
This is particularly useful for making sure that a guest installation is not damaged by accidental
changes, misbehaving software, or viruses.
Once you have setup the machine the way you want it, simply take a snapshot, and should anything happen to the installation, you can simply revert to its snapshot state.
通过快照,你能够保存虚拟机的一部分以便后来使用。在任何时候,你可以还原到这个状态,甚至在VM有相当大改变的情况下。
这是特别有用的,当你的虚拟机确认被损坏(意外改变、或被流氓软件或病毒)。
一旦你把虚拟机设置好成你希望的样子,简单地做一个快照,无论以后发生什么,你都可以迅速地还原为你快照时的状态。

To take a snapshot of your VM, perform the following steps :
要制作快照,请执行以下步骤:(以下的VM不翻译,意为‘虚拟的机’)
1. You can only take a snapshot if your VM is in the "saved" or "poweredoff" state (as displayed next to the VM in the VirtualBox main window). So, if your VM is not running, close it and
have its state saved to disk.
2. In the VirtualBox main window, click on the "Snapshots" tab on the top right of the main window, and then on the small camera icon (for "Take snapshot").
3. A window will up and ask you to name the snapshot. This name is purely for reference pur-
poses to help you remember the state of the snapshot. For example, a useful name would be
"Fresh installation from scratch, no external drivers".
4. Your new snapshot will then appear in the list of snapshots under the"Snapshots" tab. Underneath, you will see an item called "Current state", signifying that the current state of your VM
is a variation based on the snapshot you took earlier.
( If you later take another snapshot, you will see that they will be displayed in sequence, and
each subsequent snapshot is a derivation of the earlier one.)
1.你只能在两种状态下进行快照:VM的‘保存’状态或‘关机’状态(就象vbox主窗口中显示的那样……),那么,如果你的VM没有运行,关闭它或者把它当前状态保存。
2.在vbox主窗口,点击右上方的‘Snapshots’标签,然后(点击)小小的照相机图标(Take snpshot)。
3.一个对话窗口弹出,请你为快照取名,例如,一个好用的名字‘来自scratch的全新安装,无外加驱动’。
4.你增加的新快照将出现在快照标签下面的清单里。在(这个快照的)下面,你会看到一个叫做‘当前状态Current state’的条目,它将显示你的VM在早先快照之后的是否变化。

(如果你进行了另一个快照,你会看到它们将按顺序显示,并且每一个后来的快照都由前一个引出分支)。

Note(注意)
The snapshot reverted to will affect the virtual hard drives that are connected to your VM,
as the entire state of the virtual hard drive will be reverted as well. This means also that all
files that have been created since the snapshot and all other file changes will be lost.
In order to prevent such data loss while still making use of the snapshot feature, it is possible
to add a second hard drive in "write-through" mode using the VBoxManage interface
and use it to store your data. As write-through hard drives are not included in snapshots,
they remain unaltered when a machine is reverted. See Section 5.2, “Storage in virtual machines” for details.
快照的还原动作将对vm连接的虚拟硬盘生效,就像整个虚拟硬盘被还原。这意味着所有自快照建立后发生的文件变更都将消失。
为了防止这样的数据丢失,可以采用快照的(高级)特性,它将允许增加第二块虚拟硬盘,以‘持续写入’的模式,在vbox的管理界面,用它来保存你的数据。连续写入的虚拟硬盘将不会被快照还原,它们将保持机器还原前的样子。更多细节请参照 5.2 段落,‘在虚拟机中存储’。

-----------------------------------
PDF中的英文拷贝出来的时候把空格都丢弃了,谁有办法解决么?我是一个个手工输入的,对照字典翻译了几个小时 :oops:
上文中提到的 5.2 段落,我已经把英文整理好了,我发下一帖,大家接力翻译吧!
上次由 pengtu 在 2007-05-10 13:29,总共编辑 1 次。
pengtu
帖子: 349
注册时间: 2006-09-09 0:35

#2

帖子 pengtu » 2007-05-09 16:55

大家研究一下啊,如果这两个问题都能解决的话,那vbox就太好用了!
pengtu
帖子: 349
注册时间: 2006-09-09 0:35

#3

帖子 pengtu » 2007-05-09 18:05

查了下pdf帮助,慢慢看……

3.4.4.Snapshots

WithVirtualBox'ssnapshots,youcansaveaparticularstateofavirtualmachineforlateruse.At
anylatertime,youcanreverttothatstate,eventhoughyoumayhavechangedtheVMconsiderably
sincethen.
Thisisparticularlyusefulformakingsurethataguestinstallationisnotdamagedbyaccidental
changes,misbehavingsoftware,orviruses.

惨,复制下来空格都丢了,英文挤在一起,谁认得出来啊(可见汉字的优越性)。
头像
TheThirdGhost
帖子: 1592
注册时间: 2006-07-23 16:25
来自: 南京

#4

帖子 TheThirdGhost » 2007-05-09 20:10

读完了,真累啊
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#5

帖子 eexpress » 2007-05-09 20:20

就是恢复用的。
● 鸣学
jimmin
帖子: 2138
注册时间: 2006-09-24 4:37

#6

帖子 jimmin » 2007-05-09 20:24

vbox的快照做得没有VM好。
头像
Element
帖子: 3537
注册时间: 2005-09-10 16:04
来自: DG-GD-China

Re: vbox的快照怎么用?

#7

帖子 Element » 2007-05-10 11:44

pengtu 写了:vbox是挺快的,虚拟硬盘里面的拷贝速度和真实硬盘差不多,看到里面有个Snapshots功能,估计就是vmware里面的‘快照’吧,用起来比较奇怪。我在xp里面虚拟vista,建了三次快照,结果在vbox的管理窗口中形成这样的Snapshots:

  Snapshot 1
     |__Snapshot 2
        |__Snapshot 3
            |__Current State(changed)

1,我想直接回到第2步,要怎么办?我以为双击即可以了,结果只是把子目录收拢了。
2,我想取消本次运行对vista的修改,怎么办?好像没有vpc的那种undo功能。
刚试了一下,理解了一点,如果说的不对,请指正。谢谢。
如果你想回到第2部,那么第3步你也就不想要了吧,Current State(changed)你也不想要了吧,那么先选中Current State(chhanged),点上边的那个有两个向下箭头的图标,那是放弃目前状态和快照的,等于删除了当前的状态,并回到Snapshot 3,再执行一次双向下箭头,就回到Snapshot 2了。一个向下箭头的没弄懂什么意思,看说明是放弃当前状态,不知道作用是什么。
还有一种办法就是先删除Snapshot 3,在执行上面的一次就可以了。
删除Snapshot 3的方法是:选中Snapshot 3,上面的图标打叉的激活了,点击它就直接删除Snapshot 3了。
http://element.blog.ubuntu.org.cn/
Ubuntu Jaunty Jackalope...
AMD Barton 2600+
MSI K7N2 Delta-L
Kingston DDR400 512M*2+256M*1
nVidia FX5200
Seagate 80G(Jaunty Jackalope)
Seagate 160G(XXxxXX)
SyncMaster 732N
头像
Element
帖子: 3537
注册时间: 2005-09-10 16:04
来自: DG-GD-China

#8

帖子 Element » 2007-05-10 11:51

刚才又试了一下,大概知道了向下一个箭头图标的意思。
就是取消本次对VM所做的修改的。回到了你开机前的状态。
应该可以解决LZ第2个问题了。
http://element.blog.ubuntu.org.cn/
Ubuntu Jaunty Jackalope...
AMD Barton 2600+
MSI K7N2 Delta-L
Kingston DDR400 512M*2+256M*1
nVidia FX5200
Seagate 80G(Jaunty Jackalope)
Seagate 160G(XXxxXX)
SyncMaster 732N
pengtu
帖子: 349
注册时间: 2006-09-09 0:35

#9

帖子 pengtu » 2007-05-10 13:06

jimmin 写了:vbox的快照做得没有VM好。
没用过有快照功能的vm,到底好在哪里呀?介绍介绍吧。
pengtu
帖子: 349
注册时间: 2006-09-09 0:35

#10

帖子 pengtu » 2007-05-10 13:13

Element 写了:刚才又试了一下,大概知道了向下一个箭头图标的意思。
就是取消本次对VM所做的修改的。回到了你开机前的状态。
应该可以解决LZ第2个问题了。
对的,看来vbox的快照功能比vpc强多了,所以操作上也步骤多一些。
要想在一个状态运行后再回到原来的状态,先关机(有三种选择:保存状态、更新快照,什么都不做),然后点Discard Current States(单下箭头),当前状态的change标记消失,再开机就和以前一样了。
pengtu
帖子: 349
注册时间: 2006-09-09 0:35

《VirtualBox User Manual》5.2部分英文及翻译

#11

帖子 pengtu » 2007-05-10 13:42

英文整理好了一部分,希望大家接力翻译:

-------------------------

5.2. Storage in virtual machines 在虚拟机中存储
5.2.1. Virtual Disk Image (VDI) files 虚拟磁盘镜像(vdi)文件
VirtualBox implements a custom container format for guest hard disks-- Virtual Disk Image(VDI)
files.
The VDI files reside on the host system and are seen by the guest systems as hard disks of a certain geometry. When creating an image, its size has to be specified which determines this fixed geometry. It is therefore not possible to change the size of the virtual hard disk later.
As briefly mentioned in Section 3.2, “Creating a virtual machine”, there are two options of how to create the image: fixed-size or dynamically expanding.

* If you create a fixed-size image of e.g.10GB, a VDI file of roughly the same size will be created immediately on your host system.
* For more flexible storage management, use a dynamically expanding image. This will initially be very small and not occupy any space for unused virtual disk sectors, but the image file will grow every time a disk sector is written to for the first time. While this format takes less space initially, the fact that VirtualBox needs to constantly expand the image file consumes additional computing resources, so until the disk has fully expanded, write operations are slower than with fixed size disks. However, after a dynamic disk has fully expanded, the performance penalty for read and write operations is negligible.
For either of the above two image types(that is, irrespective of whether an image is fixed-size or dynamically expanding), you can also specify whether write operations affect the image directly.

1. With normal images (the default setting), there are no restrictions on how guests can read from and write to the disk. Because of this, a normal hard disk can only be attached to a single virtual machine at any given time (although you can detach them from a VM and attach them to another).
When you take a snapshot of your virtual machine as described in Section 3.4.4, “Snapshots”, the state of such a "normal hard disk" will be recorded together with the snapshot, and when reverting to the snapshot, its state will be fully reset.

2. By contrast, immutable images are read-only and can be used from multiple virtual machines simultaneously. Write accesses to immutable hard disks will be directed to a special differencing disk image which VirtualBox creates automatically. However, when you shut down the VM to which the immutable disk is attached, the changes in the differencing disk will be completely discarded.
Of course, creating a virtual disk image as immutable makes no sense, because then the hard disk would always be reset to an empty state when the VM is shut down to which it is attached. Hence, you will ordinarily create a "normal" virtual disk image and then, when its contents are deemed useful, then mark it immutable.
To mark a disk image as "immutable", use the VBoxManage modifyvdi command; see Section 7.13, “VBoxManage modifyvdi”.

3. Finally, write-through hard disks are like normal hard disks in that they fully support read and write operations also. However, their state is not saved when a snapshot is taken, and not restored when a VM's state is reverted.
To create a disk image as "write-through", use the VBoxManage createvdi command; see Section 7.12, “VBoxManage createvdi”. To mark an existing image as write-through,use VBoxManage modifyvdi; see Section 7.13, “VBoxManage modifyvdi”.
要创建一个‘持续写入’模式的磁盘映像,用vbox的createvdi命令行,参见 7.12段落;要改变一个已存在的映像变为‘持续写入’模式,用vbox的modifyvdi命令行,参见 7.13段落。

To illustrate the differences between the various types with respect to snapshots: You have installed your guest operating system in your VM, and you have taken a snapshot. Imagine you have accidentally infected your VM with a virus and would like to go back to the snapshot. With a normal hard disk image, you simply revert the state of the VM, and the earlie rstate of your hard disk image will be restored as well (and your virus infection will be undone). With an immutable hard disk, irrespective of the snapshot, all it takes is to shut down your VM, and the virus infection will be discarded. With a write-through image however, you cannot easily undo the virus infection by means of virtualization, but will have to disinfect your virtual machine like a real computer.

Still, you might find write-though images useful if you want to preserve critical data irrespective of snapshots, and since you can attach more than one VDI to a VM, you may want to have one immutable for the operating system and one write-through for your data files.
头像
Element
帖子: 3537
注册时间: 2005-09-10 16:04
来自: DG-GD-China

#12

帖子 Element » 2007-05-10 14:48

去找找看有没有vbox用户手册的中文版,如果有的话,那就方便多了。
http://element.blog.ubuntu.org.cn/
Ubuntu Jaunty Jackalope...
AMD Barton 2600+
MSI K7N2 Delta-L
Kingston DDR400 512M*2+256M*1
nVidia FX5200
Seagate 80G(Jaunty Jackalope)
Seagate 160G(XXxxXX)
SyncMaster 732N
头像
TheThirdGhost
帖子: 1592
注册时间: 2006-07-23 16:25
来自: 南京

#13

帖子 TheThirdGhost » 2007-05-10 21:45

有人不是已经翻了好一部分了么?
pengtu
帖子: 349
注册时间: 2006-09-09 0:35

#14

帖子 pengtu » 2007-05-11 0:06

TheThirdGhost 写了:有人不是已经翻了好一部分了么?
找到了,有人给出了全部英文,翻译了开头一点。总算不要去扒拉英文空格了,喔~

http://gaoghy.googlepages.com/vbox1.html
InnoTek VirtualBox用户手册 User Manual 1.3.8 建议用 firefox 浏览。从pdf 转过来的英文。
pengtu
帖子: 349
注册时间: 2006-09-09 0:35

Re: 《VirtualBox User Manual》5.2部分英文及翻译

#15

帖子 pengtu » 2007-05-16 19:16

竟然一个接力的都没有,555555……
这种的翻译可以提交到哪里去呢?在官方主页没找到地方。:oops:
pengtu 写了:英文整理好了一部分,希望大家接力翻译:
-------------------------
5.2. Storage in virtual machines 在虚拟机中存储
5.2.1. Virtual Disk Image (VDI) files 虚拟磁盘镜像(vdi)文件
回复