Operating System - HP-UX
1829691 Members
7665 Online
109992 Solutions
New Discussion

Re: VM virtual network config

 
SOLVED
Go to solution
jimmie_smith
Occasional Advisor

VM virtual network config

I'm having trouble communicating with a VM guest i created. The guest host is online and can communicate with the host system, and can even reach the physical gateway(outside of the host) but cannot reach another subnet. The guest exists on the same network as the host system. For example say my host system is 10.1.1.20 with a default gateway of 10.1.1.1. I have a vswitch setup that automatically was assigned 10.1.1.20 and my guest vm is 10.1.1.22. I made the gateway of the guest host system 10.1.1.20. (i also tried the real gateway as well..didn't work). Is this the correct ip configuration for the guest host in contrast to the vswitch and host system. Do I have to use a vlan? I'm just a bit confused on the virtual network and the admin guide didn't really spell it out for me as far as providing a "real-world" example.

-I can ssh to host system and from host i can ssh to the guest vm
-I can ping the host system from the vm as well as the virtual and physical gateway.
-I can reach(ssh/ping) the host from a different subnet but not the guest vm
-The guest vm and the host are on the same subnet

6 REPLIES 6
Eric SAUBIGNAC
Honored Contributor

Re: VM virtual network config

Bonsoir Jimmie,

"I have a vswitch setup that automatically was assigned 10.1.1.20" --> probably because you have configured the virtual switch on the lan card used by the host itself. Not an issue, but for myself I prefer using NIC that are not in use by the host. Have you some free NIC that you could affect to virtual switchs (lanscan at host level) ?

"I made the gateway of the guest host system 10.1.1.20" --> Not good

"i also tried the real gateway as well..didn't work" --> It should have worked. You MUST use the official gateway of your network, in the same way you would do for a "pysical" host. Can you ping it from the guest ? Can you ping any host on the same subnet from the guest ? If not, maybe your network admin has configured some MAC filtering on the network switchs ?

"Do I have to use a vlan?" --> Unless your network admin has configured vlan, there is no need. What about this, did he ?

In a general way, you can, and you must, think to networks from guest point of view in the same way than for pysical hosts. The main difference is that your virtual machine is connected to a virtual switch.

Maybe you could post some more informations :

VM host :

- lanscan
- netstat -rnv
- hpvmmet -V -S
- hpvmstatus -V -P

VM Guest :

- lanscan
- netstat -rnv

Regards

Eric
Tim Nelson
Honored Contributor

Re: VM virtual network config

After the vswitch is assigned to the guest with hpvmmodify the configuration on the quest is exactly the same as any other type of server.

assign IP with ipconfig
assign GW with route add default

The default route points to your router not the vHost..

If you must just start over.
-create vswitch with hpvmnet assigning lan interface from vHost.
-allocate the vswitch to the vGuest with hpvmmodify -a network:lan::vswitch:vswitch_name

Configure lan on vGuest as you would any other host.

jimmie_smith
Occasional Advisor

Re: VM virtual network config

I think this is the problem. Default gateway should be 10.66.128.1 for vm-guest which a physical network device..correct? Notice below i can ping the gateway from the vm, but get an error when trying to add it as the default route. I've recreated the vswitch and removed/re-added the vnic via hpvmmodify then restarted the vm.

Note hpvm1 is the vm ...hpux1 is the host. This is VM.A.03.00.

As you can see the host has 2 physical nics. I removed the ip configuration from lan1 on the host at your suggestion.

root@hpvm1# netstat -rnv
Routing tables
Dest/Netmask Gateway Flags Refs Interface Pmtu
127.0.0.1/255.255.255.255 127.0.0.1 UH 0 lo0 4136
10.66.128.21/255.255.255.255 10.66.128.21 UH 0 lan0 4136
10.66.128.0/255.255.255.0 10.66.128.21 U 2 lan0 1500
127.0.0.0/255.0.0.0 127.0.0.1 U 0 lo0 0
root@hpvm1# ping 10.66.128.1
PING 10.66.128.1: 64 byte packets
64 bytes from 10.66.128.1: icmp_seq=0. time=0. ms
64 bytes from 10.66.128.1: icmp_seq=1. time=0. ms
64 bytes from 10.66.128.1: icmp_seq=2. time=0. ms

----10.66.128.1 PING Statistics----
3 packets transmitted, 3 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/0/0

root@hpvm1# route add default 10.66.128.1
add net default: gateway 10.66.128.1: Network is unreachable
root@hpvm1#lanscan
Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI
Path Address In# State NamePPA ID Type Support Mjr#
0/0/0/0 0xEE99DA3A9BAD 0 UP lan0 snap0 1 ETHER Yes 119
root@hpvm1# ifconfig lan0
lan0: flags=1843
inet 10.66.128.21 netmask ffffff00 broadcast 10.66.128.255

------------------------------
------------------------------
FROM HOST
root@hpux1# lanscan
Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI
Path Address In# State NamePPA ID Type Support Mjr#
0/1/2/0 0x0017A4AB2125 0 UP lan0 snap0 1 ETHER Yes 119
0/1/2/1 0x0017A4AB2124 1 UP lan1 snap1 2 ETHER Yes 119
root@hpux1# ifconfig lan0
lan0: flags=1843
inet 10.66.128.20 netmask ffffff00 broadcast 10.66.128.255
root@hpux1# ifconfig lan1
ifconfig: no such interface
root@hpux1# hpvmnet -V
Name : localnet
number : 1
PID : 2436
State : Up
Mode : Shared
NamePPA : n/a
Host MAC Address : N/A
Host IP Address : N/A
Number of guests : 0

Name : vswitch1
number : 4
PID : 6521
State : Up
Mode : Shared
NamePPA : lan1
Host MAC Address : 0x0017a4ab2124
Host IP Address :
Number of guests : 1
Guest's Name : hpvm1
MAC Address : 0xEE99DA3A9BAD
IP Address : 10.66.128.21
Vswitch Port : 1
root@hpux1# hpvmstatus -V -P hpvm1
[Virtual Machine Details]
Virtual Machine Name : hpvm1
Virtual Machine UUID : 9547a0d8-ec84-11dc-8d24-0017a4ab2125
Virtual Machine ID : 1
Virtual Machine Label :
VM's Model Name : server Integrity Virtual Machine
VM's Serial Number : VM00810000
VM's Config Version : 3.0.0
VM's Config Label : HPVM A.03.00.00 clearcase eval-opt Thu May 17 2007 09h14m08s PDT
Operating System : HPUX
OS Version Number :
State : On (OS)
Start type : Manual
Console type : vt100-plus
Guest's hostname :
Guest's IP address : 10.66.128.21
EFI location : /opt/hpvm/guest-images/common/efi
Pattern File location : /opt/hpvm/guest-images/common/patterns.vmmpat
Guest revision : 1
Running on serverid : 0
Running on pid : 6992
Application controllers : NONE
Distributed : 0

[Authorized Administrators]
Oper Groups:
Admin Groups:
Oper Users:
Admin Users:
jlsmith

[Virtual CPU Details]
Number Virtual CPUs : 1
Minimum Virtual CPUs : 1
Maximum Virtual CPUs : 4
Percent Entitlement : 100.0%
Maximum Entitlement : 100.0%

[Memory Details]
Total memory : 2 GB
Minimum memory limit : 512 MB
Maximum memory limit : 64 GB
Reserved memory : 64 MB
Minimum reserved limit : 32 MB
Maximum reserved limit : 64 GB
VHPT Size : 1 MB

[Storage Interface Details]
Guest Device type : dvd
Guest Adaptor type : scsi
Ioscan format : 0/0/1/0.0.0
Bus : 0
Device : 1
Function : 0
Target : 0
Lun : 0
Physical Storage type : disk
Physical Device : /dev/rdsk/c0t0d0

Guest Device type : disk
Guest Adaptor type : scsi
Ioscan format : 0/0/1/0.1.0
Bus : 0
Device : 1
Function : 0
Target : 1
Lun : 0
Physical Storage type : lv
Physical Device : /dev/vx/rdsk/rootdg/vmvol01


[Network Interface Details]
Physical Storage type : vswitch
Guest Adaptor type : lan
Backing : vswitch1
Vswitch Port : 1
Ioscan format : 0/0/0/0
Bus : 0
Device : 0
Function : 0
Mac Address : ee-99-da-3a-9b-ad


[Misc Interface Details]
Guest Device type : serial
Guest Adaptor type : com1
Physical Storage type : tty
Physical Device : console
Eric SAUBIGNAC
Honored Contributor
Solution

Re: VM virtual network config

Bonjour Jimmie,

Just before I take some times to analyze deeper your config, you miss metric when adding default route in the guest :

route add default 10.66.128.1

should be :

route add default 10.66.128.1 1

See U later

Eric
jimmie_smith
Occasional Advisor

Re: VM virtual network config

Yep, that was it. Thank you very much
jimmie_smith
Occasional Advisor

Re: VM virtual network config

Case closed. Thanks all