To ssh the VM, you need to create a security group which allows ICMP, TCP, UDP to the VM. You also need to create a keypair. You can refer below commands:
mdkir -p /home/sysadmin/.ssh/
vi /home/sysadmin/.ssh/id_rsa
openstack keypair create key1 --private-key /home/sysadmin/.ssh/id_rsa
openstack security group create security1
openstack security group rule create --ingress --protocol icmp --remote-ip 0.0.0.0/0 security1
openstack security group rule create --ingress --protocol tcp --remote-ip 0.0.0.0/0 security1
openstack security group rule create --ingress --protocol udp --remote-ip 0.0.0.0/0 security1
openstack server create --image ubuntu --flavor m1.medium.pci_passthrough --network public-net0 --security-group security1 --key-name key1 test-pci
(public-net0 is a normal network. You will need an IP allocated from public-net0 to ssh the VM)
Then you can ssh the VM through dhcp namespace:
ip netns
sudo ip netns exec $UUID bash
ssh -i /home/sysadmin/.ssh/id_rsa ubuntu@192.168.101.208
To verify the NIC has been passed, you need to verify the driver has been loaded in the VM:
lsmod | grep $DRIVER
If the driver has been loaded, you can find a NIC which has the same MAC address as the passed NIC:
ip link
The PCI address will change when you use below command to check. But it should has the same description as in the host.
lspci
Hi Sathish,
To check whether the NIC has been passed to the VM successfully. You need to use an image which contains the driver required by the passed NIC. You can try the following image: cloud-images. ubuntu. com/xenial/ current/ xenial- server- cloudimg- amd64-disk1. img
http://
To ssh the VM, you need to create a security group which allows ICMP, TCP, UDP to the VM. You also need to create a keypair. You can refer below commands: .ssh/ .ssh/id_ rsa .ssh/id_ rsa pci_passthrough --network public-net0 --security-group security1 --key-name key1 test-pci
mdkir -p /home/sysadmin/
vi /home/sysadmin/
openstack keypair create key1 --private-key /home/sysadmin/
openstack security group create security1
openstack security group rule create --ingress --protocol icmp --remote-ip 0.0.0.0/0 security1
openstack security group rule create --ingress --protocol tcp --remote-ip 0.0.0.0/0 security1
openstack security group rule create --ingress --protocol udp --remote-ip 0.0.0.0/0 security1
openstack server create --image ubuntu --flavor m1.medium.
(public-net0 is a normal network. You will need an IP allocated from public-net0 to ssh the VM)
Then you can ssh the VM through dhcp namespace: .ssh/id_ rsa ubuntu@ 192.168. 101.208
ip netns
sudo ip netns exec $UUID bash
ssh -i /home/sysadmin/
To verify the NIC has been passed, you need to verify the driver has been loaded in the VM:
lsmod | grep $DRIVER
If the driver has been loaded, you can find a NIC which has the same MAC address as the passed NIC:
ip link
The PCI address will change when you use below command to check. But it should has the same description as in the host.
lspci