通过 USB 记忆棒携带和操作整个开发盒。 可行的?

发布于 2024-07-12 06:22:43 字数 582 浏览 8 评论 0原文

最近,我一直在考虑投资一个有价值的 USB 笔式驱动器(类似于 这个),并在虚拟机上安装操作系统并开始在其上进行开发。

我的想法是,我希望能够随身携带我的开​​发盒,成为用于 .Net 开发的 Windows 发行版,以及用于 RoR、Perl 等内容的 Linux 发行版等等,这样我就可以在需要的地方随身携带它们...无论是工作、学校、家里的不同计算机等...

我也在考虑这样做也是为了备份目的...即备份我的几乎将单个 VM 文件复制到外部硬盘,而不是对我的普通 Windows Box 进行例行更新。 我还在考虑甚至可能在源代码控制下提交 VM 框(这是否可行?

那么,我是否走在正确的轨道上? 您建议我尝试实现这一点吗?

在从 USB 笔驱动器运行的虚拟机上安装您的开发盒有多可行?

Lately I have been thinking about investing in a worthy USB pen drive (something along the lines of this), and install Operating Systems on Virtual Machines and start developing on them.

What I have in mind is that I want to be able to carry my development boxes, being a Windows Distribution for .Net development and a Linux Distribution for stuff like RoR, Perl and whatnot, so that I would be able to carry them around where need be...be it work, school, different computers at home etc...

I am thinking of doing this also for backup purposes...ie to backup my almost-single VM file to an external hd, instead of doing routinely updates to my normal Windows Box. I am also thinking about maybe even committing the VM boxes under Source Control (is that even feasible?)

So, am I on the right track with this ? Do you suggest that I try to implement this out?

How feasible is it to have your development box on Virtual Machine that runs from a USB Pen-Drive ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

倾城月光淡如水﹏ 2024-07-19 06:22:43

我完全同意你的方向。 我想自己做这件事。

但如果您还不知道,这不仅仅是驱动器大小的问题,无论您相信与否,USB 闪存驱动器可能比旋转磁盘驱动器慢得多

如果您打算实际直接从 USB 驱动器运行虚拟机,这可能会成为一个大问题!

我曾尝试在 32GB Corsair Survivor 上运行 4GB Windows XP VM,并且虚拟机几乎无法使用! 另外,将我的 4GB 虚拟机复制到驱动器上并重新复制到驱动器上的速度也相当慢 - 大约需要 10 分钟才能将其复制到驱动器上。

如果您有 esata 端口我强烈建议您查看高速 ESata 选项,例如 Kanguru 32GB ESata/USB 闪存驱动器这款 OCZ 推出的 32GB。

这些驱动器的读写速度比 ESata 上的其他 USB 驱动器高得多。 如果您没有 ESata 端口,您仍然可以将它们用作 USB。 不过,如果您没有 ESata 端口,您可以在线购买 PCI 转 ESata 卡,甚至可以为您的笔记本电脑购买 ESata ExpressCard。

编辑:附注,您会发现 USB 闪存驱动器使用 FAT 而不是 NTFS。 您不想使用 NTFS,因为它会进行更多的读取和操作。 在磁盘上写入,您的驱动器将只能进行有限数量的读取和写入。 在它死之前写。 但通过使用 FAT,您的文件大小上限将被限制为 2GB,这可能会导致您的虚拟机出现问题。 如果是这种情况,您可以将 VM 磁盘拆分为 2GB 的块。 另请确保每天备份虚拟机,以防驱动器达到最大写入次数。 :)

I absolutely agree with where you are heading. I wish to do this myself.

But if you don't already know, it's not just about drive size, believe it or not USB Flash drives can be much slower than your spinning disk drives!

This can be a big problem if you plan to actually run the VMs directly from the USB drive!

I've tried running a 4GB Windows XP VM on a 32GB Corsair Survivor and the VM was virtually unusuable! Also copying my 4GB VM off and back onto the drive was also quite slow - about 10 minutes to copy it onto the drive.

If you have an esata port I'd highly recommend looking at high-speed ESata options like this Kanguru 32GB ESata/USB Flash drive OR this 32GB one by OCZ.

The read and write speeds of these drives are much higher over ESata than other USB drives. And you can still use them as USB if you don't have an ESata port. Though if you don't have an ESata port you can buy PCI to ESata cards online and even ESata ExpressCards for your laptop.

EDIT: A side note, you'll find the USB flash drives use FAT instead of NTFS. You don't want to use NTFS because it makes a lot more reads & writes on the disk and your drive will only have a limited number of reads & writes before it dies. But by using FAT you'll be limited to max 2GB file size which might be a problem with your VM. If this is the case, you can split your VM disks into 2GB chunks. Also make sure you backup your VM daily incase your drive does reach it's maximum number of writes. :)

尐籹人 2024-07-19 06:22:43

这篇关于 USB 拇指驱动器的文章指出,

切勿运行磁盘密集型应用程序
直接针对存储在
拇指驱动器。

USB 拇指驱动器利用闪存,并且在损坏和发生损坏之前具有最大写入次数。 先前链接文章的作者发现写入次数在 10,000 - 100,000 次范围内,但如果您使用的是磁盘密集型应用程序,这可能是一个问题。

因此,如果您这样做,请制定积极的备份策略来备份您的工作。 同样,如果当您运行开发套件时,如果它可以作为临时工作空间写入本地硬盘驱动器,这将是理想的选择。

This article on USB thumbdrives states,

Never run disk-intensive applications
directly against files stored on the
thumb drive.

USB thumbdrives utilize flash memory and these have a maximum number of writes before going bad and corruption occurs. The author of the previously linked article found it to be in the range of 10,000 - 100,000 writes but if you are using a disk intensive application this could be an issue.

So if you do this, have an aggressive backup policy to backup your work. Similarly, if when you run your development suite, if it could write to the local hard drive as a temporary workspace this would be ideal.

阳光的暖冬 2024-07-19 06:22:43

希望您谈论的是解释语言项目。 我无法想象在虚拟机上编译任何大小的 C/C++,更不用说在 USB 驱动器上运行的虚拟机了。

Hopefully you are talking about interpreted language projects. I couldn't imagine compiling a C/C++ of any size on a VM, let alone a VM running off of a USB drive.

不可一世的女人 2024-07-19 06:22:43

我经常使用 Xen 进行此操作,但还在驱动器上包含一个裸机可启动内核。 这在处理 Live CD 所基于的内容时特别有用。

不好的一面是虚拟机映像的膨胀,以使其能够在许多机器上启动..因此,您通常只构建一个非常精简且平均的半虚拟化内核..您还必须包括一个拥有包括厨房水槽在内的一切的内核(向上到你想要的,即你需要音频,还是令牌环等?)

我通常携带两根棍子,一根有Xen +修补的Linux 2.6.26,另一根有我的各种来宾映像,它们准备好以任何方式启动。 Debian 或 Ubuntu 的去引导副本是创建前者的一个很好的起点。

如果不出意外的话,修补起来很有趣。 抱歉有点以 GNU/Linux 为中心,但这就是我专门使用的:) 当我不得不找到一条奇怪的路径来升级我的发行版时,我开始对此进行混乱,该发行版比当前发行版晚了两年。 所以,我绑了一个来宾,安装了我想要的东西,并将 GRUB 指向我的根文件系统的新 LV。 在里面,我刚刚安装了我的旧/家 LV,然后就走了。

I do it quite frequently with Xen, but also include a bare metal bootable kernel on the drive. This is particularly useful when working on something from which a live CD will be based.

The bad side is the bloat on the VM image to keep it bootable across many machines .. so where you would normally build a very lean and mean paravirtualized kernel only .. you have to also include one that has everything including the kitchen sink (up to what you want, i.e. do you need Audio, or token ring, etc?)

I usually carry two sticks, one has Xen + a patched Linux 2.6.26, the other has my various guest images which are ready to boot either way. A debootstrapped copy of Debian or Ubuntu makes a great starting point to create the former.

If nothing else, its fun to tinker with. Sorry to be a bit GNU/Linux centric, but that's what I use exclusively :) I started messing around with this when I had to find an odd path to upgrading my distro, which was two years behind the current one. So, I strapped a guest, installed what I wanted and pointed GRUB at the new LV for my root file system. Inside, I just mounted my old /home LV and away I went.

不弃不离 2024-07-19 06:22:43

查看 MojoPac:

http://www.mojopac.com/

铁杆游戏玩家用它来征服世界随时随地与他们一起玩《魔兽争霸》——它应该可以很好地满足您的开发需求,至少在 Windows 上是这样。 使用 cygwin 来满足您的 unix-dev 需求。

Check out MojoPac:

http://www.mojopac.com/

Hard-core gamers use it to take world of warcraft with them on the go -- it should work fine for your development needs, at least on Windows. Use cygwin with it for your unix-dev needs.

十雾 2024-07-19 06:22:43

我曾经这样做过,发现编译速度慢得要命,不值得。

请记住,与随机写入性能的硬盘驱动器(将大量小文件写入已经有大量文件的分区)相比,USB 闪存驱动器速度极慢(可能慢 10 到 100 倍)。

使用 GNU 工具的典型构建过程将创建大量小文件 - 一个简单的配置脚本创建数千个小文件并再次删除它们,只是为了在开始编译之前测试环境。 你可能要等很长时间。

I used to do this, and found that compiling was so deathly slow, it wasn't worth it.

Keep in mind that USB flash drives are extremely slow (maybe 10 to 100 times slower) compared to hard drives at random write performance (writing lots of small files to a partition which already has lots of files).

A typical build process using GNU tools will create lots of small files - a simple configure script creates thousands of small files and deletes them again just to test the environment before you even start compiling. You could be waiting a long time.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文