I/O Virtualization in Hosted VM - io

I've heared that hosted VMs make I/O virtualization easier. Because no device driver is needed for the VM and it can use the host OS device drivers for devices. My question is if the device driver is installed on the guest OS why do we need to use device drivers of the host OS?
Thanks in advance! :D

Depending of your virtualization solution some devices of the virtual machine are virtual (for example, hard disk) while other not (for example processor), for the virtualizated devices, they're generic enought so they may not need drivers (but VM tools contains drivers that make them perform better), but at the end Virtual Machines are running on top of the host operating system, so this operating system, need to have drivers for all the real hardware, to be able to provide that hardware to the virtual machine.

Related

Is it possible to simulate Linux on USB devices using VMware?

I have successfully installed RedHat Linux and run them on harddrive using VMware simulation. Things work quite smooth if I put all the nodes VM on my physical machine.
For management purposes, I want to use USB devices to store ISO and plug one if more nodes are needed. I would like to run VMware on my physical machines.
Can I just build one virtual machine on one USB device? So I can plug one node if needed.
I mean, if I simulate machine A one USB 1 and another machine B on USB 2, can I build a network using my physical machine as server?
(1) If so, are there problems I should pay attention to?
(2) If not, are there any alternative solution for my management purpose?(I do not want to make VMs on partitions of my physical machine now) Can I use multiple mobile hard drives instead?
Actually I want to start up master-slaves Hadoop2.x deployments using virtual machines. Are there any good reference for this purpose?
I shall explain that am not too lazy to have a try on my idea, however, it is now rather expensive to do so if I do not even know something about the feasibility of this solution.
Thanks for your time.
I'm not an expert on VMWare, but I know that this is common on almost any virtualization system. You can install a system :
on a physical device (a hard disk, a hard disk partition)
or on a file
The physical device way allows normally better performances since you only use one driver between the OS and the device, while the file way offer greater simplicity to add one VM.
Now for your questions :
Can I just build one virtual machine on one USB device? Yes, you can always do it on a file, and depending on host OS directly on the physical device
... can I build a network using my physical machine as server? Yes, VMWare will allow the VM to communicate with each other and/or with the host and/or with external world depending on how you configure the network interfaces of your VMs.
If so, are there problems I should pay attention to?
USB devices are pluggable and unpluggable. If you unadvertantly unplug one while the OS is active bad things could happen. That's why I advised you to use files on the hard disk to host your VMs.
memory sticks (no concern for USB disks) support a limited number of writes and generally perform poorly on writes. Never put temp filesystem of swap there but use a memory filesystem for that usage, as is done for live filesystems on read-only CD or DVD
every VMs uses memory from the host system. That is often the first limitation for the number of simultaneous VMs on a personnal system

Are linux VMs installed on Windows Host in VirtualBox "real" linux?

I have VirtualBox on my Windows 7 machine, and recently installed a Redhat linux VM. I'm planning to learn linux programming with some low-level stuff, such as kernel function calls and assembly.
My question is: is my Redhat VM a "real" linux environment for my purpose? I guess that whatever I do in the VM is done in a "linux simulator" in VirtualBox, and under the hood the "linux simulator" still does its job using functionalities provided by the Windows host (e.g. Windows function calls). Is this true?
VirtualBox is not a "Linux simulator", it is a "computer simulator". OS selections within such an simulator are for the purpose of deciding which virtual devices to make visible, and not for running a different simulator "core".
I think you should dual boot linux instead of VM because not only it saves resources ("Prevent Computer from going slow") But also give you better functionality and hardware support
Edit:
and you can also use Live Cd(also usb)

How do emulator/virtual computer work?

How does an emulator work like the android one. And a virtual pc live VirtualBox?
In one form the software reads the binary in the same way that hardware on the real system would, it fetches instructions decodes them and executes them using variables in a program instead of registers in hardware. Memory and other I/O is similarly emulated/simulated. To be interesting beyond just an instruction set simulator it needs to also simulate hardware, so it may have software that pretends to behave for example like a VGA video card the software run on the emulator ideally cannot tell the Memory/I/O is from simulated hardware, ideally you do enough to fool the software being simulated. Also though you try to honor what those register writes and reads mean by making calls to the operating system you are running on and/or hardware directly (assuming your program of course thinks it is talking to hardware and not an emulator).
The next level up would be a virtual machine. For the case I am describing it is a matching instruction set, so you are say wanting to virtualize an x86 program on an x86 host machine. The long and short of it is the host processor/machine has hardware features that allow you to run the actual instructions of the program being virtualized. so long as the instructions are simple register based or stack or other local memory, once the program ventures out of its memory space the virtualization hardware will interrupt the operating system, the virtual machine software like vmware or virtualbox then examines the Memory or I/O request from the software being virtualized and then determines if that was a video card request or usb device or nic or whatever, and then it emulates the device in question much in the same way that a pure non-virtualized setup would. A virtual machine can often outrun a purely emulated machine because it allows a percentage of the software to run at the full speed of the processor. the downside is you have to have a virtual machine that matches the software being run. An emulator can be far more accurate and portable than a virtual machine at the cost of performance.
The next level up would be something like wine or cygwin where not only are you trying to do something like a virtual machine and run native instructions and trap memory requests but you are going beyond that and trying to trap operating system calls so that you can run a program compiled for one operating system on another operating system, but much faster than a virtual machine. Instead of traping the hardware level register or memory access to a video card, you trap the operating system call for a bitblt or fill or line draw or string draw with a specific font, etc. Then you can translate that operating system request with calls to the native operating system.
At their simplest emulators or virtual computers provide an abstraction layer built on top of the host system (the actual physical system running the emulator) that implements the emulated system's functionality to the code that is to be run.
Emulators and virtual machines simulate hardware like a PC or an android phone. A virtual machine (or virtual pc) looks at an operating system's machine code instructions and runs them on top of your current (host) operating system in a virtual computer.
http://en.wikipedia.org/wiki/Virtual_machine
and
http://en.wikipedia.org/wiki/Emulator
Depending on the type or virtualization, a virtual machine is not always an emulator.

OS reload on a remote linux machine

If we need to do OS reload on a remote machine, how can the network boot be enabled on the client machine without making any changes in the BIOS ??
I am in a try to develop a control panel, in which this feature is included. i.e., fully automated OS reload and thinking of using the pxe boot. But enabling and disabling boot from network is a problem. Any work around, please ?
Hacker approach: Use the bootloader to load GPXE from the harddisk.
You'll need a version that fits to your NIC: Images for many hardware types and booting methods can be generated at ROM-o-matic. Use the PCI ID from the NIC to programmatically select the version that fits best. People may also have add-on network cards, e.g. for gigabit LAN.
This way you don't need to fiddle with the mainboard and network card specific ways to turn PXE on.
First, since your question is not programming related, I suggest you pose it again on the sister site serverfault.com. You might get more/better answers there.
Second, I do not think you will be able to remotely activate PXE on arbitrary machines. Maybe this works when you have Intel's AMT (Active Management Technology) on those machines, but then you already have BIOS access. But nevertheless you could activate PXE boot on all machines and from your PXE server, selectively offer boot images only to those machines you want to. All other machines would then just boot the installed OS. The FAI (Fully Automatic Install) system uses that approach, but is Linux only, AFAIK.
I agree with Dubu that reliable enable/disable of PXE boot in the BIOS across heterogeneous target hardware is not readily achievable. The better suggestion is to configure all your target machines to include PXE prior to local disk in their configured boot order always. You can PXE boot to something like PXELINUX and have the default choice be a local disk boot. Then you can selectively target particular machines to PXE boot into a network loaded OS (for OS reinstallation purposes) by configuring symlinks with the target machine's MAC address inside the PXELINUX TFTP root.

Figuring out if a server you are connecting to is virtualised?

Is there a way to figure out if a win 2003 server server you are connecting to is virtualised? I tried asking but not 100% sure of the answer is correct.
This is a duplicate of this question: How to identify that you’re running under a VM?.
Quoting from the accepted answer to that question by JawnV6:
The classic trick to detect a VM is to populate the ITLB, run an instruction that must be virtualized (which necessarily clears out such processor state when it gives control to the hypervisor), then run some more code to detect if the ITLB is still populated. The first paper on it is located here, and a rather colorful explanation from a researcher's blog is located here.
I guess looking at the Device Manager (Control Panel | System | Hardware | Device Manager) should give you a good idea.
On one server, running on VMWare ESX, I see the following tell-tale signs of a virtual machine:
System Devices: VMware server memory controller
Network adapters: VMware Accelerated AMD PCNet Adapter
Mice: VMware Pointing Device
Disk drives: VMware Virtual disk SCSI Disk Device
A simple test that detects a VMware network adapter, is:
ipconfig /all | grep "VMware Accelerated"
(would perhaps also detect a host running VMware workstation)
Here's a decent explanation. You can check the manufacturer of a piece of hardware from WMI or within Device Manager to determine if it's a physical device or not.
http://blogs.msdn.com/virtual_pc_guy/archive/2005/10/27/484479.aspx
Can you tell us any more about how you're connecting to this server?
This depends on a couple of factors.
Are you using remote desktop to connect to the server and can you gain access to system files and folders?
Do you know what type of virtualization software is running the server?
Without know that information this question may be a litle difficult to answer correctly. There are a large number of virtualization software vendors and each of them have different setups that are in the virtual servers.
Without more information, the short answer is no. To the actual guest operating system it looks and acts like an operating system that is running on bare metal.
You could look for support software installed, for instance VMware usually installs VMware Tools on the guest operating system.

Resources