LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 10-23-2019, 11:18 PM   #31
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002

It is already routed. I believe the router is named router1. Both the network and the router belong to the demo project.

If it is not routed on your cloud, just create a router between the external network and private. The easiest way to create a router is on the network topology screen in the GUI.

Last edited by berndbausch; 10-23-2019 at 11:22 PM.
 
Old 10-25-2019, 03:21 AM   #32
James Baldwin
LQ Newbie
 
Registered: Dec 2018
Posts: 29
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
It is already routed. I believe the router is named router1. Both the network and the router belong to the demo project.

If it is not routed on your cloud, just create a router between the external network and private. The easiest way to create a router is on the network topology screen in the GUI.

Thank you.
 
Old 10-27-2019, 10:56 AM   #33
James Baldwin
LQ Newbie
 
Registered: Dec 2018
Posts: 29
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
It is already routed. I believe the router is named router1. Both the network and the router belong to the demo project.

If it is not routed on your cloud, just create a router between the external network and private. The easiest way to create a router is on the network topology screen in the GUI.
sorry,I didn't mean to bother you.
When I create one VM with 192.168.0.27, input ifconfig :
ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.27 netmask 255.255.0.0 broadcast 192.168.255.255
inet6 fe80::f816:3eff:fe2e:f34c prefixlen 64 scopeid 0x20<link>
ether fa:16:3e:2e:f3:4c txqueuelen 1000 (Ethernet)
RX packets 675 bytes 89575 (89.5 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 338 bytes 37801 (37.8 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 276 bytes 21300 (21.3 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 276 bytes 21300 (21.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

But when i add a new network for the VM .the network doesn't change.It is so amazing.
2)I check the ip addr ,It is :

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether fa:16:3e:2e:f3:4c brd ff:ff:ff:ff:ff:ff
inet 192.168.0.27/16 brd 192.168.255.255 scope global dynamic ens3
valid_lft 85792sec preferred_lft 85792sec
inet6 fe80::f816:3eff:fe2e:f34c/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST> mtu 1450 qdisc noop state DOWN group default qlen 1000
link/ether fa:16:3e:e5:8f:05 brd ff:ff:ff:ff:ff:ff

3)so i input sudo ifconfig eth1 up.
but i says that:

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1450
inet6 fe80::f816:3eff:fee5:8f05 prefixlen 64 scopeid 0x20<link>
ether fa:16:3e:e5:8f:05 txqueuelen 1000 (Ethernet)
RX packets 3040 bytes 218386 (218.3 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 9 bytes 726 (726.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Last edited by James Baldwin; 10-27-2019 at 10:58 AM.
 
Old 10-27-2019, 07:49 PM   #34
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by James Baldwin View Post
3)so i input sudo ifconfig eth1 up.
but i says that:

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1450
inet6 fe80::f816:3eff:fee5:8f05 prefixlen 64 scopeid 0x20<link>
ether fa:16:3e:e5:8f:05 txqueuelen 1000 (Ethernet)
RX packets 3040 bytes 218386 (218.3 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 9 bytes 726 (726.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
It was down, and now it is up. Success!

If you want it to obtain an IP address from the cloud, you have to use DHCP. To do this automatically when the instance boots, you have to configure DHCP for this interface in the instance. For example, if this is Centos, DHCP is configured in /etc/sysconfig/network-scripts/ifcfg-eth1.

Metadata is an alternative to DHCP (curl http://169.254.169.154/... contains the fixed IP address). You could use cloud-init to give the interface this address.

If this is a Cirros instance, I don't know off the cuff how you configure IP addresses in addition to the main interface.

Last edited by berndbausch; 10-27-2019 at 07:52 PM.
 
Old 10-28-2019, 07:17 AM   #35
James Baldwin
LQ Newbie
 
Registered: Dec 2018
Posts: 29
Blog Entries: 1

Rep: Reputation: Disabled
[QUOTE=berndbausch;6051307]It was down, and now it is up. Success!

To do this automatically when the instance boots, you have to configure DHCP for this interface in the instance. For example, if this is Centos, DHCP is configured in /etc/sysconfig/network-scripts/ifcfg-eth1.


So what should i do for ubuntu-18.04-cloud.I want the VM do this automatically when the instance boots.
The only way i know is to edit the 50-cloud-init.yaml .But when it reboot ,it's all back .
 
Old 10-28-2019, 07:41 AM   #36
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by James Baldwin View Post
To do this automatically when the instance boots, you have to configure DHCP for this interface in the instance. For example, if this is Centos, DHCP is configured in /etc/sysconfig/network-scripts/ifcfg-eth1.

So what should i do for ubuntu-18.04-cloud.I want the VM do this automatically when the instance boots.
The only way i know is to edit the 50-cloud-init.yaml .But when it reboot ,it's all back .
Well, Ubuntu uses netplan. You have to configure eth1 to use DHCP by creating a netplan YAML file, as explained in https://netplan.io/examples.

You can even use cloudconfig to write a netplan file.

Last edited by berndbausch; 10-28-2019 at 09:47 AM.
 
Old 10-28-2019, 09:20 PM   #37
James Baldwin
LQ Newbie
 
Registered: Dec 2018
Posts: 29
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
Well, Ubuntu uses netplan. You have to configure eth1 to use DHCP by creating a netplan YAML file, as explained in https://netplan.io/examples.

You can even use cloudconfig to write a netplan file.
1)
Yeah,i know the netplan in ubuntu 18.04.Because i will creat several VMs ,so i wonder if there is another way .How should i do for my ubuntu cloud image.
when i create a new VM (which has two ip ,e.g 192.168.99.x (eth0)and 10.1.0.x(eth1)) and the eth1 is already seted the DHCP.
2)
i edit the /etc/default/grub in my ubuntu18.04' cloud image and i upload this cloud .
But the network interface card name is the ens3 instead of the eth0,how should i do for my ubuntu cloud image .


Thank you .

Last edited by James Baldwin; 10-28-2019 at 09:33 PM.
 
Old 10-28-2019, 10:07 PM   #38
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by James Baldwin View Post
1)
Yeah,i know the netplan in ubuntu 18.04.Because i will creat several VMs ,so i wonder if there is another way .
Another way than netplan? I don't know. Use Ubuntu 16?
Quote:
How should i do for my ubuntu cloud image.
when i create a new VM (which has two ip ,e.g 192.168.99.x (eth0)and 10.1.0.x(eth1)) and the eth1 is already seted the DHCP.
I am confused. If eth1 is already set by DHCP, what is your problem?
Quote:
2)
i edit the /etc/default/grub in my ubuntu18.04' cloud image and i upload this cloud .
What did you change in /etc/default/grub?
Quote:
But the network interface card name is the ens3 instead of the eth0,how should i do for my ubuntu cloud image .
NICs have predictable names which depend on factors like their driver and their hardware path (usually, PCI address). Cloud images use virtio for network and storage drivers, and in my experience the resulting name is ethX. So, I can't tell why your Ubuntu cloud image's NIC is named ens3. You could try renaming it with udev, perhaps, or kernel parameter biosdevname. An overview of NIC naming options.
 
Old 10-28-2019, 11:25 PM   #39
James Baldwin
LQ Newbie
 
Registered: Dec 2018
Posts: 29
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post

I am confused. If eth1 is already set by DHCP, what is your problem?
No,no,no .The eth1 is manually modified by editing the 50-cloud-init.yaml

Of course, when I add another network segment (10.1.0.x) to my virtual machine (has already had 192.168.99.x) and restarts, eth1 shows the status as DOWN.
I mean, when I want to add another network segment to my virtual machine, eth1 is automatically UP, instead of manually modifying the yaml file and adding DHCP to it.



Quote:
What did you change in /etc/default/grub?
I change the GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0" instead of GRUB_CMDLINE_LINUX="" ,by run sudo guestfish --rw -a bionic-server-cloudimg-amd64.img (the bionic-server-cloudimg-amd64.img is ubuntu18.04).I know i must run update-grub in my VM when it reboots ,it will show ethx instead of the ensx.

Last edited by James Baldwin; 10-28-2019 at 11:27 PM.
 
Old 11-17-2019, 04:04 AM   #40
James Baldwin
LQ Newbie
 
Registered: Dec 2018
Posts: 29
Blog Entries: 1

Rep: Reputation: Disabled
Hi,i meet some question.

My OpenStack (DHCP service enabled), but some VMs can't get the IP address.Only 6 of the 20 VMs I created can get the IP address, and others can't get the IP address.
What Should i do for my neutron .Should i edit the neutron.conf?

Last edited by James Baldwin; 11-17-2019 at 04:07 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing JPEGs and finding matches... or not finding matches. rnturn Linux - General 16 02-20-2018 02:37 PM
i tried using this code for deleting a user given character from a user given string mecrazyme1234 Linux - Newbie 2 06-04-2011 04:59 PM
i tried using this code for deleting a user given character from a user given string mecrazyme1234 Programming 7 06-04-2011 11:47 AM
bash: routine outputting both matches and non-matches separately??? Bebo Programming 8 07-19-2004 06:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 03:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration