我在服务器上设置了 VirtualBox。它被设置为桥接虚拟机,并有一个 IP 地址。它现在以无头模式运行,从“VBoxHeadless -s PuppetMaster”开始。
如何找出 VM 使用 VBoxManage 的 IP?
我创建了一个 Windows XP 映像磁盘。它是 5 GB,但我想知道是否有任何简单的方法可以将大小增加到 20 GB。
我正在尝试建立一个流浪者。主机是 Ubuntu 12.10。这是我的流浪文件:
Vagrant::Config.run do |config|
config.vm.share_folder("v-root", "/vagrant", ".", :nfs => true)
config.vm.network :bridged, :bridge => "eth0"
config.vm.define "restserver" do |chefs_config|
chefs_config.vm.box = "precise64"
chefs_config.vm.box_url = "http://files.vagrantup.com/precise64.box"
chefs_config.vm.host_name = "restserver"
chefs_config.vm.network :hostonly, "192.168.20.50"
chefs_config.vm.forward_port 80, 8080
config.vm.provision :chef_solo do |chef|
chef.log_level = :debug
chef.cookbooks_path = "cookbooks"
chef.run_list.clear
chef.add_recipe "apt"
chef.add_recipe "base"
chef.add_recipe "mongodb::default"
chef.add_recipe "nginx"
end
end
end
Run Code Online (Sandbox Code Playgroud)
问题是我从流浪者内部访问互联网很糟糕。这很慢。我认为路由表可能搞砸了。这是来自的输出route -n:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.2.2 0.0.0.0 UG 0 0 …Run Code Online (Sandbox Code Playgroud) 对于具有适度虚拟化需求的公司——VirtualBox 目前在托管一些轻型服务器方面做得很好——迁移到更强大的平台有什么好处?
我希望能稍微缩短我的研究 - 获得企业级虚拟化具有 VBox 及其同类产品没有的功能的简短列表。
我正在尝试让 MySQL 服务器(位于 VM 内)响应客户端(位于主机上)。所有方法都返回相同的:
Host '10.0.2.2' is not allowed to connect to this MySQL server
Run Code Online (Sandbox Code Playgroud)
我已经确保正确的端口转发。我还确保,在my.cnf我有以下几行:
skip-external-locking
bind-address = 0.0.0.0
Run Code Online (Sandbox Code Playgroud)
这对我不起作用。我也试着玩了一下:
bind-address = 10.0.2.2
Run Code Online (Sandbox Code Playgroud)
但这对我也不起作用 - 服务器无法启动。
任何想法,我错在哪里?
更新。我没有检查权限,root@%如如何更改已创建的 MySQL 用户的权限?
解决了。
为现有虚拟机设置主控制器的虚拟硬盘驱动器 (VDI) 的最佳方法是什么?
如果 VDI 确实是某个其他父磁盘的子差异磁盘,语法是否会发生变化?您是否需要以某种方式附加父 VDI 和子 VDI?
情况:
我有一个现有的 VM --- 我想用另一个普通的虚拟 HD 或可能的差异磁盘替换它用于启动的硬盘驱动器。这可以用 VBoxManage 完成吗?
我有一个运行设置如下:
通常这个设置对我来说很好,但有时我想在本地运行 Linux,而不是在 VirtualBox 中。
有没有办法在没有 Windows 开销的情况下直接启动到 vdi 文件?例如,使用带有一些修改过的 Linux 内核 / GRUB 的 U 盘可以将 vdi 文件直接挂载为“/”?或者将我的 vdi 文件的内容复制到空分区,并以某种方式从 VirtualBox 使用它(启动到 Windows 时)并直接启动到 Linux?
希望得到一些提示或什至如何。
我已经下载了 Amazon Ubuntu EC2 AMI 映像(来自http://uec-images.ubuntu.com/releases/10.04/release/)并且我正在尝试在我的 linux 桌面上本地运行它。是否可以使用 VirtualBox 运行 AMI?是否需要其他一些虚拟化软件?
我正在尝试ia32-libs在我的 Debian x86_64 机器上安装(构建 VirtualBox 源的依赖项),但是它给了我错误:
The following packages have unmet dependencies:
ia32-libs : Depends: ia32-libs-i386 but it is not installable
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)
当然,我继续尝试安装ia32-libs-i386,但我遇到了另一个错误:
Package ia32-libs-i386 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'ia32-libs-i386' has no installation candidate
Run Code Online (Sandbox Code Playgroud)
有谁知道这里的问题是什么?我想我可能需要启用多架构,但我不完全确定。这是我的sources.list,如果它有帮助的话:
deb http://ftp.us.debian.org/debian unstable main …Run Code Online (Sandbox Code Playgroud) 由于这个答案和这些 网站,我已经非常接近让 Amazon Linux 在 VirtualBox 内启动。我已采取的步骤的快速概述:
ddEBS 卷的内容转移ssh到本地图像文件。grub-legacy-ec2软件包,而不是 grub2)。qemu-img。现在 VM 启动,grub 加载,并找到内核。但是当它尝试挂载根设备时失败:
dracut Warning: No root device "block:/dev/xvda1" found
dracut Warning: Boot has failed. To debug this issue add "rdshell" to the kernel command line.
dracut Warning: Signal …Run Code Online (Sandbox Code Playgroud) virtualbox ×10
amazon-ec2 ×2
amazon-ami ×1
boot-loader ×1
debian ×1
disk-image ×1
hyper-v ×1
installation ×1
kernel ×1
mysql ×1
packages ×1
vagrant ×1
vmware-esxi ×1
xen ×1