Hyper-v Open Virtual Machine - hyper-v

After rebooting is it possible to open a Hyper-V virtual machine without going through the Manager? It seems like it is already running in the background or maybe it is just in its last state.

If the OS in the Hyper-V virtual allows for remoting and also it is on the same network as the attempt to open a remote desktop to that virtual.
Note that the default network adapter for a virtual will provide a different IP address than what the local network provides to the server. You will most likely want to create a network adapter (in Hyper-V) which shares the network card to the virtual and the virtual will get its IP address from the local network.
If you can ping it, then it can be remoted to..but other things within the virtual has to allow for remoting.
Upon reading the OPs comments, it is clear that the need is to launch the virtual outside of Hyper-V. Hyper-V uses VMConnect.exe to achieve that...and that is available.
One can do that in an elevated Powershell shell such as:
vmconnect {Local/remote computer name} {Virtual Name}
such as
vmconnect Hyperion W10-Zephyr
where Hyperion is the local computer name and W10-Zephyr is the virtual's name.
See also Connecting to Hyper-V virtual machines with PowerShell

Related

Windows Server 2019 - VMs on Hyper-V cant get network

I have some trouble with my windows server 2019 running Hyper-V, for the background my windows server run on an ESXI infra.
It is impossible for me to get any internet access nor domain access on my Hyper-V virtual machine, this is how my host configuration look like
Host network
For me all look good, but when I turn on my virtual machine this is what I get
VMs network
VMs ping
I can see the machine getting a IP from my DHCP server, but it is impossible for me to ping any of the gateway, DNS.
My DHCP
This is how my virtual switch look like
vSwitch Hyper-V
And if needed my Ipconfig of my Windows server Hyper-V host
Hyper-V host network
I think that i have now tried everything I could, I don't see why my machine can get a DHCP IP, but can't communicate with any of my server.
I already have a topic posted on SpiceWorks (https://community.spiceworks.com/topic/2326264-hyper-v-wont-provide-internet-access-on-my-virtual-machine?page=1#entry-9231547), the last answer suggested that the problem came from my vSwitch on Hyper-V, but even after recreating a new one I can't get anything.
If you have any idea that can help me to achieve my configuration even the slightest one I'll gladly take it.
First thing I would like to ask, you are doing a Double Nested Virtualization, meaning: [ESXi] is the BareMetal Hypervisor, then inside of this Host you have at least 2 VMs, one name "SRVPARDC001" & the Hyper-V VM named "TESTHYPERV" , and inside this last one you have another VM called "VDI-Master" , if this is correct, you are asking:
*Why is VDI-Master, not getting internet, when SRVPARDC001 has leased an IP address ( 192.168.1.118) ?
My question is, why does the ipconfig output for VDI-Master show IP 192.168.1.121 , which per your DHCP, should be leased to the Desktop
Would it be possible to use a different subnet for the Virtual Switch inside the Hyper-V , to eliminate routing/dhcp issues?
My impression is that there is an issue on how the virtual switch is configured on the TESTHYPERV vm, since that virtual switch should be allowing the traffic upstream to the ESXi host and then out via your gateway/router/firewall device.

How could I access my VM in my host machine (By different IP)?

I want to access the virtual machine IP in the host (by ping or curl or something), but it is not ok. How could I make it?
The host machine is a win10 PC.
A virtual machine using VMware workstation 15, Ubuntu 16.04 server. It has IP address 192.168.178.138 and 10.0.0.11. I can access the 192.168.178.138, but cannot access 10.0.0.11. (no matter ping or curl...)
All are NAT mode in VMware Workstation.
Now I have a web application running on 10.0.0.11:80. How could I access it in my host machine.
Btw I have another VM with 192.168.178.39 and 10.0.0.31, and this VM can access the 10.0.0.11:80 by curl.
I can show the topo as below.
(A little Chinese but it won't affect reading, just ignore it)
Yes, now I solve this question by myself.
It seems that you cannot use the Host-only mode (Actually I can only use this mode...).
You need to set the virtual interface in your host PC (The IP, gateway, or anything else...);
Then you need to set in the VMWare workstation, set it to use speical lan (VM net 2 for me);
Then you can access it from the host machine and other vm, maybe you need to search something like NAT translation in VMWare workstation to access your web application deployed in the VM from outer network.
That's what I do, now I can access my horizon dashboard in the browser (The Ubuntu server don't have any browser... T-T sad ...)
Settings Picture

Cannot do Vagrant ssh after Vagrant up on windows Machine

I am building a sample vagrant box to install Jenkins and push it to atlas cloud.Please find below the steps that I followed.
Vagrant init ubuntu/trusty64
and the normal command to initialize the vagrant machine.
vagrant up
After this if i type command to ssh into the machine
vagrant ssh
It gives me error saying please increase timeout and so.
The main question is how can I ssh into the newly created vagrant machine.
To understand this, I have to go through all the basics. Please find below my findings.
Not attached
In this mode, VirtualBox reports to the guest that a network card is present, but that there is no connection -- as if no
Ethernet cable was plugged into the card. This way it is possible to "pull" the virtual Ethernet cable and disrupt the connection, which can be useful to inform a guest operating system that no network connection is available and enforce a reconfiguration.
Network Address Translation (NAT)
If all you want is to browse the Web, download files and view e-mail inside the guest, then this
default mode should be sufficient for you, and you can safely skip the rest of this section. Please note that there are certain limitations when using Windows file sharing (see Section 6.3.3, “NAT limitations” for details).
NAT Network
The NAT network is a new NAT flavour introduced in VirtualBox latest versions.
Bridged networking
This is for more advanced networking needs such as network simulations and running servers
in a guest. When enabled, VirtualBox connects to one of your installed network cards and exchanges network packets directly, circumventing your host operating system's network stack.
Internal networking
This can be used to create a different kind of software-based network which is visible to selected virtual machines, but not to applications running on the host or to the outside world.
Host-only networking
This can be used to create a network containing the host and a set of virtual machines, without the need for the host's physical network interface. Instead, a virtual network interface (similar to a loopback interface) is created on the host, providing connectivity among virtual machines and the host.
Generic networking
Rarely used modes share the same generic network interface, by allowing the user to select a driver which can be included with VirtualBox or be distributed in an extension pack.
At the moment there are potentially two available sub-modes:
UDP Tunnel
This can be used to interconnect virtual machines running on different hosts directly, easily and transparently, over existing network infrastructure.
VDE (Virtual Distributed Ethernet) networking
This option can be used to connect to a Virtual Distributed Ethernet switch on a Linux or a FreeBSD host. At the moment this needs compiling VirtualBox from sources, as the Oracle packages do not include it.
Out of these, only NAT and Host-only network is important.So, to solve this issue, I modified the predefined Vagrant file with the following code.
jenkins.vm.provider "virtualbox" do |vb|
jenkins.vm.network "private_network",ip:'192.168.56.5',:adapter => 2
jenkins.vm.hostname = 'jenkins.ci'
vb.name = "Jenkins"
end
Here, I have created a private network with static Ip and also, I specified the adapters count to use 2. The Private adapter is Host-only adapter and 1st adapter which is default one is NAT.

Accessing VM's terminal using putty in host OS?

I am working on a project in which we logon to client's machine using Cirtix receiver. The machine which we connect to using Citrix receiver is basically a Windows 7 machine. Once we are in the client's windows box, inside that we have virtual box, in which VM has been added and which has all the needed software for us to do the development; for example JBOSS, database etc.
In the host machine (windows 7), we have putty, and using putty we sometimes login to the VM (i.e. terminal). The confusion which I have is as below:
We login to the VM terminal using IP address: 127.0.0.1. This is where my confusion is. 127.0.0.1 normally is the IP address with which we can refer to the current machine; so how using this IP address we are able to connect to the VM which is added to the virtual box? Doesn't the VM which is in virtualbox has its own IP address with which we can connect to? Or is there some concept which I am not aware of.
Can anyone help me in understanding this? I am not well versed with virtualization, so for the gurus this might be a naive question.
Every VM will have their uuids so to access the VM inside virtualBox or any hypervisor for that matter. so you can use that particular VM uuid and u should be able to console to that VM.
in virtual box try below
You can use: VBoxManage list vms to list all currently registered VMs with their settings, names and UUIDs.
Once you know the UUID you can also start a vm by:
VBoxManage startvm which is essentially same as: VBoxManage startvm "Name-of-vm"
Also Vm has two interfaces one loopback which will have an address of 127.0.0.1 and the rest of the interfaces so to access the VM with particular ip you need to assign an IP to that VM interface and than try with that IP.Also you might have that port 22 open for that loopback ip so may be that is the reason you are able to connect on loopback
I hope this answers your question

How do you enable the network on a virtual machine running Vista x64?

I'm running Server 2008 64bit with Hyper-V. I've created a virtual machine with Vista 64bit and installed it. I can't get the Vista virtual machine to see the network adapter.
I've set-up an external network on the Virtual Network Manager (Hyper-V) and associated that with the virtual machine (Vista). I've also tried using a Legacy Network Adapter but that didn't work either although that time the Vista machine saw the network card but couldn't connect through it.
This is (obviously) the first time I've tried to set-up a virtual machine.
Any ideas?
EDIT: I notice that this question has been voted down a couple of times. I know that it's not a programming question but I'm a developer setting up a virtual machine to test my C#/ASP.NET code on and thought that other developers may hit this problem as well when they're doing this...
I don't know Hyper-V, but I know in VMWare you can create a network connection in Bridged mode (meaning the VM will get it's own IP address via DHCP if that's enabled) or host-only mode (meaning the VM can only communicate with the host). When Vista could see the card, could it communicate with the host machine (which would indicate a host-only connection was specified)? What kind of IP address did it have (I would guess Hyper-V has a built-in DHCP server like VMWare does?) -- that might give additional clues.
Sorry I don't know Hyper-V better...
Make sure you have the Hyper-V Tools installed on the Guest VM. You shouldn't need the legacy adapter.
You also may want to make sure you have all of the latest updates which may have addressed your issue. Particularly, KB950050
http://support.microsoft.com/kb/950050
It turns out that Vista x64 running as a VM through Hyper-V doesn't support the virtual network connection/card and that you have to set it up as a legacy network card. When I eventually got the config settings correct for the legacy network and disable the virtual network it connected.
Thanks for the help guys - much appreciated!