LINUX 添加xp虚拟机

微软已中止对xp系统的漏洞更新支持。不过,目前国内各大技术大佬都相继声明,继续提供xp的漏洞更新服务,为xp保驾护航!html

省内存嘛,因此还得装一个玩!linux

 安装时的激活key  :  windows

HTXH6-2JJC4-CDB6C-X38B4-C3GF3 
RT4H2-8WYHG-QKK6K-WWHJ2-9427X

 

一 . 去msdn.itellyou.cn上下载一个iso文件less

      或者用我下载好的:ide

       http://yunpan.cn/Q7nsH3gGcZYdI        提取码: 22despa

       不肯意用,本身去下载操作系统

 

二 .下面是本人的操做步骤 .net

  定义虚拟机名称 winxp   操做系统类型   WindowsXP并注册rest

  (1) VBoxManage createvm --name winxp --ostype WindowsXP --register --basefolder /data/virtualbox/code

        成功,返回相似下面的提示:

        Virtual machine 'winxp' is created and registered.

        UUID: e5ee52d7-597c-44db-96fc-af4af4c3235f
        Settings file: '/data/virtualbox/winxp/winxp.vbox'

 

  (2) 建立一块硬盘

       VBoxManage createvdi --filename /home/virtualbox/winxpp.vdi --size 20480         虚拟机嘛,给个20G不错啦

  (3) 内存以及显存大小

        VBoxManage modifyvm winxp --memory 512  --vram 16

  (4) 设置启动顺序及挂载刚建立的磁盘位置 , 开启sata支持 

       VBoxManage modifyvm "winxp" --boot2 disk --boot1 dvd --hda "/home/virtualbox/winxpp.vdi" --sata on --nic1 hostif   --bridgeadapter1 eth0(无线改成wlan0)

       若是报错:    ERROR: Could not find a storage controller named 'IDE Controller' 

       执行:VBoxManage storagectl winxp --name "IDE Controller" --add ide, 而后在从新执行上面的命令便可

   下面代码酌情使用:

VBoxManage modifyvm "winxp" --ostype "WindowsXP" --memory "512" --vram "16" --boot2 disk --boot1 dvd --hda "/home/virtualbox/winxp.vdi" --sata on --acpi on --pae on --hwvirtex on --nic1 hostif --cableconnected1 on --nictype1 "Am79C973" --bridgeadapter1 eth0 --intnet1 brigh1 --macaddress1 auto --vrdp on --vrdpport 4000 --vrdpmulticon on

  以上参数是为了设置虚拟机的联网方式:桥接, 支持网卡类型 mac地址, 开启远程链接等选项

 (5)  加载iso文件到dvd光驱

      VBoxManage modifyvm winxp --dvd /home/download/zh-hans_windows_xp_professional_with_service_pack_3_x86_cd_x14-80404.iso 

     报错以下:

     

VBoxManage: error: No drive attached to device slot 0 on port 1 of controller 'IDE Controller'
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component SessionMachine, interface IMachine, callee nsISupports
VBoxManage: error: Context: "MountMedium(Bstr("IDE Controller").raw(), 1, 0, dvdMedium, FALSE )" at line 1123 of file VBoxManageModifyVM.cpp

  不要紧,咱们继续设置

    将winxp.vdi 磁盘放在设备0的第0个端口 
    VBoxManage storageattach winxp --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium /home/virtualbox/winxpp.vdi 
    将ISO挂载在设备0的第1个端口 
    VBoxManage storageattach winxp --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium /home/download/zh- hans_windows_xp_professional_with_service_pack_3_x86_cd_x14-80404.iso 

 

(6)关键时刻

   VBoxManage startvm winxp  --type SDL   或者之后台的方式运行--type headless或者  --type GUI窗口界面(得装桌面的虚拟机)

至此,启动后,就是安装系统了,看提示操做。

 

 

三. 宿主与虚拟机之间要共享剪贴板怎么办?

没问题, 往下看

VBoxManage modify winxp –clipboard "参数”

disabled         不共享剪贴板

hosttoguest    将宿主机的剪贴板共享给虚拟机

guesttohost    将虚拟机的剪贴板共享给宿主机

bidirectional    宿主机和虚拟机共使用一个剪贴板

 

四 . 宿主要与虚拟机共享文件怎么办?

没问题,看这里

       将主机的/home/vbox目录共享给虚拟机winxp,且共享名为share

       VBoxManage sharedfolder add winxp --name share(任意) --hostpath /home/vbox

       //该命令必须在关闭虚拟机以后才能执行

       VBoxManage sharedfolder add winxp --name share --hostpath /home/vbox --transient

       //该命令在虚拟机运行时就能够执行,但当虚拟机关闭(指虚拟机的状态为poweroff)后该共享文件夹不会保留

 

  虚拟机winxp里,使用  net use x: \\vboxsvr\share 便可(  本次处理报错 , 不知为什么)

 

       要删除一个共享,关闭虚拟机执行: VBoxManage sharedfolder remove winxp  -name share 

 

五. 我想装几个虚拟机怎么办?

按照上面的方法,炮制一个,注意硬盘路径和iso文件别搞错了,刚才就搞错了,从新设置了一把,如今正常安装

 

六. 如何生成快照

     快照至关于建立一个还原点,往后虚拟机有问题,直接还原,搞定          

      生成快照:
      VBoxManage snapshot winxp take winxp-snapshot-clear

      查看快照信息:
      VBoxManage snapshot winxp showvminfo winxp-snapshot-clear

      还原快照:
     VBoxManage snapshot winxp restore winxp-snapshot-clear

 

 

七. 网银神马的得让虚拟机支持usb

    (1)查看linux主机上链接的usb设备的状况

             VBoxManage list usbhost

    (2)   

 上面的参数详解请移步: http://www.cnblogs.com/readleafblackrain/articles/3974882.html

相关文章
相关标签/搜索