0

If I have a VM on a Hyper-V host with an IP 192.168.50.25 (VM IP), where the Host has an IP of 192.168.40.25. (The host itself has a virtual switch whose NIC patches into a procurve onto the VLAN 50.25) and a USB Drive connected to the Host, taken offline, and then mapped through to the VM through Hyper-V - will it do transfers that I copy from the USB Drive over the network (routing through our firewalls etc) or does Hyper-V do something smart?

i.e. If I then start to copy from that USB drive that has been mapped through to the VM will it say "The USB drive is actually on a machine on 192.168.40.0/24 so let's go to my default gateway, get routed to the 192.168.50.0/24 firewall then finally make it's way back to the NIC which (as said above) is actually the NIC assigned to the VLAN 50.0/24 and copy to the VM?

PnP
  • 1,684
  • 8
  • 37
  • 65
  • The copy operation is not going to use the layer 3 address of the host, it's going to use the layer 3 address of the guest. – joeqwerty Jun 20 '13 at 00:32
  • @joeqwerty But it's not like I am sharing the drive out from the host and copying data on the VM from \\host\USBDrive for example - I am mapping it through to the VM via Hyper-V, i.e. taking it offline on the host, properties of the VM, add Disk, and add the Physical Drive to the VM. – PnP Jun 20 '13 at 19:13
  • It's a disk in/on the VM. Copy operations to/from this disk will function just as if the VM were a physical machine. Just the same as data transferred from the VM's hard disk will use the layer 3 network stack of the VM, not the host. The only network component that copy operations from this VM will use from the host is the physical network card that is bound to the virtual switch the VM is bound to. The copy operation will not use the layer 3 network stack of the host it will use the layer 3 network stack of the VM. – joeqwerty Jun 20 '13 at 19:30
  • @joeqwerty but if I am copying straight from the USB disk that I've attached to the VM, to a drive on that said VM (which is a VHD on a DAS), how does it do the transfer exactly? – PnP Jun 20 '13 at 20:05
  • I think I understand what you're asking. The data is going to traverse the bus on the host from the DAS where the VM hard disk lives to the USB port where the USB drive is physically attached to the host. At no time should the data traverse the layer 3 network stack of the host – joeqwerty Jun 20 '13 at 20:22
  • So in this instance it won't touch the network at all essentially? – PnP Jun 20 '13 at 20:43
  • 1
    I don't believe so. – joeqwerty Jun 20 '13 at 22:34

1 Answers1

0

Your question is a little ambiguous. By "copy from that USB drive" you might mean that you're manipulating the files from within the VM, to or from another drive surfaced within the VM. Or you might mean that the VM is functioning as a file server, using the USB drive for storage.

If you meant that you're just using the USB drive as a disk within the VM, then there's no networking involved at all. Block storage traffic from the VM to the host machine happens through something called "VMBus" which is a paravirtualized I/O subsystem. You can see this in Device Manager within the VM if you choose "View Devices by Connection." It will be the parent of the SCSI or IDE controller you mapped the disk to.

You could, for instance, completely delete all the virtual NICs associated with the VM and you'd still get storage devices within the VM.

If you were talking about using the VM as a file server, then all the same statements about storage apply, but you'll see the files served to external machines using networking.

Jake Oshins
  • 5,116
  • 17
  • 15